Merge "Don't show 'try fingerprint' msg on face auth help" into sc-v2-dev

This commit is contained in:
TreeHugger Robot
2021-11-12 21:36:18 +00:00
committed by Android (Google) Code Review
2 changed files with 7 additions and 3 deletions

View File

@@ -912,7 +912,11 @@ public class KeyguardIndicationController {
} else if (mKeyguardUpdateMonitor.isScreenOn()) { } else if (mKeyguardUpdateMonitor.isScreenOn()) {
if (biometricSourceType == BiometricSourceType.FACE if (biometricSourceType == BiometricSourceType.FACE
&& shouldSuppressFaceMsgAndShowTryFingerprintMsg()) { && shouldSuppressFaceMsgAndShowTryFingerprintMsg()) {
showTryFingerprintMsg(msgId, helpString); // don't show any help messages, b/c they can come in right before a success
// However, continue to announce help messages for a11y
if (!TextUtils.isEmpty(helpString)) {
mLockScreenIndicationView.announceForAccessibility(helpString);
}
return; return;
} }
showTransientIndication(helpString, false /* isError */, showActionToUnlock); showTransientIndication(helpString, false /* isError */, showActionToUnlock);

View File

@@ -710,8 +710,8 @@ public class KeyguardIndicationControllerTest extends SysuiTestCase {
KeyguardUpdateMonitor.BIOMETRIC_HELP_FACE_NOT_RECOGNIZED, faceHelpMsg, KeyguardUpdateMonitor.BIOMETRIC_HELP_FACE_NOT_RECOGNIZED, faceHelpMsg,
BiometricSourceType.FACE); BiometricSourceType.FACE);
// THEN "try fingerprint" message appears (and not the face help message) // THEN no help message appears
verifyTransientMessage(mKeyguardTryFingerprintMsg); verify(mRotateTextViewController, never()).showTransient(anyString());
// THEN the face help message is still announced for a11y // THEN the face help message is still announced for a11y
verify(mIndicationAreaBottom).announceForAccessibility(eq(faceHelpMsg)); verify(mIndicationAreaBottom).announceForAccessibility(eq(faceHelpMsg));