diff options
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java | 1 | ||||
| -rw-r--r-- | packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/KeyguardBouncerTest.java | 10 |
2 files changed, 11 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java index 0001cd0a2798..d380e9f03720 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java @@ -220,6 +220,7 @@ public class KeyguardBouncer { && !mKeyguardUpdateMonitor.getCachedIsUnlockWithFingerprintPossible( KeyguardUpdateMonitor.getCurrentUser()) && !needsFullscreenBouncer() + && !mKeyguardUpdateMonitor.isFaceLockedOut() && !mKeyguardUpdateMonitor.userNeedsStrongAuth() && !mKeyguardBypassController.getBypassEnabled()) { mHandler.postDelayed(mShowRunnable, BOUNCER_FACE_DELAY); diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/KeyguardBouncerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/KeyguardBouncerTest.java index 60a3d95e24f6..ab209d130b2f 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/KeyguardBouncerTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/KeyguardBouncerTest.java @@ -408,6 +408,16 @@ public class KeyguardBouncerTest extends SysuiTestCase { mBouncer.hide(false /* destroyView */); verify(mHandler).removeCallbacks(eq(showRunnable.getValue())); } + + @Test + public void testShow_doesNotDelaysIfFaceAuthIsLockedOut() { + when(mKeyguardStateController.isFaceAuthEnabled()).thenReturn(true); + when(mKeyguardUpdateMonitor.isFaceLockedOut()).thenReturn(true); + mBouncer.show(true /* reset */); + + verify(mHandler, never()).postDelayed(any(), anyLong()); + } + @Test public void testShow_delaysIfFaceAuthIsRunning_unlessBypassEnabled() { when(mKeyguardStateController.isFaceAuthEnabled()).thenReturn(true); |