Clear ActivityRecord#mDismissKeyguard flag after app launches.

This flag is used by the SysUI to dismiss an insecure keyguard
when an app is launched from an insecure lock screen. The flag
should only affect the app launch once, so needs to be cleared
once the flag is processed.

Bug: 234583880
Test: atest KeyguardTests#testDismissKeyguard_fromActivityOption_onlyOnce
Change-Id: Ia4179b40de7d45b2199b175a6dcc24016dfba091
(cherry picked from commit 41cbf49af7)
This commit is contained in:
Issei Suzuki
2022-06-08 10:27:31 +00:00
parent 811c0f0b02
commit e12c8f5de3
2 changed files with 1 additions and 1 deletions

View File

@@ -7343,7 +7343,6 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
mTransit = TRANSIT_OLD_UNSET;
mTransitFlags = 0;
mNeedsAnimationBoundsLayer = false;
mDismissKeyguard = false;
setAppLayoutChanges(FINISH_LAYOUT_REDO_ANIM | FINISH_LAYOUT_REDO_WALLPAPER,
"ActivityRecord");

View File

@@ -595,6 +595,7 @@ class KeyguardController {
} else if (top.canShowWhenLocked()) {
mTopOccludesActivity = top;
}
top.mDismissKeyguard = false;
// Only the top activity may control occluded, as we can't occlude the Keyguard
// if the top app doesn't want to occlude it.