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

Commit 80d6a378 authored by Beverly's avatar Beverly Committed by Beverly Tai
Browse files

Show scrimmed bouncer from BiometricUnlockCtrl

Test: manual
Test: atest BiometrisUnlockControllerTest
Fixes: 206423147
Bug: 205556311
Change-Id: Ib3def01e7ffd04ac950f06cbee7d213927110b5b
(cherry picked from commit 7c64f2cd)
Merged-In: Ib3def01e7ffd04ac950f06cbee7d213927110b5b
parent 8e58b1cc
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -485,7 +485,7 @@ public class BiometricUnlockController extends KeyguardUpdateMonitorCallback imp

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

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

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