Merge "Remove co-ex logic for blocking face help msgs" into tm-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
a9b6e8c3a0
@@ -987,11 +987,6 @@ public class KeyguardIndicationController {
|
||||
mStatusBarKeyguardViewManager.showBouncerMessage(helpString,
|
||||
mInitialTextColorState);
|
||||
} else if (mScreenLifecycle.getScreenState() == SCREEN_ON) {
|
||||
if (biometricSourceType == BiometricSourceType.FACE
|
||||
&& shouldSuppressFaceMsgAndShowTryFingerprintMsg()) {
|
||||
showFaceFailedTryFingerprintMsg(msgId, helpString);
|
||||
return;
|
||||
}
|
||||
showBiometricMessage(helpString);
|
||||
} else if (showActionToUnlock) {
|
||||
mHandler.sendMessageDelayed(mHandler.obtainMessage(MSG_SHOW_ACTION_TO_UNLOCK),
|
||||
@@ -1005,13 +1000,6 @@ public class KeyguardIndicationController {
|
||||
if (shouldSuppressBiometricError(msgId, biometricSourceType, mKeyguardUpdateMonitor)) {
|
||||
return;
|
||||
}
|
||||
if (biometricSourceType == BiometricSourceType.FACE
|
||||
&& shouldSuppressFaceMsgAndShowTryFingerprintMsg()
|
||||
&& !mStatusBarKeyguardViewManager.isBouncerShowing()
|
||||
&& mScreenLifecycle.getScreenState() == SCREEN_ON) {
|
||||
showFaceFailedTryFingerprintMsg(msgId, errString);
|
||||
return;
|
||||
}
|
||||
if (msgId == FaceManager.FACE_ERROR_TIMEOUT) {
|
||||
// The face timeout message is not very actionable, let's ask the user to
|
||||
// manually retry.
|
||||
@@ -1058,13 +1046,6 @@ public class KeyguardIndicationController {
|
||||
|| msgId == FingerprintManager.FINGERPRINT_ERROR_USER_CANCELED);
|
||||
}
|
||||
|
||||
private boolean shouldSuppressFaceMsgAndShowTryFingerprintMsg() {
|
||||
// For dual biometric, don't show face auth messages
|
||||
return mKeyguardUpdateMonitor.isFingerprintDetectionRunning()
|
||||
&& mKeyguardUpdateMonitor.isUnlockingWithBiometricAllowed(
|
||||
true /* isStrongBiometric */);
|
||||
}
|
||||
|
||||
private boolean shouldSuppressFaceError(int msgId, KeyguardUpdateMonitor updateMonitor) {
|
||||
// Only checking if unlocking with Biometric is allowed (no matter strong or non-strong
|
||||
// as long as primary auth, i.e. PIN/pattern/password, is not required), so it's ok to
|
||||
|
||||
@@ -751,33 +751,6 @@ public class KeyguardIndicationControllerTest extends SysuiTestCase {
|
||||
verifyTransientMessage(message);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void faceAuthMessageSuppressed() {
|
||||
createController();
|
||||
String faceHelpMsg = "Face auth help message";
|
||||
|
||||
// GIVEN state of showing message when keyguard screen is on
|
||||
when(mKeyguardUpdateMonitor.isUnlockingWithBiometricAllowed(anyBoolean())).thenReturn(true);
|
||||
when(mStatusBarKeyguardViewManager.isBouncerShowing()).thenReturn(false);
|
||||
|
||||
// GIVEN fingerprint is also running (not udfps)
|
||||
when(mKeyguardUpdateMonitor.isFingerprintDetectionRunning()).thenReturn(true);
|
||||
when(mKeyguardUpdateMonitor.isUdfpsSupported()).thenReturn(false);
|
||||
|
||||
mController.setVisible(true);
|
||||
|
||||
// WHEN a face help message comes in
|
||||
mController.getKeyguardCallback().onBiometricHelp(
|
||||
KeyguardUpdateMonitor.BIOMETRIC_HELP_FACE_NOT_RECOGNIZED, faceHelpMsg,
|
||||
BiometricSourceType.FACE);
|
||||
|
||||
// THEN no help message appears
|
||||
verify(mRotateTextViewController, never()).showTransient(anyString());
|
||||
|
||||
// THEN the face help message is still announced for a11y
|
||||
verify(mIndicationAreaBottom).announceForAccessibility(eq(faceHelpMsg));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testEmptyOwnerInfoHidesIndicationArea() {
|
||||
createController();
|
||||
|
||||
Reference in New Issue
Block a user