Don't reset the keyguard if it's going away.
If we re-lock the keyguard *while* it's unlocking, we end up in a state where the AOD UI is visible, but we are not actually locked and can unlock the device with no authentication. This is possible with and without remote animations enabled, but is easier to trigger when they're enabled. "Keyguard reset" is done if we go to sleep while the keyguard is showing, and causes the keyguard views to be reset. This is not sufficient if the keyguard is going away as it should be re-shown instead of only reset. Fixes: 210705299 Test: atest SystemUITests Test: interrupt unlock by locking again, verify the device is actually locked Change-Id: Ie7aeab50cdd8fb6e3a79f6ef1e0cb21ca61d665d
This commit is contained in:
@@ -1025,7 +1025,10 @@ public class KeyguardViewMediator extends SystemUI implements Dumpable,
|
||||
if (!mExternallyEnabled) {
|
||||
hideLocked();
|
||||
}
|
||||
} else if (mShowing) {
|
||||
} else if (mShowing && !mKeyguardStateController.isKeyguardGoingAway()) {
|
||||
// If we are going to sleep but the keyguard is showing (and will continue to be
|
||||
// showing, not in the process of going away) then reset its state. Otherwise, let
|
||||
// this fall through and explicitly re-lock the keyguard.
|
||||
mPendingReset = true;
|
||||
} else if (
|
||||
(offReason == WindowManagerPolicyConstants.OFF_BECAUSE_OF_TIMEOUT
|
||||
|
||||
Reference in New Issue
Block a user