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

Commit 82997b7a authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Show scrimmed bouncer from BiometricUnlockCtrl" into sc-qpr1-dev

parents d00f2acc 80d6a378
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -485,7 +485,7 @@ public class BiometricUnlockController extends KeyguardUpdateMonitorCallback imp


    private void showBouncer() {
    private void showBouncer() {
        if (mMode == MODE_SHOW_BOUNCER) {
        if (mMode == MODE_SHOW_BOUNCER) {
            mKeyguardViewController.showBouncer(false);
            mKeyguardViewController.showBouncer(true);
        }
        }
        mShadeController.animateCollapsePanels(CommandQueue.FLAG_EXCLUDE_NONE, true /* force */,
        mShadeController.animateCollapsePanels(CommandQueue.FLAG_EXCLUDE_NONE, true /* force */,
                false /* delayed */, BIOMETRIC_COLLAPSE_SPEEDUP_FACTOR);
                false /* delayed */, BIOMETRIC_COLLAPSE_SPEEDUP_FACTOR);
+4 −4
Original line number Original line Diff line number Diff line
@@ -134,7 +134,7 @@ public class BiometricsUnlockControllerTest extends SysuiTestCase {
                .thenReturn(false);
                .thenReturn(false);
        mBiometricUnlockController.onBiometricAuthenticated(UserHandle.USER_CURRENT,
        mBiometricUnlockController.onBiometricAuthenticated(UserHandle.USER_CURRENT,
                BiometricSourceType.FINGERPRINT, true /* isStrongBiometric */);
                BiometricSourceType.FINGERPRINT, true /* isStrongBiometric */);
        verify(mStatusBarKeyguardViewManager).showBouncer(eq(false));
        verify(mStatusBarKeyguardViewManager).showBouncer(anyBoolean());
        verify(mStatusBarKeyguardViewManager, never()).notifyKeyguardAuthenticated(anyBoolean());
        verify(mStatusBarKeyguardViewManager, never()).notifyKeyguardAuthenticated(anyBoolean());
        assertThat(mBiometricUnlockController.getMode())
        assertThat(mBiometricUnlockController.getMode())
                .isEqualTo(BiometricUnlockController.MODE_SHOW_BOUNCER);
                .isEqualTo(BiometricUnlockController.MODE_SHOW_BOUNCER);
@@ -146,7 +146,7 @@ public class BiometricsUnlockControllerTest extends SysuiTestCase {
                .thenReturn(false);
                .thenReturn(false);
        mBiometricUnlockController.onBiometricAuthenticated(UserHandle.USER_CURRENT,
        mBiometricUnlockController.onBiometricAuthenticated(UserHandle.USER_CURRENT,
                BiometricSourceType.FINGERPRINT, false /* isStrongBiometric */);
                BiometricSourceType.FINGERPRINT, false /* isStrongBiometric */);
        verify(mStatusBarKeyguardViewManager).showBouncer(eq(false));
        verify(mStatusBarKeyguardViewManager).showBouncer(anyBoolean());
        verify(mShadeController).animateCollapsePanels(anyInt(), anyBoolean(), anyBoolean(),
        verify(mShadeController).animateCollapsePanels(anyInt(), anyBoolean(), anyBoolean(),
                anyFloat());
                anyFloat());
        assertThat(mBiometricUnlockController.getMode())
        assertThat(mBiometricUnlockController.getMode())
@@ -265,10 +265,10 @@ public class BiometricsUnlockControllerTest extends SysuiTestCase {
                BiometricSourceType.FACE, true /* isStrongBiometric */);
                BiometricSourceType.FACE, true /* isStrongBiometric */);


        // Wake up before showing the bouncer
        // Wake up before showing the bouncer
        verify(mStatusBarKeyguardViewManager, never()).showBouncer(eq(false));
        verify(mStatusBarKeyguardViewManager, never()).showBouncer(anyBoolean());
        mBiometricUnlockController.mWakefulnessObserver.onFinishedWakingUp();
        mBiometricUnlockController.mWakefulnessObserver.onFinishedWakingUp();


        verify(mStatusBarKeyguardViewManager).showBouncer(eq(false));
        verify(mStatusBarKeyguardViewManager).showBouncer(anyBoolean());
        assertThat(mBiometricUnlockController.getMode())
        assertThat(mBiometricUnlockController.getMode())
                .isEqualTo(BiometricUnlockController.MODE_SHOW_BOUNCER);
                .isEqualTo(BiometricUnlockController.MODE_SHOW_BOUNCER);
    }
    }