Commit Graph

22246 Commits

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

Change-Id: I0b67b009bf110b56fdb86778213092f15e758fab
2021-11-17 18:18:24 +00:00
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
Xiaowen Lei
c62495431d Merge "Add OWNERS file for app/communal." 2021-11-17 17:25:37 +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
Makoto Onuki
15b2e036ee Merge "Add new APIs to android.os.Process" 2021-11-16 22:10:35 +00:00
Makoto Onuki
13f2f6a511 Add new APIs to android.os.Process
- APIs the get the current process name
- APIs to get the process start "request" time

Fix: 205629074
Fix: 205337677
Test: atest CtsProcessTest

Change-Id: Id284fa169eb303011cdade6c3ab96e7026654612
2021-11-15 15:37:37 -08:00
Xiaowen Lei
3bb6b5e717 Move ALLOW_COMMUNAL_MODE_* constants into CommunalManager.java.
Test: atest FrameworksMockingServicesTests:CommunalManagerServiceTest

Bug: 198325535
Change-Id: Iebd18230b1a4d25a5c5c186337cb0019944e6c0f
2021-11-15 23:14:15 +00:00
TreeHugger Robot
0216e279ef Merge "New hidden DPM methods: getLogoutUserId() and clearLogoutUser()." into sc-v2-dev am: b3137b3b86 am: 3740f52ea4
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16245093

Change-Id: I5e5355fbde455ba76b8c98f64f6414fac3947822
2021-11-13 01:49:54 +00: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
2e99dcc4c6 Merge "Fixed permisssions on setStopBackgroundUsersOnSwitch()." into sc-v2-dev am: 174e83c8ec am: 2484637c43
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16224123

Change-Id: I33f260272ab37e39b0721a2743e8bb9b1b81af83
2021-11-12 18:40:57 +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
Xiaowen Lei
ec026955fa Add OWNERS file for app/communal.
This directory was added by lusila@ in ag/16006734. Adding an OWNERS
doesn't bypass API council requirement; It just helps with the +2.

Test: none

Ignore-AOSP-First: Feature not yet in AOSP.

Change-Id: I7e2f2d0ad44a325b25eebfa0e18777e137274817
2021-11-12 01:18:39 +00: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
TreeHugger Robot
20d9c1fc36 Merge "Don't allow background apps to change theme" 2021-11-11 18:28:18 +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
Lucas Dupin
04d4c04019 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
2021-11-11 00:12:24 +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
Varun Shah
c755331c56 Merge "Update deletion conditions for a package's UsageStats." 2021-11-10 16:51:41 +00:00
Pratyush More
e0eb65ed7b Merge changes I1bada812,Ia50e462d
* changes:
  Automatically run LocaleManager CTS cases for relevant changes.
  Automatically run LocaleManager CTS cases for relevant changes.
2021-11-10 09:04: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
TreeHugger Robot
76b1869613 Merge "Renamed setStopBackgroundUsersOnSwitch to setStopUserOnSwitch()" 2021-11-09 22:33:40 +00:00
Chris Tate
b06e91906a Merge "Infra for SysUI to monitor FGSes" 2021-11-09 18:48:37 +00:00
Pratyush More
2e02b9d131 Automatically run LocaleManager CTS cases for relevant changes.
Bug: 204997398
Test: Manual
Change-Id: I1bada8125e6958635abbd85149c3b8a6a9c21df9
2021-11-09 17:30:25 +00:00
Ankita Vyas
6773eb3208 Merge "Add APIs for supporting app-specific locale configurations." 2021-11-09 10:04:16 +00:00
Varun Shah
9af940970d 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
2021-11-08 17:55:31 -08:00
Felipe Leme
f2f7318228 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

Change-Id: Iea03164319768abf159bf8ae2ccc539620cb30fe
2021-11-08 16:32:50 -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
TreeHugger Robot
da0bba543d Merge changes Ia0726197,I3698d82d
* changes:
  Update documentation
  Add package to DND alarm broadcast
2021-11-08 23:30:12 +00:00
Aleks Todorov
3ea95bee3d Merge "Fix DevicePolicyManager#getDefaultCrossProfilePackages referring to user consent." 2021-11-08 15:36:01 +00: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
Ameer Armaly
927b5744d1 Merge "Add TouchInteractionController API to allow gesture detection from the service." 2021-11-05 22:23:39 +00:00
Christopher Tate
59ee488c49 Infra for SysUI to monitor FGSes
There's now a way for it to track what apps currently have services in
the FGS state in real time.

Bug: 192504071
Test: manual
Test: atest CtsAppTestCases:android.app.cts.ServiceTest
Ignore-AOSP-First: new API should not be revealed in AOSP prior to drop
Change-Id: Ief1b6f8ef7deba6abbbf42f20b3f498861c1fe69
2021-11-05 14:42:42 -07:00