NotificationShade should animate away on MODE_UNLOCK_COLLAPSING

Animate away the NotificationShade - this was mistakenly
removed in ag/14455725

Test: manual, atest BiometricsUnlockControllerTest
Fixes: 197271777

Change-Id: I2accd8bd8975b2d49c1dc91870b7cc8467c5139d
Merged-In: I2accd8bd8975b2d49c1dc91870b7cc8467c5139d
(cherry picked from commit c7df567362)
This commit is contained in:
Beverly
2021-09-16 09:10:38 -04:00
committed by Matt Pietal
parent 7694cbfd5a
commit 2be6cfe728
2 changed files with 26 additions and 1 deletions

View File

@@ -116,7 +116,7 @@ public class BiometricUnlockController extends KeyguardUpdateMonitorCallback imp
/**
* Mode in which fingerprint unlocks the device or passive auth (ie face auth) unlocks the
* device while being requested when keyguard is occluded.
* device while being requested when keyguard is occluded or showing.
*/
public static final int MODE_UNLOCK_COLLAPSING = 5;
@@ -425,6 +425,11 @@ public class BiometricUnlockController extends KeyguardUpdateMonitorCallback imp
if (!wasDeviceInteractive) {
mPendingShowBouncer = true;
} else {
mShadeController.animateCollapsePanels(
CommandQueue.FLAG_EXCLUDE_NONE,
true /* force */,
false /* delayed */,
BIOMETRIC_COLLAPSE_SPEEDUP_FACTOR);
mPendingShowBouncer = false;
mKeyguardViewController.notifyKeyguardAuthenticated(
false /* strongAuth */);

View File

@@ -273,6 +273,26 @@ public class BiometricsUnlockControllerTest extends SysuiTestCase {
.isEqualTo(BiometricUnlockController.MODE_SHOW_BOUNCER);
}
@Test
public void onBiometricAuthenticated_onLockScreen() {
// GIVEN not dozing
when(mUpdateMonitor.isDeviceInteractive()).thenReturn(true);
// WHEN we want to unlock collapse
mBiometricUnlockController.startWakeAndUnlock(
BiometricUnlockController.MODE_UNLOCK_COLLAPSING);
// THEN we collpase the panels and notify authenticated
verify(mShadeController).animateCollapsePanels(
/* flags */ anyInt(),
/* force */ eq(true),
/* delayed */ eq(false),
/* speedUpFactor */ anyFloat()
);
verify(mStatusBarKeyguardViewManager).notifyKeyguardAuthenticated(
/* strongAuth */ eq(false));
}
@Test
public void onBiometricAuthenticated_whenFace_noBypass_encrypted_doNothing() {
reset(mUpdateMonitor);