Commit Graph

14689 Commits

Author SHA1 Message Date
vincentpeng
be09f2801e WallpaperColor's ColorHint API go for @SystemApi
Making color hint's relative api @SystemApi.
For pre-installed live wallpaper apps, change to @SystemApi so:

1. apps can be build with gradle build tools.
   (e.g.: PixelLiveWallpaper for app bundle feature).
2. apps can calculate and pass color hint information to interested system components.
   (Such as passing dark text support to SystemUi)

Fixes: 111395593

Test: make system sdk and check if the wallpaper apps can compile with android_system.jar.
Test: check whether the wallpaper apps can pass correct color hint after build (dark text).

Change-Id: I2ecf6ff77ff7a823949c6e3253a077e6eba9683a
2019-01-10 14:34:26 +00:00
TreeHugger Robot
15bd09638f Merge "Updating Java doc for Activity#onUserLeaveHint()" 2019-01-10 01:11:28 +00:00
Louis Chang
c2e193a0c9 Updating Java doc for Activity#onUserLeaveHint()
Currently, Activity#onUserLeaveHint() may not have clear enough
information descripting when it would be called. Updating
document to also check Intent#FLAG_ACTIVITY_NO_USER_ACTION
for reference.

Bug: 121282783
Test: m -j PRODUCT-sdk_x86-sdk
Change-Id: I3894efbe286575140afbbba2ed059fd0f129ef3b
2019-01-09 16:08:29 +08:00
Varun Shah
8f7cd8787d Merge "Moved isAppForeground to ActivityManagerInternal." 2019-01-09 01:03:43 +00:00
Michael Wachenschwanz
266dd3bfd7 Merge "Add Usage Reporting Api to UsageStatsManager" 2019-01-08 06:50:24 +00:00
Wei Sheng Shih
af7395db11 Merge "Support wallpaper on secondary displays.(7/N)" 2019-01-08 04:05:41 +00:00
Michael Wachenschwanz
36778525ba Add Usage Reporting Api to UsageStatsManager
The Usage Reporting Api allows apps to report usage within the app to
platform. Apps with the the OBSERVE_APP_USAGE permission may register
observers that use the reported in-app usage.

Test: manual (using the included Usage Reporter App)
Test: atest CtsUsageStatsTestCases:UsageReportingTest
Test: atest FrameworksServicesTests:AppTimeLimitControllerTests
Bug: 112486938

Change-Id: Iddd6f0993bbbf68a2032b34d473ef8d67da7747a
2019-01-07 14:56:06 -08:00
Varun Shah
98c84e193e Moved isAppForeground to ActivityManagerInternal.
Removed isAppForeground from the ActivityManager aidl and added it to
ActivityManagerInternal. Updated all of its references as well.

Bug: 119327603
Test: atest cts.tests.app.src.android.app.cts.ActivityManagerTest#testIsAppForegroundRemoved
Test: atest WifiServiceImplTest
Test: atest WifiLockManagerTest

Change-Id: I5c0fbe41df3cd00e02f8c0e1005fc9cf5832df77
2019-01-07 12:47:27 -08:00
Rob Carr
30e984ca78 Merge changes from topic "remove-scoped-connection"
* changes:
  Remove usage of scoped connections.
  Allow SurfaceControl to be passed over AIDL.
2019-01-07 20:08:58 +00:00
Chavi Weingarten
c0203f1268 Merge "Forward setVisibility call to SurfaceView for ActivityView." 2019-01-07 19:10:26 +00:00
TreeHugger Robot
42d3cf3647 Merge "Change the API for setting Notification Actions to be contextual." 2019-01-07 15:30:46 +00:00
Gustav Sennton
005d7a0d07 Change the API for setting Notification Actions to be contextual.
According to Android API council we shouldn't add a new semantic-action
flag to mark an action as contextual. Instead we should use a boolean
flag.
This CL adds that boolean flag.

Bug: 120842160
Test: build and run Notify app (in
vendor/google_experimental/users/cinek/), and ensure smart actions are
showing when the 'No Smart Actions' chooser is changed to
'Short Smart Actions'.
Change-Id: I5fc6dfa37ab28e3f29529cb6fda99c049783eb80
2019-01-07 10:59:45 +00:00
chaviw
d44449df80 Forward setVisibility call to SurfaceView for ActivityView.
SurfaceView setVisibility handles removing the surface already. By
forwarding the visiblity call from AV to the SV, SV will destroy the
surface. It will callback into AV through SurfaceCallback.surfaceDestroyed.
In the callback, AV removes the surface for the display, causing the
virtual display to turn off. When the virtual display is turned off, the
activities on that display will get stopped.

Test: ActivityViewVisibilityActivity
Change-Id: Iea8b57d7871b8c87457f2ae19485a610d0d74c38
2019-01-04 10:36:40 -08:00
Robert Carr
5fea55b2d2 Remove usage of scoped connections.
Tracking SurfaceFlinger changes. Now to construct a child surface
we need the SurfaceControl as opposed to just the surface, and so
we parcel the SurfaceControl across relayout.

Test: Manual
Bug: 62536731
Bug: 111373437
Bug: 111297488
Change-Id: I0a034767e92becec63071d7b1e3e71b95d505b77
2019-01-04 10:08:56 -08:00
Philip P. Moltmann
72401d4f77 Merge "Rename RuntimePermissionPresenter to PermissionController" 2019-01-04 17:32:44 +00:00
Antoan Angelov
e9da9aa821 Merge "Update provisioning checksum javadoc with SHA-1 hash deprecation." 2019-01-04 16:11:29 +00:00
arangelov
c2f4c1dbbf Update provisioning checksum javadoc with SHA-1 hash deprecation.
Test: none
Bug: 122346210
Change-Id: I0240be35240be685c5f40309c1b20efcd1255617
2019-01-04 14:45:10 +00:00
Michal Karpinski
4ea8d6188c Merge "Block activity starts from background when realCallingUid is a persistent system process and the start wasn't explicitly whitelisted by the sender" 2019-01-04 12:57:45 +00:00
Charles Chen
68b5a35cec Merge changes from topic "commandQueue"
* changes:
  Introduce AutoHideController to centralize call to WMS (4/N)
  Make Some APIs in CommandQueue aware of multi-display (3/N)
2019-01-04 06:39:25 +00:00
Philip P. Moltmann
bc054d8436 Rename RuntimePermissionPresenter to PermissionController
As this has already evolved from just presenting data. In the future any
permission related calls to the permission controller will be added here.

As the calls are protected by different permissions the binding will not
require a permission anymore, but each individual call checks the
permission.

Bug: 120221960
Test: Looked at settings UI showing data from this interface
Change-Id: I6b4a5c3b7ee17b145e11e2c1b6e11a8a232bffed
2019-01-03 11:39:43 -08:00
Wale Ogunwale
a7b3c1a7b2 Merge "Add support for singleTaskInstance displays" 2019-01-03 16:00:22 +00:00
Charles Chen
f3d295c58a Make Some APIs in CommandQueue aware of multi-display (3/N)
By this CL, we could dispatch Callback to fragments on the specified
display. I also add some annotations for documenting.

TODO: 1. add tests for multi-display.
      2. make registerStatusBar be an IStatusBar API to propagate the
         information when a display is added or in the initial step.
      3. Introduce AutoHideController

Test: atest SystemUiTests
Bug: 117478341

Change-Id: I864600f929c1d0c8aa39274f30c17b213b754d86
2019-01-03 22:12:38 +08:00
Michal Karpinski
ac116df518 Block activity starts from background when realCallingUid is
a persistent system process and the start wasn't explicitly
whitelisted by the sender

Also, adds mechanism to temporary whitelist processes when
broadcast-based PendingIntent was whitelisted, so that
activities can be opened for the duration of the broadcast
being processed.

For now, all this is only wired for notifications.

Note: those whitelists are separate - only UI elements like
notifications will leverage both in order to support trampolines.
Other system-based PendingIntent senders should only use the
activity-based whitelist when they want an activity to be opened
from background.

Bug: 110956953
Test: atest WmTests:ActivityStarterTests
Test: manual with Play notifications that are known
      for doing trampolines

Change-Id: Ibab91cdbe7afc0aed29d430dd41327272020925b
2019-01-03 12:26:43 +00:00
TreeHugger Robot
0995402a41 Merge "Refactoring canSuspendPackage to support batch queries" 2019-01-03 02:12:57 +00:00
Wale Ogunwale
9e737db3c9 Add support for singleTaskInstance displays
singleTaskInstance displays will only contain on task. This is mostly
used by ActivityView for use cases like bubbles.

Bug: 121047677
Test: atest ActivityManagerMultiDisplayTests#testSingleTaskInstanceDisplay
Change-Id: I5166015d8ecfa2845b4ffaa6c16d21a30a56b8a8
2019-01-02 14:27:05 -08:00
Richard Uhler
474dffd225 Merge "Add RollbackManagerService" 2018-12-31 18:43:21 +00:00
Richard Uhler
b29f145505 Add RollbackManagerService
This change adds RollbackManagerService as a new system service for
managing apk level rollbacks.

To work properly this requires additional selinux policy changes. Fails
gracefully in case of selinux denials, until we have a chance to sort
out the proper selinux policy.

Bug: 112431924
Bug: 116512606
Test: atest RollbackTest, with selinux enforcement off.
Test: atest CtsPermission2TestCases:PermissionPolicyTest
Change-Id: Id72aae9c4d8da9aaab3922ec9233ba335bc0198f
2018-12-31 12:38:07 +00:00
Mathew Inwood
31755f94e1 Limit access to suspected false positives.
Members modified herein are suspected to be false positives: i.e. things
that were added to the greylist in P, but subsequent data analysis
suggests that they are not, in fact, used after all.

Add a maxTargetSdk=P to these APIs. This is lower-risk that simply
removing these things from the greylist, as none of out data sources are
perfect nor complete.

For APIs that are not supported yet by annotations, move them to
hiddenapi-greylist-max-p.txt instead which has the same effect.

Exempted-From-Owner-Approval: Automatic changes to the codebase
affecting only @UnsupportedAppUsage annotations, themselves added
without requiring owners approval earlier.

Bug: 115609023
Test: m
Change-Id: I020a9c09672ebcae64c5357abc4993e07e744687
2018-12-28 11:50:04 +00:00
Chavi Weingarten
89000d0687 Merge "Wait for enter animation to complete when calling startActivitySync" 2018-12-27 17:55:53 +00:00
wilsonshih
36597d4bd7 Support wallpaper on secondary displays.(7/N)
Expand the wallpaper color listener for multiple displays. This will
allow the launcher on the secondary display can also receive the
correct wallpaper color.

Bug: 115486823
Test: atest WallpaperManagerTest
Test: atest ActivityManagerMultiDisplayTests
Change-Id: I3d893537a8c606170b5641c9eb4683d09743d80c
2018-12-27 12:02:50 +08:00
Remi NGUYEN VAN
708c409598 Merge "Add NetworkStack app" am: d01eaecbd2 am: e1922923fc
am: 5673820f9b

Change-Id: Idcd7b9b6eb50a98bcee67f89b0112b91cd1b40fb
2018-12-25 17:21:18 -08:00
Remi NGUYEN VAN
5673820f9b Merge "Add NetworkStack app" am: d01eaecbd2
am: e1922923fc

Change-Id: Iebe5aa5ea7cd235b8a6e734bde0f9a14dce5acdc
2018-12-25 17:09:42 -08:00
Remi NGUYEN VAN
c094a5402c Add NetworkStack app
The app is not started yet, and does not contain any service for now.

Test: built, booted
Bug: b/112869080
Change-Id: Id5a0fd02c891100e85d86b1040e53beec3581950
2018-12-25 11:42:42 +09:00
Andrii Kulian
60e88ecdca Merge "Add API to check if activity can be started on a display" 2018-12-23 20:43:03 +00:00
Chandan Nath
9dc26b0fb6 Merge "[Backup cleanup] remove unused (and no-op) method setBackupProvisioned" 2018-12-23 14:50:13 +00:00
TreeHugger Robot
dd6ea3bf12 Merge "Users can change zen policy for system dnd rules" 2018-12-21 21:16:38 +00:00
chaviw
feb2e1e0b4 Wait for enter animation to complete when calling startActivitySync
Tests may need to wait until the Activity's enter animation
is complete before executing. This is to make sure the windows
are all in the correct place. This change ensures the startActivitySync
waits on enter animation to complete for that activity before
proceeding.

Change-Id: Ifd7bfd41b39518518f4013fad80c3acd1e8b2354
Fixes: 120430810
Test: InstrumentationTest#testSendPointerSync
2018-12-21 10:56:55 -08:00
Beverly
1219670629 Users can change zen policy for system dnd rules
- Check consolidated zen policy in volume dialog, seek bar volumizer
and ZenModeControllerImpl instead of default notification policy
- Save ZenPolicy changes on restore

Test: atest ZenModeHelperTest
Test: atest ZenModeControllerImplTest
Bug: 111475013
Change-Id: I43b6dc8c6453739c50c874fe37415d425223d8c4
2018-12-21 10:57:54 -05:00
Chandan Nath
91824ff096 [Backup cleanup] remove unused (and no-op) method setBackupProvisioned
Bug: 120120742

Test: 1) atest RunBackupFrameworksServicesRoboTests
2) atest $(find \
frameworks/base/services/tests/servicestests/src/com/android/server/backup \
-name '*Test.java')
3) atest CtsBackupTestCases
4) atest CtsBackupHostTestCases
5) atest GtsBackupTestCases
6) atest GtsBackupHostTestCases

Change-Id: I7b712f346f851ca4f2b6b7d62a0a8fdcc7c77a56
2018-12-21 12:11:23 +00:00
TreeHugger Robot
434cf654db Merge "Set UID appops mode instead of package appops mode" 2018-12-21 07:22:09 +00:00
Philip P. Moltmann
159d98bda1 Set UID appops mode instead of package appops mode
In PermissionManagerService and DefaultPermissionGrantPolicy.

This mirrors what the permission controller is doing. Better make sure
all modules changing app-ops for runtime permissions do it the same way.

Test: Looked at pre-grants after boot, changed permissions after boot
Change-Id: I88386ec6842324b28ab408ea5cd113c9cc7de9fe
2018-12-20 16:08:01 -08:00
Svetoslav Ganov
c60fbd4fcd Merge "Use raw op codes for the watch noted APIs." 2018-12-20 20:59:47 +00:00
Fabian Kozynski
0b4592cecb Use raw op codes for the watch noted APIs.
Test: atest com.android.server.AppOpsServiceTests
Test: atest com.android.systemui.appops.AppOpsControllerTest

bug:121246606

Change-Id: Id99923c566fbf132914b15c676cb766d8793e875
2018-12-20 12:58:45 -05:00
Svetoslav Ganov
f0bfb0427c Merge "Make sure unsafeCheckOpRaw ops check raw ops" 2018-12-20 15:38:35 +00:00
Svet Ganov
9d528a1171 Make sure unsafeCheckOpRaw ops check raw ops
Test: manual

bug:119323172

Change-Id: Ic21d03af3a08bdca76821f2bc644482e7e5a1300
2018-12-19 17:25:52 -08:00
Gustav Sennton
38c573fef3 Merge "Add javadoc for Notification.getAllowSystemGeneratedContextualActions()" 2018-12-19 22:11:46 +00:00
TreeHugger Robot
802c621509 Merge "Move app overlay permission to app level" 2018-12-19 21:27:29 +00:00
TreeHugger Robot
70f04ce261 Merge "Allow delegates to see the notifications they post" 2018-12-19 15:33:50 +00:00
Julia Reynolds
33ab8a0cda Move app overlay permission to app level
Test: cts, atest
Bug: 111236845
Change-Id: I21c52cc7ce6d8e48354a7f258ee8b07d96dcef47
2018-12-19 10:29:36 -05:00
Chandan Nath
2ec8b91026 Merge "[Multi-user] Change more BackupManager AIDL methods to accept userId in methods" 2018-12-19 11:50:10 +00:00