Commit Graph

21597 Commits

Author SHA1 Message Date
Makoto Onuki
abdd86b297 Merge "Use different exceptions for different crash reasons" into sc-v2-dev am: 5dcf36ad8d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16276394

Change-Id: I3fd688c3241e6c9ae34286b337f6ee0b2bfc525e
2021-11-17 18:05:05 +00:00
Makoto Onuki
b20c14d2af Use different exceptions for different crash reasons
Always throwing RemoteServiceException would make it impossible to
tell the cause of a crash without the string message.

Let's use a different exception type so developers can cluster crashes
without the exception message.

Bug: 124137635
Bug: 172001574
Test: Treehugger

Change-Id: If04f8c66efcc32a5200efa70ea20d97e13006039
2021-11-16 14:20:56 -08:00
TreeHugger Robot
3740f52ea4 Merge "New hidden DPM methods: getLogoutUserId() and clearLogoutUser()." into sc-v2-dev am: b3137b3b86
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16245093

Change-Id: I73aded8d5b2f1bd38adba570d2eab4c6d84cdea8
2021-11-13 01:33:32 +00:00
TreeHugger Robot
b3137b3b86 Merge "New hidden DPM methods: getLogoutUserId() and clearLogoutUser()." into sc-v2-dev 2021-11-13 01:22:24 +00:00
TreeHugger Robot
2484637c43 Merge "Fixed permisssions on setStopBackgroundUsersOnSwitch()." into sc-v2-dev am: 174e83c8ec
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16224123

Change-Id: I8158038b500efbbb3aafe0e4dd342adb5cf07890
2021-11-12 18:39:24 +00:00
Felipe Leme
670c8895be New hidden DPM methods: getLogoutUserId() and clearLogoutUser().
Also fixed how the logout user was cleared after a successful switch.

They will be used by CarSystemUi to end a session.

Test: Manual verification with CtsVerifier and TestDpc on automotive

Bug: 205185521
Bug: 204483021

Change-Id: Ieda0a22625ef705fcd705aedfc2dbf2cf570bf81
2021-11-11 18:14:28 -08:00
Felipe Leme
1f37c4f7c7 Fixed permisssions on setStopBackgroundUsersOnSwitch().
It was requiring INTERACT_ACROSS_USERS_FULL (instead of
INTERACT_ACROSS_USERS), which cannot be granted by Shell
(and hence cannot be used by CtsVerifier).

Test: m update-api
Test: manual verification
Bug: 203752848

Change-Id: Ie84311e6500cefa055548e309ee6d629c62fb10d
2021-11-11 17:42:24 -08:00
TreeHugger Robot
3142c5b5b7 Merge "Don't allow background apps to change theme" into sc-v2-dev am: a6f7644ef0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16203175

Change-Id: Ia566b6199eee6fa35ac8b978ae20d7223c85c9e5
2021-11-11 20:15:13 +00:00
TreeHugger Robot
a6f7644ef0 Merge "Don't allow background apps to change theme" into sc-v2-dev 2021-11-11 19:56:46 +00:00
Lucas Dupin
6fd464985a Don't allow background apps to change theme
A background app that changes the wallpaper, was able to change the
device theme.

This change will apply the theme if the app is on the foreground, like
WallpaperPicker would be, but would defer the event until the next power
button cycles, like we do with Live Wallpapers, to avoid the same type
of DoS.

Test: manual
Test: atest ThemeOverlayControllerTest
Fixes: 205140487
Change-Id: I2086b29ef9bf3bb6fb7d9ebba6e7b8db9392e459
Merged-In: I2086b29ef9bf3bb6fb7d9ebba6e7b8db9392e459
2021-11-11 17:53:06 +00:00
Alex Chau
29283a4610 Revert "[RESTRICT AUTOMERGE] Associate SystemUiContext with DisplayContent" am: 930739c45a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16238819

Change-Id: Ib98b2e6427a789067b25a1cb28fc189ec5a9e368
2021-11-11 14:32:59 +00:00
TreeHugger Robot
60422ba05a Merge "Revert "[RESTRICT AUTOMERGE] Associate SystemUiContext with DisplayContent"" into sc-v2-dev 2021-11-11 14:13:01 +00:00
Alex Chau
930739c45a Revert "[RESTRICT AUTOMERGE] Associate SystemUiContext with DisplayContent"
This reverts commit 71b2172abc.

Reason for revert: See b/205859784, breaks launcher tests
Bug: 205859784
Bug: 194262507
Bug: 191064581

Change-Id: Iaac32bd4142c0539300725dc2f6e4255fefc8b2f
2021-11-11 10:09:10 +00:00
TreeHugger Robot
a98e1d699f Merge "Renamed setStopBackgroundUsersOnSwitch to setStopUserOnSwitch()" into sc-v2-dev am: 5908bbe04d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16186502

Change-Id: I8694863f5759c43eebe52568c9f64aa48d811e0c
2021-11-11 05:08:56 +00:00
TreeHugger Robot
5908bbe04d Merge "Renamed setStopBackgroundUsersOnSwitch to setStopUserOnSwitch()" into sc-v2-dev 2021-11-11 04:51:15 +00:00
Varun Shah
0912451704 Merge "Update deletion conditions for a package's UsageStats." into sc-dev am: 2a14be36ff am: 837f58f7fa am: 41e23753cc
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16222839

Change-Id: I9a3965fccb3e1b48b0f5ae3b1a46557731a5bd72
2021-11-11 01:54:22 +00:00
Varun Shah
0b0b81f505 Merge "Update deletion conditions for a package's UsageStats." into sc-dev am: 2a14be36ff am: e1a38189da
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16222839

Change-Id: I10b4e4a641752585cc23ef4a08f25517aa4be791
2021-11-11 01:37:54 +00:00
Varun Shah
41e23753cc Merge "Update deletion conditions for a package's UsageStats." into sc-dev am: 2a14be36ff am: 837f58f7fa
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16222839

Change-Id: I483fcba4ada48dcb8be415063f101d523def3a8b
2021-11-11 01:37:09 +00:00
Varun Shah
e1a38189da Merge "Update deletion conditions for a package's UsageStats." into sc-dev am: 2a14be36ff
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16222839

Change-Id: Ic05768dc4213e00f93829ace282fd847dc2e5fed
2021-11-11 01:19:38 +00:00
Varun Shah
837f58f7fa Merge "Update deletion conditions for a package's UsageStats." into sc-dev am: 2a14be36ff
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16222839

Change-Id: I4eabd7f3cafc5e95399e7265c56c937c04d5992d
2021-11-11 01:18:16 +00:00
Varun Shah
157fbcfbe4 Update deletion conditions for a package's UsageStats.
If a profile owner is defined for a specific user, do not delete usage
stats for a package on package deletion.

Bug: 197399948
Test: atest UserUsageStatsServiceTest
Test: atest UsageStatsTest [all]
Change-Id: I94a8e3dfca8ef4c7616f77944d61726e06043b85
Merged-In: I94a8e3dfca8ef4c7616f77944d61726e06043b85
2021-11-10 17:11:32 +00:00
Charles Chen
13f7c9ec32 [RESTRICT AUTOMERGE] Associate SystemUiContext with DisplayContent am: 71b2172abc
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15879397

Change-Id: I722c5a2fd21c0d0969c849650b477e0105f7a1b2
2021-11-10 07:56:38 +00:00
Charles Chen
71b2172abc [RESTRICT AUTOMERGE] Associate SystemUiContext with DisplayContent
Before this CL, SystemUiContexts were fixed to the Display metrics
when the SystemUiContexts were created. It is the same mechanism
as DisplayContext but applies to SystemUiContexts unexpectedly.
This CL makes SystemUiContexts associate with DisplayContent with
the corresponding display ID. In this way, SystemUiContext would
receive updates when there is a Display property change.

Bug: 194262507
Bug: 191064581
Test: atest InputMethodMenuControllerTest WindowContextControllerTest

Change-Id: Idd74da965c18bdbf8912bd45e89be21f652dcf93
2021-11-10 14:19:53 +08:00
Felipe Leme
61292e22ed Renamed setStopBackgroundUsersOnSwitch to setStopUserOnSwitch()
Test: atest NeneTest:UsersTest
Test: m update-api CtsVerifier
Test: adb shell cmd activity set-stop-user-on-switch false
Test: adb shell cmd activity set-stop-user-on-switch
Test: adb shell dumpsys activity users|grep OnSwitch

Bug: 203752848

Merged-In: Iea03164319768abf159bf8ae2ccc539620cb30fe
Change-Id: Iea03164319768abf159bf8ae2ccc539620cb30fe
2021-11-08 16:32:42 -08:00
Wei Sheng Shih
6ff3d2241c Merge "setTurnScreenOn can only used as wakeup" am: 385935d07f am: a833f2152a am: b87acfcfde
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1884170

Change-Id: I31e99549b48b1fb257915ba285a7c2454d31d179
2021-11-08 07:57:38 +00:00
Wei Sheng Shih
b87acfcfde Merge "setTurnScreenOn can only used as wakeup" am: 385935d07f am: a833f2152a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1884170

Change-Id: I812de347deb83ced762560260b62544c924b7056
2021-11-08 07:44:40 +00:00
wilsonshih
966a61366e setTurnScreenOn can only used as wakeup
setTurnScreenOn shouldn't dismiss keyguard automatically even when the
keyguard is insecure.
The keyguard state should only be affected by requestDismissKeyguard
and/or setShowWhenLocked, and for either case setTurnScreenOn can be
used to wakeup device if the activity is going to be resumed and
visible.

Bug: 201103497
Test: atest ActivityVisibilityTests KeyguardTests KeyguardLockedTests
Change-Id: I283dea469a33286fc9cf835e39ee5a3be2444739
(cherry picked from commit f3a1274a38)
2021-11-08 07:18:20 +00:00
wilsonshih
5ffa690f0c setTurnScreenOn can only used as wakeup
setTurnScreenOn shouldn't dismiss keyguard automatically even when the
keyguard is insecure.
The keyguard state should only be affected by requestDismissKeyguard
and/or setShowWhenLocked, and for either case setTurnScreenOn can be
used to wakeup device if the activity is going to be resumed and
visible.

Bug: 201103497
Test: atest ActivityVisibilityTests KeyguardTests KeyguardLockedTests
Change-Id: I283dea469a33286fc9cf835e39ee5a3be2444739
2021-11-08 11:04:10 +08:00
Felipe Leme
3f4a968751 Merge "New TestAPIs on ActivityManager to not stop bg users on switch." into sc-v2-dev am: 7c1c6a691c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16105957

Change-Id: Iae229bfacaec6690fd114789c9336fdfdbc33418
2021-11-05 18:10:29 +00:00
Felipe Leme
7c1c6a691c Merge "New TestAPIs on ActivityManager to not stop bg users on switch." into sc-v2-dev 2021-11-05 18:06:02 +00:00
Felipe Leme
502344efe5 Merge "Centralise owners for Enterprise Platform team." into sc-v2-dev 2021-11-05 17:49:30 +00:00
Felipe Leme
32fb93eaed Merge "Disabled some password-related APIs on automotive." into sc-v2-dev am: ef61167cf4
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16150886

Change-Id: I22ec02083d41e21e65ca851dff509544684b3436
2021-11-05 16:25:50 +00:00
Felipe Leme
ef61167cf4 Merge "Disabled some password-related APIs on automotive." into sc-v2-dev 2021-11-05 16:06:13 +00:00
Felipe Leme
3ff4835584 Merge "Fixed DPM.logoutUser() for headless system user mode." into sc-v2-dev am: f1f95597f0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16145450

Change-Id: I8a327d7bb4659b67d2ed3365b3640d88d9aee103
2021-11-05 15:59:15 +00:00
Felipe Leme
f1f95597f0 Merge "Fixed DPM.logoutUser() for headless system user mode." into sc-v2-dev 2021-11-05 15:45:19 +00:00
Felipe Leme
9cab317f2a New TestAPIs on ActivityManager to not stop bg users on switch.
Test: atest NeneTest:UsersTest
Test: m update-api
Test: adb shell cmd activity set-stop-user-on-switch false
Test: adb shell cmd activity set-stop-user-on-switch
Test: adb shell dumpsys activity users|grep OnSwitch

Bug: 203752848

Change-Id: Ib57989aff323dc1f7d98720d01215e4f7c79ba3a
2021-11-04 12:36:56 -07:00
Felipe Leme
bc671b859a Fixed DPM.logoutUser() for headless system user mode.
On "traditional" devices, this method switches back to the "primary"
user, which is the system user. But on devices running with headless
system user mode, it should switch to the previous user instead.

Test: manual verification (TestDpc/CtsVerifier) on car and phone
Test: atest com.android.cts.devicepolicy.DeviceOwnerTest#testCreateAndManageUser_LogoutUser
Bug: 204483021

Change-Id: I3ccbc1f31f8bcc4dae8fcb71cf5de7a7ad8882fe
2021-11-04 10:54:40 -07:00
Bill Yi
ba584f1fa1 Merge SP1A.211105.004 to aosp-master - DO NOT MERGE
Merged-In: I7e267e3c046d726750180efa81806cbbefb17b68
Merged-In: I5ff5973c95868bee2b7444ecded7443d6e6429c9
Change-Id: Ic3cd62083de4219dbf52f568ca4f34bdc7a08516
2021-11-02 21:07:53 -07:00
Mady Mellor
a641ccc607 Merge "Add locusId as something taskOrganizers care about" into sc-v2-dev am: 80a34bc07e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16168978

Change-Id: I3226fd2bfdfa54324e87f23d4aac8213c5bd849f
2021-11-03 00:56:08 +00:00
Mady Mellor
80a34bc07e Merge "Add locusId as something taskOrganizers care about" into sc-v2-dev 2021-11-03 00:47:12 +00:00
Mady Mellor
5468eedde5 Add locusId as something taskOrganizers care about
This ensures that a locusId change will trigger an
onTaskInfoChange immediately. Previously it would just
be sent with the next info change event which isn't
sufficient.

Test: atest NotificationManagerTest
Bug: 204260661
Change-Id: I2b53f63b6efd6d2c22a877b7c33f5a12832a8e1d
2021-11-02 15:31:41 -07:00
TreeHugger Robot
b1cde22071 Merge "Close ParcelFileDesciptor properly" into sc-v2-dev am: bae76ba745
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16084831

Change-Id: Ifc4e740a0b1576a7ae615d1b296aa2b3456ecd11
2021-11-02 10:17:20 +00:00
TreeHugger Robot
bae76ba745 Merge "Close ParcelFileDesciptor properly" into sc-v2-dev 2021-11-02 09:38:51 +00:00
lucaslin
5a21857ed0 Add new appOps to track the behavior of VPN app am: e89ec676a4 am: f050c4f072 am: 071b7b5ed8 am: 6a6fe48094
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1854373

Change-Id: I76590d495bc23efcb16b2dc2b1f68e49c469f70f
2021-11-01 09:36:52 +00:00
lucaslin
6a6fe48094 Add new appOps to track the behavior of VPN app am: e89ec676a4 am: f050c4f072 am: 071b7b5ed8
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1854373

Change-Id: I3f03cd91566c1c2aca478f42937ea5d09ff659ee
2021-11-01 09:20:36 +00:00
lucaslin
071b7b5ed8 Add new appOps to track the behavior of VPN app am: e89ec676a4 am: f050c4f072
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1854373

Change-Id: Ic141975cf5747210aae605f3fbe6cb72e1fa2ca0
2021-11-01 09:02:07 +00:00
lucaslin
f050c4f072 Add new appOps to track the behavior of VPN app am: e89ec676a4
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1854373

Change-Id: Id325da12dc7b08b05a9ca789dc655bd98bead967
2021-11-01 08:46:44 +00:00
Lucas Lin
357179542a Merge changes from topic "VPN_APPOPS"
* changes:
  Add startOp and finishOp to track the behavior of VPN app
  Add new appOps to track the behavior of VPN app
2021-11-01 08:33:36 +00:00
Felipe Leme
97e42e2785 Disabled some password-related APIs on automotive.
The APIs are deprecated (in favor of setRequiredPasswordComplexity())
and some automotive OEMs might not even provide the option to
set passwords (just PINs and patterns).

Fixes: 204252236

Test: atest CtsDevicePolicyTestCases:android.devicepolicy.cts.DeprecatedPasswordAPIsTest # on automotive and phone

Change-Id: I6272bdd0e893f6fd8f1d126d384d1b332e61bac2
2021-10-29 16:18:04 -07:00
Jonathan Scott
c8e719e4b5 Centralise owners for Enterprise Platform team.
This will allow us to point other directories at these files for OWNERS
and make it easier to update after future team changes.

Test: N/A
Bug: 202714830
Change-Id: Iaaf5b8eb7568be4ebfd1b30abae0b757153f0391
(cherry picked from commit 7443751dd9)
2021-10-28 12:00:08 -07:00