diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBypassController.kt b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBypassController.kt index 56b64dfff7ac8..4be4d908979f2 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBypassController.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBypassController.kt @@ -33,20 +33,23 @@ class KeyguardBypassController { private val unlockMethodCache: UnlockMethodCache private val statusBarStateController: StatusBarStateController - lateinit var unlockController: BiometricUnlockController - var isPulseExpanding = false - - /** - * If face unlock dismisses the lock screen or keeps user on keyguard for the current user. - */ - var bypassEnabled: Boolean = false - get() = field && unlockMethodCache.isUnlockingWithFacePossible - private set /** * The pending unlock type which is set if the bypass was blocked when it happened. */ private var pendingUnlockType: BiometricSourceType? = null + lateinit var unlockController: BiometricUnlockController + var isPulseExpanding = false + + /** + * If face unlock dismisses the lock screen or keeps user on keyguard for the current user. + */ + var bypassEnabled: Boolean = false + get() = field && unlockMethodCache.isUnlockingWithFacePossible + private set + + var bouncerShowing: Boolean = false + @Inject constructor(context: Context, tunerService: TunerService, statusBarStateController: StatusBarStateController) { @@ -85,6 +88,11 @@ class KeyguardBypassController { */ fun onBiometricAuthenticated(biometricSourceType: BiometricSourceType): Boolean { if (bypassEnabled) { + if (bouncerShowing) { + // Whenever the bouncer is showing, we want to unlock. Otherwise we can get stuck + // in the shade locked where the bouncer wouldn't unlock + return true + } if (statusBarStateController.state != StatusBarState.KEYGUARD) { // We're bypassing but not actually on the lockscreen, the user should decide when // to unlock diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java index 09024842a586b..2d4c1aa0e1791 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java @@ -3571,6 +3571,7 @@ public class StatusBar extends SystemUI implements DemoMode, */ public void setBouncerShowing(boolean bouncerShowing) { mBouncerShowing = bouncerShowing; + mKeyguardBypassController.setBouncerShowing(bouncerShowing); if (mStatusBarView != null) mStatusBarView.setBouncerShowing(bouncerShowing); updateHideIconsForBouncer(true /* animate */); mCommandQueue.recomputeDisableFlags(mDisplayId, true /* animate */);