From e2c9cafe056dcec7bccb65ee1336250d018cdda4 Mon Sep 17 00:00:00 2001 From: Matt Pietal Date: Thu, 10 Mar 2022 09:23:53 -0500 Subject: [PATCH] Fix UDFPS unlock while waking with occlusion UDFPS unlock while sleeping enters mode WAKE_AND_UNLOCK_PULSING, which depends on delayed callback to hide the UDFPS overlay. This was being canceled by a call to cancelAnimation from hideKeyguardImpl(), which can be triggered multiple times. I can't find any harm in remove this call to cancel. Bug: 223088536 Test: Follow steps in bug Change-Id: Id243c9a89bc3e281562169cf3c727d72fcfe10af --- .../systemui/statusbar/phone/CentralSurfaces.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfaces.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfaces.java index a7f950eaf167f..ec2d608b26833 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfaces.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfaces.java @@ -2881,8 +2881,7 @@ public class CentralSurfaces extends CoreStartable implements } boolean updateIsKeyguard(boolean forceStateChange) { - boolean wakeAndUnlocking = mBiometricUnlockController.getMode() - == BiometricUnlockController.MODE_WAKE_AND_UNLOCK; + boolean wakeAndUnlocking = mBiometricUnlockController.isWakeAndUnlock(); // For dozing, keyguard needs to be shown whenever the device is non-interactive. Otherwise // there's no surface we can show to the user. Note that the device goes fully interactive @@ -2892,7 +2891,7 @@ public class CentralSurfaces extends CoreStartable implements && (!mDeviceInteractive || (isGoingToSleep() && (isScreenFullyOff() || (mKeyguardStateController.isShowing() && !isOccluded())))); - boolean isWakingAndOccluded = isOccluded() && isWaking(); + boolean isWakingAndOccluded = isOccluded() && isWakingOrAwake(); boolean shouldBeKeyguard = (mStatusBarStateController.isKeyguardRequested() || keyguardForDozing) && !wakeAndUnlocking && !isWakingAndOccluded; if (keyguardForDozing) { @@ -3076,7 +3075,6 @@ public class CentralSurfaces extends CoreStartable implements mMessageRouter.cancelMessages(MSG_LAUNCH_TRANSITION_TIMEOUT); releaseGestureWakeLock(); mNotificationPanelViewController.onAffordanceLaunchEnded(); - mNotificationPanelViewController.cancelAnimation(); mNotificationPanelViewController.resetAlpha(); mNotificationPanelViewController.resetTranslation(); mNotificationPanelViewController.resetViewGroupFade(); @@ -3702,8 +3700,9 @@ public class CentralSurfaces extends CoreStartable implements == WakefulnessLifecycle.WAKEFULNESS_GOING_TO_SLEEP; } - boolean isWaking() { - return mWakefulnessLifecycle.getWakefulness() == WakefulnessLifecycle.WAKEFULNESS_WAKING; + boolean isWakingOrAwake() { + return mWakefulnessLifecycle.getWakefulness() == WakefulnessLifecycle.WAKEFULNESS_WAKING + || mWakefulnessLifecycle.getWakefulness() == WakefulnessLifecycle.WAKEFULNESS_AWAKE; } public void notifyBiometricAuthModeChanged() {