NotificationShade should animate away on MODE_UNLOCK_COLLAPSING am: 2be6cfe728

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15884522

Change-Id: Ie5d0fac5f1adf6257f7e396a7ee66ba64b18cfb6
This commit is contained in:
Beverly
2021-09-22 18:29:50 +00:00
committed by Automerger Merge Worker
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 * 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; public static final int MODE_UNLOCK_COLLAPSING = 5;
@@ -425,6 +425,11 @@ public class BiometricUnlockController extends KeyguardUpdateMonitorCallback imp
if (!wasDeviceInteractive) { if (!wasDeviceInteractive) {
mPendingShowBouncer = true; mPendingShowBouncer = true;
} else { } else {
mShadeController.animateCollapsePanels(
CommandQueue.FLAG_EXCLUDE_NONE,
true /* force */,
false /* delayed */,
BIOMETRIC_COLLAPSE_SPEEDUP_FACTOR);
mPendingShowBouncer = false; mPendingShowBouncer = false;
mKeyguardViewController.notifyKeyguardAuthenticated( mKeyguardViewController.notifyKeyguardAuthenticated(
false /* strongAuth */); false /* strongAuth */);

View File

@@ -273,6 +273,26 @@ public class BiometricsUnlockControllerTest extends SysuiTestCase {
.isEqualTo(BiometricUnlockController.MODE_SHOW_BOUNCER); .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 @Test
public void onBiometricAuthenticated_whenFace_noBypass_encrypted_doNothing() { public void onBiometricAuthenticated_whenFace_noBypass_encrypted_doNothing() {
reset(mUpdateMonitor); reset(mUpdateMonitor);