RESTRICT AUTOMERGE Remove ScrimController from BiometricUnlockController

It was unnecessary - the DozeScrimController is enough
to determine whether the device is pulsing.

Test: show a notification (via notify test app) in AoD, then
authenticate from AoD and notice the screen doesn't light up
before transitioning to the home screen.
Bug: 262002530
Bug: 237362467
Change-Id: Ic4c4837cdbe0fbcdcc0d5500a659bdb75b04e848
This commit is contained in:
Beverly
2022-12-09 18:57:51 +00:00
committed by Beverly Tai
parent 0bfdbbf4c2
commit 9a21ac1be1
2 changed files with 3 additions and 13 deletions

View File

@@ -161,7 +161,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;
@@ -261,7 +260,7 @@ public class BiometricUnlockController extends KeyguardUpdateMonitorCallback imp
@Inject
public BiometricUnlockController(
DozeScrimController dozeScrimController,
KeyguardViewMediator keyguardViewMediator, ScrimController scrimController,
KeyguardViewMediator keyguardViewMediator,
ShadeController shadeController,
NotificationShadeWindowController notificationShadeWindowController,
KeyguardStateController keyguardStateController, Handler handler,
@@ -293,7 +292,6 @@ public class BiometricUnlockController extends KeyguardUpdateMonitorCallback imp
mNotificationShadeWindowController = notificationShadeWindowController;
mDozeScrimController = dozeScrimController;
mKeyguardViewMediator = keyguardViewMediator;
mScrimController = scrimController;
mKeyguardStateController = keyguardStateController;
mHandler = handler;
mConsecutiveFpFailureThreshold = resources.getInteger(
@@ -375,12 +373,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) {
@@ -425,7 +417,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

View File

@@ -89,8 +89,6 @@ public class BiometricsUnlockControllerTest extends SysuiTestCase {
@Mock
private KeyguardViewMediator mKeyguardViewMediator;
@Mock
private ScrimController mScrimController;
@Mock
private BiometricUnlockController.BiometricModeListener mBiometricModeListener;
@Mock
private ShadeController mShadeController;
@@ -140,7 +138,7 @@ public class BiometricsUnlockControllerTest extends SysuiTestCase {
when(mVibratorHelper.hasVibrator()).thenReturn(true);
mDependency.injectTestDependency(NotificationMediaManager.class, mMediaManager);
mBiometricUnlockController = new BiometricUnlockController(mDozeScrimController,
mKeyguardViewMediator, mScrimController, mShadeController,
mKeyguardViewMediator, mShadeController,
mNotificationShadeWindowController, mKeyguardStateController, mHandler,
mUpdateMonitor, res.getResources(), mKeyguardBypassController,
mMetricsLogger, mDumpManager, mPowerManager, mLogger,