Reset keyguardGoingAway status when AOD is showing.

Bug: 237391074
Test: manual
  1. goto lock screen and show AOD
  2. touch fingerprint sensor to unlock the device
  3. as soon as fingerprint sensor reacts, push power button.
  4. see output of `adb logcat -b events` and verify keyguardGoingAway
     state is reset after SysUI requests to show both lockscreen and
     AOD.
Change-Id: Ibeac8ac92ce51f4fc2aa9cb123812f7ce1cc4b0c
This commit is contained in:
Issei Suzuki
2022-07-13 15:23:41 +00:00
parent 9aebc35d8a
commit de8442bc48

View File

@@ -170,11 +170,12 @@ class KeyguardController {
final KeyguardDisplayState state = getDisplayState(displayId);
final boolean aodChanged = aodShowing != state.mAodShowing;
final boolean aodRemoved = state.mAodShowing && !aodShowing;
// If keyguard is going away, but SystemUI aborted the transition, need to reset state.
// Do not reset keyguardChanged status if this is aodChanged.
// Do not reset keyguardChanged status when only AOD is removed.
final boolean keyguardChanged = (keyguardShowing != state.mKeyguardShowing)
|| (state.mKeyguardGoingAway && keyguardShowing && !aodChanged);
if (aodChanged && !aodShowing) {
|| (state.mKeyguardGoingAway && keyguardShowing && !aodRemoved);
if (aodRemoved) {
updateDeferWakeTransition(false /* waiting */);
}
if (!keyguardChanged && !aodChanged) {