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

Commit 8f35f7b0 authored by Beverly Tai's avatar Beverly Tai Committed by Android (Google) Code Review
Browse files

Merge "Remove ScrimController from BiometricUnlockController"

parents 243e8c66 87245987
Loading
Loading
Loading
Loading
+2 −10
Original line number Diff line number Diff line
@@ -157,7 +157,6 @@ public class BiometricUnlockController extends KeyguardUpdateMonitorCallback imp
    private KeyguardViewController mKeyguardViewController;
    private DozeScrimController mDozeScrimController;
    private KeyguardViewMediator mKeyguardViewMediator;
    private ScrimController mScrimController;
    private PendingAuthenticated mPendingAuthenticated = null;
    private boolean mHasScreenTurnedOnSinceAuthenticating;
    private boolean mFadedAwayAfterWakeAndUnlock;
@@ -256,7 +255,7 @@ public class BiometricUnlockController extends KeyguardUpdateMonitorCallback imp
    @Inject
    public BiometricUnlockController(
            DozeScrimController dozeScrimController,
            KeyguardViewMediator keyguardViewMediator, ScrimController scrimController,
            KeyguardViewMediator keyguardViewMediator,
            NotificationShadeWindowController notificationShadeWindowController,
            KeyguardStateController keyguardStateController, Handler handler,
            KeyguardUpdateMonitor keyguardUpdateMonitor,
@@ -285,7 +284,6 @@ public class BiometricUnlockController extends KeyguardUpdateMonitorCallback imp
        mNotificationShadeWindowController = notificationShadeWindowController;
        mDozeScrimController = dozeScrimController;
        mKeyguardViewMediator = keyguardViewMediator;
        mScrimController = scrimController;
        mKeyguardStateController = keyguardStateController;
        mHandler = handler;
        mConsecutiveFpFailureThreshold = resources.getInteger(
@@ -366,12 +364,6 @@ public class BiometricUnlockController extends KeyguardUpdateMonitorCallback imp
        Trace.endSection();
    }

    private boolean pulsingOrAod() {
        final ScrimState scrimState = mScrimController.getState();
        return scrimState == ScrimState.AOD
                || scrimState == ScrimState.PULSING;
    }

    @Override
    public void onBiometricAuthenticated(int userId, BiometricSourceType biometricSourceType,
            boolean isStrongBiometric) {
@@ -416,7 +408,7 @@ public class BiometricUnlockController extends KeyguardUpdateMonitorCallback imp
        boolean wasDeviceInteractive = mUpdateMonitor.isDeviceInteractive();
        mMode = mode;
        mHasScreenTurnedOnSinceAuthenticating = false;
        if (mMode == MODE_WAKE_AND_UNLOCK_PULSING && pulsingOrAod()) {
        if (mMode == MODE_WAKE_AND_UNLOCK_PULSING) {
            // If we are waking the device up while we are pulsing the clock and the
            // notifications would light up first, creating an unpleasant animation.
            // Defer changing the screen brightness by forcing doze brightness on our window
+1 −3
Original line number Diff line number Diff line
@@ -86,8 +86,6 @@ public class BiometricsUnlockControllerTest extends SysuiTestCase {
    @Mock
    private KeyguardViewMediator mKeyguardViewMediator;
    @Mock
    private ScrimController mScrimController;
    @Mock
    private BiometricUnlockController.BiometricModeListener mBiometricModeListener;
    @Mock
    private KeyguardStateController mKeyguardStateController;
@@ -133,7 +131,7 @@ public class BiometricsUnlockControllerTest extends SysuiTestCase {
        when(mVibratorHelper.hasVibrator()).thenReturn(true);
        mDependency.injectTestDependency(NotificationMediaManager.class, mMediaManager);
        mBiometricUnlockController = new BiometricUnlockController(mDozeScrimController,
                mKeyguardViewMediator, mScrimController,
                mKeyguardViewMediator,
                mNotificationShadeWindowController, mKeyguardStateController, mHandler,
                mUpdateMonitor, res.getResources(), mKeyguardBypassController,
                mMetricsLogger, mDumpManager, mPowerManager, mLogger,