Show scrimmed bouncer from BiometricUnlockCtrl

Test: manual
Test: atest BiometrisUnlockControllerTest
Fixes: 206423147
Bug: 205556311
Change-Id: Ib3def01e7ffd04ac950f06cbee7d213927110b5b
This commit is contained in:
Beverly
2021-11-15 12:09:21 -05:00
parent 3abdb0179e
commit 7c64f2cd03
2 changed files with 5 additions and 5 deletions

View File

@@ -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);

View File

@@ -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);
} }