Commit Graph

17228 Commits

Author SHA1 Message Date
TreeHugger Robot
8eaa866603 Merge "Enable App Prediction for Work Profile" 2020-02-11 03:49:50 +00:00
Pinyao Ting
ac68aac0ac Enable App Prediction for Work Profile
call to different instance of AppPredictionPerUserService based on
calling context.

Bug: 148230574
Test: Manual
Change-Id: I5987ed6a80155a8aed7c1985e8edd1ba98e51149
2020-02-10 17:13:32 -08:00
Evan Rosky
825f041a0c Merge "Add utility to get all root tasks on a display" 2020-02-10 21:52:08 +00:00
Automerger Merge Worker
0f7945a435 Merge "Add TEST_MAPPING for gating and logging" am: 05fb4434f3 am: 5d3e5fb3b5 am: 4c0d1a02b6
Change-Id: I5da9a24dac34cea069906337b8d39cbe43c20213
2020-02-10 21:50:00 +00:00
Automerger Merge Worker
4c0d1a02b6 Merge "Add TEST_MAPPING for gating and logging" am: 05fb4434f3 am: 5d3e5fb3b5
Change-Id: Ie1963bb7965827d9f9985b08c78e70b2de3319a7
2020-02-10 21:35:05 +00:00
Automerger Merge Worker
5d3e5fb3b5 Merge "Add TEST_MAPPING for gating and logging" am: 05fb4434f3
Change-Id: I701ef53dada696ee5f6e45d8539ca385a08ffc29
2020-02-10 21:24:31 +00:00
Treehugger Robot
05fb4434f3 Merge "Add TEST_MAPPING for gating and logging" 2020-02-10 21:12:10 +00:00
TreeHugger Robot
530d3e4982 Merge "Pass PictureInPictureParams in TaskInfo." 2020-02-10 20:17:31 +00:00
Soonil Nagarkar
ad1c960744 Merge "Add location notification and target sdk checks" 2020-02-10 19:43:06 +00:00
Andrei Onea
1a0195349b Add TEST_MAPPING for gating and logging
The tests included are unit tests for the implementation (under
FrameworksServicesTests), for the corresponding TestRule
(PlatformCompatGating) and CTS tests.

Bug: 137821288
Test: cd frameworks/base/core/java/android/app/compat && atest
Test: cd frameworks/base/services/core/java/com/android/server/compat \
          && atest
Change-Id: I1a652775715f1a9738cc72725303bc78dfa17d03
2020-02-10 18:25:06 +00:00
Automerger Merge Worker
826a1848bc Merge "Clear callingId before binder calls in CompatChanges" am: 45d1f67bf6 am: 00f11fe5fd am: 912f8487d2
Change-Id: I8dc566e8d2fb1c8604f686298867f5a451e480b9
2020-02-10 16:52:00 +00:00
Automerger Merge Worker
912f8487d2 Merge "Clear callingId before binder calls in CompatChanges" am: 45d1f67bf6 am: 00f11fe5fd
Change-Id: I90fd68462e5967cfe7eef2c3b86dbec78a124f72
2020-02-10 16:35:29 +00:00
Philip P. Moltmann
41308eced1 Merge "Revert "Activity start: Send featureId from context->AppOpsManager"" 2020-02-10 16:31:33 +00:00
Automerger Merge Worker
00f11fe5fd Merge "Clear callingId before binder calls in CompatChanges" am: 45d1f67bf6
Change-Id: I803ed8ac7035295d819130d1b19c9585fe0edb65
2020-02-10 16:23:49 +00:00
Philip P. Moltmann
e7421e92d9 Revert "Activity start: Send featureId from context->AppOpsManager"
Revert "Adjust monkey to changed internal APIs"

Revert "Test featureId is correctly used in startActivity"

Revert submission 10111030-activityStarter_featureId

Reason for revert: presubmit test breakage
Reverted Changes:
Ic7056b492: Activity start: Send featureId from context->AppOp...
I8e2a07da7: Adjust monkey to changed internal APIs
I7a6af6fb1: Test featureId is correctly used in startActivity

Change-Id: I48c55a962c990b22ea49e923baa7c73b121d179b
2020-02-10 16:14:12 +00:00
Andrei-Valentin Onea
45d1f67bf6 Merge "Clear callingId before binder calls in CompatChanges" 2020-02-10 16:13:13 +00:00
Eran Messeri
83235861a5 Merge "Revert: Prevent auto-granting of location permission via DPM" 2020-02-10 13:52:35 +00:00
Wu Ahan
b4ab54ad97 Merge "Unit tests for wide color gamut of ImageWallpaper" 2020-02-09 14:17:16 +00:00
Philip P. Moltmann
6e406c8ae7 Merge "Activity start: Send featureId from context->AppOpsManager" 2020-02-08 22:54:50 +00:00
Philip P. Moltmann
9c5226fe36 Activity start: Send featureId from context->AppOpsManager
The expected usage pattern for noteOp is to get the
Context#getOpPackageName() and Context#getFeatureId() in the calling app
and the call

noteOp(callingPackageName, Binder.getCallingUid(), callingFeatureId)

As the featureId parameter is new this parameter has to been piped all
through from the ...Manager classes running in the app all way deep into
the bowels of the system server.

There is a special featureId==null for the "default" feature. This is
used in two cases:
- In case the system server (packageName == null || packageName ==
  "android") makes a call
- In the case there is no caller. In this case I left annotations in the
  code to make clear that the default feature is used

Raw binder interfaces (defined in AIDL files) are not supposed to be
used by apps. Still historically this has happened and we ended up with
@UnsupportedAppUsage tags in these files. Also AIDL does not support
two methods with the same name but different parameters. I.e. in the
case when I had to add a paramater to a method tagged as UnsupportedAppUsage I
- created a new method ...WithFeature with the additional paramter
- set a maxTargetSDK for the old method and mention the public API to
  use in the deprecation method
This is really not pretty. Once there is no more app using the old
internal API this hack can be removed.

Additionally this change removed all internal calls to
AppOpsService.noteOperation and AppOpsService.checkOperation and
replaces them with the public API equivalent. This sometimes means to
move the resolution of the mAppOpsManager to be lazy.

Exempt-From-Owner-Approval:: Just piping through arguments
Bug: 136595429
Test: atest --test-mapping frameworks/base/services/core/java/com/android/server/am/
      atest CtsAppOpsTestCases added test to cover activity start
      atest WmTests
Change-Id: Ic7056b492cb1c9a79158e6c2b4864898a0eb5b2a
2020-02-08 22:53:43 +00:00
Automerger Merge Worker
af5dbf486a Merge "Disabled some DEBUG constants." into qt-qpr1-dev am: e8d9d331ae
Change-Id: I7d4e49253b1ecd54dc8036e21e23e7392aa47602
2020-02-08 21:24:30 +00:00
TreeHugger Robot
1e77561653 Merge "Descriped how getFeatures map is keyed" 2020-02-08 17:46:03 +00:00
Julia Reynolds
d05b0a7f66 Merge "Add support for Conversation settings" 2020-02-08 11:48:17 +00:00
Automerger Merge Worker
06dd4617c0 Merge changes from topic "lights-manager" am: 59401aab80 am: bd0f475895
Change-Id: I2f4ba72c3b56b5ae0f9ec82e368281734b9a9715
2020-02-08 01:53:41 +00:00
Automerger Merge Worker
bd0f475895 Merge changes from topic "lights-manager" am: 59401aab80
Change-Id: I9a45024b3cb557afd4fb09e69692f35c4372c928
2020-02-08 01:37:15 +00:00
Julia Reynolds
6ae380d699 Merge "Add ability to delete individual history items" 2020-02-08 01:15:39 +00:00
Robert Carr
f6690d1c7e Pass PictureInPictureParams in TaskInfo.
This way TaskOrganizerImplementations can use the parameters from
taskAppeared. We also wire up taskInfoChanged.

Bug: 146594635
Bug: 139371701
Test: TaskOrganizerTests
Change-Id: I5371af16177ebdf6e2187beb7184efd499c8f36d
2020-02-07 13:29:43 -08:00
Jing Ji
c0324f3a1f Merge "Update ApplicationExitInfo per API Review" 2020-02-07 21:22:58 +00:00
Evan Rosky
29d4a0a5d5 Add utility to get all root tasks on a display
This is intended to replace getAllStackInfos for
task organization purposes.

Bug: 33381284
Test: updated TaskOrganizerTests
Change-Id: I1ff10de188218f1cd0b5638c297dffbf2a9a04a2
2020-02-07 12:50:20 -08:00
Felipe Leme
85382ce4d2 Disabled some DEBUG constants.
Bug: 138939803
Bug: 142965266
Bug: 148457657

Test: echo 'in TH we trust!'

Change-Id: Ie3112fa1965d9b03bc142924ca17cf27dd6aa44d
(cherry picked from commit e966b8e76d26283163721620528eea0bfd77b43c)
2020-02-07 11:52:28 -08:00
Andrei Onea
01ba3215fa Clear callingId before binder calls in CompatChanges
Since this was already a recurring pattern when using PlatformCompat
directly, clear calling id before binder calls in CompatChanges.

Bug: 149091690
Test: atest CtsAppCompatHostTestCases
Change-Id: I4eec315eba14b840f9ef222b81b624d8e4f201eb
2020-02-07 19:19:20 +00:00
Evan Rosky
a85b3f1828 Merge "Add hierarchy operations to container transaction" 2020-02-07 19:19:12 +00:00
Julia Reynolds
b1a7718ff8 Add ability to delete individual history items
Test: atest
Bug: 137396965
Change-Id: I825a93bdf8fd28c4d58bf3df4a00c7c6505678bf
2020-02-07 14:10:16 +00:00
Julia Reynolds
882f206956 Add support for Conversation settings
Test: atest
Bug: 137397357
Change-Id: I68df21cc94d4964b417cad7aaad05526e1b4f967
2020-02-07 09:06:12 -05:00
Eran Messeri
9b132e135a Revert: Prevent auto-granting of location permission via DPM
Revert the change where the DPC could no longer set location permissions
by calling DevicePolicyManager.setPermissionGrantState.

Bug: 148631522
Bug: 147650798
Test: manual
Test: see cts tests in associated CL.
Change-Id: Ic6ebb7c8001a8e356296bc6459fc3530e0531070
2020-02-07 13:20:44 +00:00
Charles Chen
848b6d4441 Merge "Fix that WindowContext token is always null" 2020-02-07 08:25:43 +00:00
Ahan Wu
d860933681 Unit tests for wide color gamut of ImageWallpaper
We have merged a cl for wide color gamut support of ImageWallpaper.
This cl is the unit tests for this feature.

Bug: 142845271
Test: atest com.android.systemui.glwallpaper.ImageWallpaperRendererTest
 --rerun-until-failure 20
Test: atest com.android.systemui.glwallpaper.EglHelperTest
 --rerun-until-failure 20
Change-Id: Ib22ee8c074b1f8d9e37e990589ca833c3d93892c
2020-02-07 15:31:31 +08:00
Evan Rosky
a8fde159c7 Add hierarchy operations to container transaction
Also add a way to query for child containers of a container.

Combined, these provide enough flexibility to re-arrange
containers to system-ui. For now, it is locked-down a bit so
it only provides children of TaskTiles and can only reparent
ActivityStacks. Eventually, this can be expanded for nested
tasks or display areas.

Bug: 133381284
Test: Added TaskTileTest#testHierarchyTransaction
Change-Id: Id0e89a4e4b9352d9392349c4e1fe7d69b4f9f212
2020-02-06 20:11:01 -08:00
Ivailo Karamanolev
3e376b79ce Add LightsManager implementation to LightsService
Includes backend code to support LightsManager binder calls and route
them to the HALs.

Bug: 144979010
Bug: 144978691
Bug: 142715294
Change-Id: I0080972620ba7a3fb1197cdd0288287d3cfa8780
Fix: 142230898
Test: atest LightsManagerTest
Test: atest LightsServiceTest
Merged-In: I2db7f2caa432cd1e2389ea5ca6544200ada18675
2020-02-07 02:11:18 +01:00
Soonil Nagarkar
a8717feb6b Add location notification and target sdk checks
Check target SDKs to disallow using setSecureSetting with LOCATION_MODE
and point clients to setLocationEnabled() instead. Show notifications to
users when location settings are changed by the admin.

Bug: 136219903
Test: manual - triggered setLocationEnabled and observed notification
Change-Id: I07c150e62230b06f76ec7bd5197a23e703ffb918
2020-02-06 15:57:46 -08:00
Yvonne Jiang
43361f713d Merge "Update secondary lock screen implementation to use the newly updated SurfaceControlViewHost API." 2020-02-06 23:02:49 +00:00
Robert Carr
e10ee3d2eb Introduce BLASTSyncEngine
Test: wmtests/TaskOrganizerTests, TaskOrganizerTests demo apps
Change-Id: I82c2e184e93782549bc4f78e0986a026d7ef8d03
2020-02-06 12:25:51 -08:00
TreeHugger Robot
90fbb634f4 Merge "Describe in which cases getLast* methods return -1/null" 2020-02-06 19:28:09 +00:00
Philip P. Moltmann
053dbad9fd Merge changes from topic "AppOpsFgBackgroundMode"
* changes:
  Package manager is not ready when reading app-ops state
  Use setUidMode when reading state
  Expose syntax for app-ops settings as test-api
  Callback startWatchingMode with the right op
  Force update uid state when pending uid state is applied
  Notify all packages is uid-mode is changed
2020-02-06 18:21:52 +00:00
Automerger Merge Worker
3ef03023e5 Merge "Add CompatChanges API." am: 54036c0525 am: 9f9657ee5e am: f1f1b1402a
Change-Id: Id473cf123c184eb4247f93ebc9d96bbb87f9f7a7
2020-02-06 18:13:41 +00:00
Automerger Merge Worker
f1f1b1402a Merge "Add CompatChanges API." am: 54036c0525 am: 9f9657ee5e
Change-Id: Ief0b05e44e55c562df4dd616ba9ffdc534463468
2020-02-06 17:55:28 +00:00
Automerger Merge Worker
746ba5d891 Merge "More renames for API council" am: b03661f5d8 am: 02e64e352c am: 9522f9ff0f
Change-Id: I642777126bf77db09c8b64a8302145472272c9c6
2020-02-06 17:48:17 +00:00
Automerger Merge Worker
9f9657ee5e Merge "Add CompatChanges API." am: 54036c0525
Change-Id: Ieade8f2b33423bad4219ab2982b876b06e355e84
2020-02-06 17:43:00 +00:00
Automerger Merge Worker
9522f9ff0f Merge "More renames for API council" am: b03661f5d8 am: 02e64e352c
Change-Id: I83a0a98b18cffd92a8f2eed727b5fa277d89a5be
2020-02-06 17:37:36 +00:00
Philip P. Moltmann
3f9ee360cd Descriped how getFeatures map is keyed
... and add some "further-reading" links

Test: None
Fixes: 149015070
Change-Id: I670ceeed6602d415ec7777ea8167d3eb3def779a
2020-02-06 09:33:34 -08:00