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

Commit 9254a1f4 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Don't collapse the shade when SHOW_BOUNCER" into tm-qpr-dev am: 693e5f6d

parents b8af724f 693e5f6d
Loading
Loading
Loading
Loading
+11 −37
Original line number Diff line number Diff line
@@ -177,7 +177,6 @@ public class BiometricUnlockController extends KeyguardUpdateMonitorCallback imp
    private KeyguardViewMediator mKeyguardViewMediator;
    private ScrimController mScrimController;
    private PendingAuthenticated mPendingAuthenticated = null;
    private boolean mPendingShowBouncer;
    private boolean mHasScreenTurnedOnSinceAuthenticating;
    private boolean mFadedAwayAfterWakeAndUnlock;
    private BiometricModeListener mBiometricModeListener;
@@ -474,9 +473,6 @@ public class BiometricUnlockController extends KeyguardUpdateMonitorCallback imp
                break;
            case MODE_UNLOCK_COLLAPSING:
                Trace.beginSection("MODE_UNLOCK_COLLAPSING");
                if (!wasDeviceInteractive) {
                    mPendingShowBouncer = true;
                } else {
                // If the keyguard unlock controller is going to handle the unlock animation, it
                // will fling the panel collapsed when it's ready.
                if (!mKeyguardUnlockAnimationController.willHandleUnlockAnimation()) {
@@ -486,19 +482,13 @@ public class BiometricUnlockController extends KeyguardUpdateMonitorCallback imp
                            false /* delayed */,
                            BIOMETRIC_COLLAPSE_SPEEDUP_FACTOR);
                }
                    mPendingShowBouncer = false;
                mKeyguardViewController.notifyKeyguardAuthenticated(
                        false /* strongAuth */);
                }
                Trace.endSection();
                break;
            case MODE_SHOW_BOUNCER:
                Trace.beginSection("MODE_SHOW_BOUNCER");
                if (!wasDeviceInteractive) {
                    mPendingShowBouncer = true;
                } else {
                    showBouncer();
                }
                mKeyguardViewController.showBouncer(true);
                Trace.endSection();
                break;
            case MODE_WAKE_AND_UNLOCK_FROM_DREAM:
@@ -536,15 +526,6 @@ public class BiometricUnlockController extends KeyguardUpdateMonitorCallback imp
        }
    }

    private void showBouncer() {
        if (mMode == MODE_SHOW_BOUNCER) {
            mKeyguardViewController.showBouncer(true);
        }
        mShadeController.animateCollapsePanels(CommandQueue.FLAG_EXCLUDE_NONE, true /* force */,
                false /* delayed */, BIOMETRIC_COLLAPSE_SPEEDUP_FACTOR);
        mPendingShowBouncer = false;
    }

    public boolean hasPendingAuthentication() {
        return mPendingAuthenticated != null
                && mUpdateMonitor
@@ -770,13 +751,6 @@ public class BiometricUnlockController extends KeyguardUpdateMonitorCallback imp
    @VisibleForTesting
    final WakefulnessLifecycle.Observer mWakefulnessObserver =
            new WakefulnessLifecycle.Observer() {
                @Override
                public void onFinishedWakingUp() {
                    if (mPendingShowBouncer) {
                        BiometricUnlockController.this.showBouncer();
                    }
                }

                @Override
                public void onStartedGoingToSleep() {
                    resetMode();
+0 −6
Original line number Diff line number Diff line
@@ -167,8 +167,6 @@ public class BiometricsUnlockControllerTest extends SysuiTestCase {
        mBiometricUnlockController.onBiometricAuthenticated(UserHandle.USER_CURRENT,
                BiometricSourceType.FINGERPRINT, false /* isStrongBiometric */);
        verify(mStatusBarKeyguardViewManager).showBouncer(anyBoolean());
        verify(mShadeController).animateCollapsePanels(anyInt(), anyBoolean(), anyBoolean(),
                anyFloat());
        assertThat(mBiometricUnlockController.getMode())
                .isEqualTo(BiometricUnlockController.MODE_SHOW_BOUNCER);
        assertThat(mBiometricUnlockController.getBiometricType())
@@ -298,10 +296,6 @@ public class BiometricsUnlockControllerTest extends SysuiTestCase {
        mBiometricUnlockController.onBiometricAuthenticated(UserHandle.USER_CURRENT,
                BiometricSourceType.FACE, true /* isStrongBiometric */);

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

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