Commit Graph

21621 Commits

Author SHA1 Message Date
TreeHugger Robot
5330e7f8e4 Merge "Properly remove local color areas of callback" into sc-v2-dev am: eb57e090bc
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16332363

Change-Id: Ic1d9afedbb9b6dbfa85aa8671e7995b09bf3daf9
2021-12-01 22:08:49 +00:00
Jay Aliomer
2eaae4e670 Properly remove local color areas of callback
Refactored to system server to the repository pattern
added locks to the WallpaperManager

Fixes: 206632865
Test: manual
Change-Id: Icc73c18e34042ae48e338b03dc3e94fee5d6939d
2021-12-01 19:25:38 +00:00
Jordan Demeulenaere
9797237337 Refactor DialogLaunchAnimator and remove host dialog (1/2) am: c424d4801f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16346347

Change-Id: I2939d13b5d59405b2dcd45e5eac0ff936bfe1446
2021-12-01 13:43:40 +00:00
Jordan Demeulenaere
c424d4801f Refactor DialogLaunchAnimator and remove host dialog (1/2)
This CL is a refactoring of the DialogLaunchAnimator and a major change
in how it works internally.

Before this CL, when DialogLaunchAnimator.show(originalDialog, ...) was
called, it would create a fullscreen dialog (called hostDialog) to
which we would add the content view stolen from the originalDialog (that
would then be hidden). We would then run the launch animation in the
host dialog and listen for show(), hide() or dismiss() calls to the
originalDialog to know when we should show(), hide() or dismiss() the
hostDialog.

The main reason we did that was because there was no way to override the
dismiss() behavior of the originalDialog, which we need to do given that
we want to animate the dialog into the view that showed the dialog
before actually dismissing it.

This approach had multiple downsides:
 - We were showing the dialog content view inside a different window
   than the one in which it was created, therefore any change made to or
   any listener added to the originalDialog window was lost.
 - Code calling DialogLaunchAnimator.showFromView needed to know that
   their dialog content will be moved to another window, which is
   unexpected and can lead to subtle bugs.
 - We were waiting for 2 dialogs to be shown instead of 1 before being
   able to start the animation.

This CL does what we should have done since the beginning: it adds a
hidden API to Dialog so that we can override what happens when
Dialog.dismiss() is called. This allows the DialogLaunchAnimator to run
the exit animation into the view that triggered the dialog before
actually dismissing it. The only modification that
DialogLaunchAnimator.show(originalDialog, ...) now does to the
originalDialog is making its window fullscreen and inserting two views
between the originalDialog DecorView and its children. The first
inserted view is a fullscreen transparent background used to dismiss the
dialog when the user taps outside the dialog content. The second
inserted view is a View that we size and position the same way that the
DecorView was before we made it fullscreen, and to which we set the
originalDialog background. This view now serves as a "fake window" with
the same size, background and position as the original window
(DecorView).

This CL improves the time to start the launch animation by 20-25%
(measured in a totally unrigorous logcat way).

Bug: 193634619
Test: atest DialogLaunchAnimatorTest
Change-Id: If09eda7b06e83b3ed7714cec97afef08b3d9fd3e
2021-12-01 10:53:23 +01:00
Makoto Onuki
9a6b5025ce Merge "ForegroundServiceDidNotStartInTimeException now has..." into sc-v2-dev am: b344d33561
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16288923

Change-Id: I3c126dd07f78fe8c464dcb7114ea2511925c72e4
2021-11-30 16:47:10 +00:00
Makoto Onuki
b344d33561 Merge "ForegroundServiceDidNotStartInTimeException now has..." into sc-v2-dev 2021-11-30 16:28:24 +00:00
Felipe Leme
210ec75126 Merge "Added AM APIs to get switch from / to user messages." into sc-v2-dev am: 7df16f2d42
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16289546

Change-Id: I09e8d32e4f4f07918b9e4cd052c81e4237103231
2021-11-23 00:37:14 +00:00
Felipe Leme
7df16f2d42 Merge "Added AM APIs to get switch from / to user messages." into sc-v2-dev 2021-11-23 00:25:49 +00:00
Felipe Leme
4ce8bf537d Added AM APIs to get switch from / to user messages.
Test: adb shell dumpsys activity users|grep mSwitching
Fixes: 206873264

Change-Id: I1e5e3ab26c31bad8190037f22d4fbad2947d9d22
2021-11-22 22:11:22 +00:00
Charles Chen
cb89941f83 [RESTRICT AUTOMERGE] Associate SystemUiContext with DisplayContent am: 082403816a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16259164

Change-Id: I5f4fa53bdd66b01d491a7c1ac6dbac1e8ce2bc9e
2021-11-22 06:42:43 +00:00
Charles Chen
83d6490629 Merge "[RESTRICT AUTOMERGE] Associate SystemUiContext with DisplayContent" into sc-v2-dev 2021-11-22 06:29:28 +00:00
TreeHugger Robot
3e7d377cf7 Merge "Javadoc changes for additional DPC-settable extras" into sc-v2-dev am: 34a0dd0d91
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16197801

Change-Id: I3f896a4d5988510b72b1e3b6566ccff0f85e44f6
2021-11-19 09:55:25 +00:00
TreeHugger Robot
34a0dd0d91 Merge "Javadoc changes for additional DPC-settable extras" into sc-v2-dev 2021-11-19 09:38:28 +00:00
Beth Thibodeau
f784affa98 Merge "Check media session token type" into sc-v2-dev am: 313b9e923d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16250175

Change-Id: I99e4e1afb185a53f1b15c4a156b18f674b63520e
2021-11-18 23:58:18 +00:00
Beth Thibodeau
313b9e923d Merge "Check media session token type" into sc-v2-dev 2021-11-18 23:43:21 +00:00
Peiyong Lin
0f14b251a5 Merge "Add owners for GameManager and GameManagerService" am: 6e9b910de2 am: 3afdacc87b am: 9e526c1d91
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1896952

Change-Id: Ic2bc74de3241c56a8805ef72be2d1391d1ec11e3
2021-11-18 23:23:32 +00:00
Peiyong Lin
9e526c1d91 Merge "Add owners for GameManager and GameManagerService" am: 6e9b910de2 am: 3afdacc87b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1896952

Change-Id: Ic5c758c011bf2a98db0d6393b288d058f71dfba8
2021-11-18 23:04:05 +00:00
Peiyong Lin
3afdacc87b Merge "Add owners for GameManager and GameManagerService" am: 6e9b910de2
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1896952

Change-Id: I743b627784dd5b39cfd645fe41eb67bd5587acf0
2021-11-18 22:47:30 +00:00
Peiyong Lin
ab0ae6b571 Add owners for GameManager and GameManagerService
Bug: N/A
Test: N/A
Change-Id: I48f986e1ca5eadc6c23ca693143f122e415eeefd
2021-11-18 18:25:14 +00:00
Xin Li
10d9972786 Merge sc-qpr1-dev-plus-aosp-without-vendor@7810918
Bug: 205056467
Merged-In: I13199bc39e9445929195f3d15579cbffe94e92b0
Change-Id: I35fa3c6c2abf679c51033f1395a08d511ed8739f
2021-11-18 17:00:37 +00:00
Makoto Onuki
45f4b4aaa5 ForegroundServiceDidNotStartInTimeException now has...
an inner exception that captures the stacktrace where
Context.startForegroundService() was called last time,
from the same process.

Bug: 124137635
Test: Manual test with a tesapp. 1: when startForegroundService() is called by
the same process:
```
11-17 17:00:12.483 10241  9545  9545 E AndroidRuntime: FATAL EXCEPTION: main
11-17 17:00:12.483 10241  9545  9545 E AndroidRuntime: Process: com.google.omakoto.testapp, PID: 9545
11-17 17:00:12.483 10241  9545  9545 E AndroidRuntime: android.app.RemoteServiceException$ForegroundServiceDidNotStartInTimeException: Context.startForegroundService() did not then call Service.startForeground(): ServiceRecord{e7674af u0 com.google.omakoto.testapp/.MyFgs3}
11-17 17:00:12.483 10241  9545  9545 E AndroidRuntime: 	at android.app.ActivityThread.generateForegroundServiceDidNotStartInTimeException(ActivityThread.java:1965)
11-17 17:00:12.483 10241  9545  9545 E AndroidRuntime: 	at android.app.ActivityThread.throwRemoteServiceException(ActivityThread.java:1934)
11-17 17:00:12.483 10241  9545  9545 E AndroidRuntime: 	at android.app.ActivityThread.access$2700(ActivityThread.java:255)
11-17 17:00:12.483 10241  9545  9545 E AndroidRuntime: 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2190)
11-17 17:00:12.483 10241  9545  9545 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:106)
11-17 17:00:12.483 10241  9545  9545 E AndroidRuntime: 	at android.os.Looper.loopOnce(Looper.java:201)
11-17 17:00:12.483 10241  9545  9545 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:288)
11-17 17:00:12.483 10241  9545  9545 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:7839)
11-17 17:00:12.483 10241  9545  9545 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
11-17 17:00:12.483 10241  9545  9545 E AndroidRuntime: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
11-17 17:00:12.483 10241  9545  9545 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
11-17 17:00:12.483 10241  9545  9545 E AndroidRuntime: Caused by: android.app.StackTrace: Last startServiceCommon() call for this service was made here
11-17 17:00:12.483 10241  9545  9545 E AndroidRuntime: 	at android.app.ContextImpl.startServiceCommon(ContextImpl.java:1868)
11-17 17:00:12.483 10241  9545  9545 E AndroidRuntime: 	at android.app.ContextImpl.startForegroundService(ContextImpl.java:1823)
11-17 17:00:12.483 10241  9545  9545 E AndroidRuntime: 	at android.content.ContextWrapper.startForegroundService(ContextWrapper.java:779)
11-17 17:00:12.483 10241  9545  9545 E AndroidRuntime: 	at android.content.ContextWrapper.startForegroundService(ContextWrapper.java:779)
11-17 17:00:12.483 10241  9545  9545 E AndroidRuntime: 	at com.google.omakoto.testapp.MyReceiver.onReceive(MyReceiver.java:53)
11-17 17:00:12.483 10241  9545  9545 E AndroidRuntime: 	at android.app.ActivityThread.handleReceiver(ActivityThread.java:4345)
11-17 17:00:12.483 10241  9545  9545 E AndroidRuntime: 	at android.app.ActivityThread.access$1600(ActivityThread.java:255)
11-17 17:00:12.483 10241  9545  9545 E AndroidRuntime: 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2102)
11-17 17:00:12.483 10241  9545  9545 E AndroidRuntime: 	... 7 more
```

Test: Manual test with a tesapp. 1: when startForegroundService() is called by
another process:
```
11-17 16:59:34.456 10241  9432  9432 E AndroidRuntime: FATAL EXCEPTION: main
11-17 16:59:34.456 10241  9432  9432 E AndroidRuntime: Process: com.google.omakoto.testapp:second, PID: 9432
11-17 16:59:34.456 10241  9432  9432 E AndroidRuntime: android.app.RemoteServiceException$ForegroundServiceDidNotStartInTimeException: Context.startForegroundService() did not then call Service.startForeground(): ServiceRecord{dcaa127 u0 com.google.omakoto.testapp/.MyFgs3}
11-17 16:59:34.456 10241  9432  9432 E AndroidRuntime: 	at android.app.ActivityThread.generateForegroundServiceDidNotStartInTimeException(ActivityThread.java:1965)
11-17 16:59:34.456 10241  9432  9432 E AndroidRuntime: 	at android.app.ActivityThread.throwRemoteServiceException(ActivityThread.java:1934)
11-17 16:59:34.456 10241  9432  9432 E AndroidRuntime: 	at android.app.ActivityThread.access$2700(ActivityThread.java:255)
11-17 16:59:34.456 10241  9432  9432 E AndroidRuntime: 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2190)
11-17 16:59:34.456 10241  9432  9432 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:106)
11-17 16:59:34.456 10241  9432  9432 E AndroidRuntime: 	at android.os.Looper.loopOnce(Looper.java:201)
11-17 16:59:34.456 10241  9432  9432 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:288)
11-17 16:59:34.456 10241  9432  9432 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:7839)
11-17 16:59:34.456 10241  9432  9432 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
11-17 16:59:34.456 10241  9432  9432 E AndroidRuntime: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
11-17 16:59:34.456 10241  9432  9432 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
```

Change-Id: I2dd8ec76213d53728eaa8fcc3760813d82a328a5
2021-11-18 07:54:26 -08:00
Charles Chen
082403816a [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
Bug: 205859784
Test: atest InputMethodMenuControllerTest WindowContextControllerTest
Test: atest NexusLauncherTests

Change-Id: I64a1614f32d097785915f6105b1813a929e0fe32
2021-11-18 22:44:59 +08: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
Beth Thibodeau
e91aa6cb7d Check media session token type
When checking whether a notification has a media session, make sure that
the value in the extra is the correct type.

In addition, moves this check inside of
Notification#isMediaNotification for consistency - existing usages either
already checked both or will not be impacted, given that valid MediaStyle
notifications are now shown in the media carousel instead of with other
notifications in the shade.

Fixes: 205570941
Test: atest
Test: manual, repro case in bug
Change-Id: I5d0134d2ce81e9e6a2ed16748f84252bf765a1c9
2021-11-17 11:18:35 -05: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