Remove co-ex logic for blocking face help msgs

Instead, allow the face-auth help messages to be shown
to the user.

Test: manual, atest KeyguardIndicationControllerTest
Bug: 227545287
Change-Id: I3cfd99af941053e9da28ac4454c022f255e3eac4
This commit is contained in:
Beverly
2022-04-18 14:17:41 +00:00
parent 4a93e580d1
commit 689ec01c89
2 changed files with 0 additions and 46 deletions

View File

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

View File

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