Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fcbb9f98 authored by Chandru S's avatar Chandru S Committed by Android (Google) Code Review
Browse files

Merge "Do not delay bouncer for running face auth if face unlock is locked out." into tm-qpr-dev

parents 16770a53 59adb290
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -220,6 +220,7 @@ public class KeyguardBouncer {
                    && !mKeyguardUpdateMonitor.getCachedIsUnlockWithFingerprintPossible(
                            KeyguardUpdateMonitor.getCurrentUser())
                    && !needsFullscreenBouncer()
                    && !mKeyguardUpdateMonitor.isFaceLockedOut()
                    && !mKeyguardUpdateMonitor.userNeedsStrongAuth()
                    && !mKeyguardBypassController.getBypassEnabled()) {
                mHandler.postDelayed(mShowRunnable, BOUNCER_FACE_DELAY);
+10 −0
Original line number Diff line number Diff line
@@ -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);