Merge "NotificationShade should animate away on MODE_UNLOCK_COLLAPSING" into sc-qpr1-dev am: a22f94bd81 am: e6e35ab0a2
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15843869 Change-Id: I8c7654c8fac02d6ec7b882873350bb1058c9b6d9
This commit is contained in:
@@ -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 */);
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user