Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 79079e8a authored by Beverly's avatar Beverly
Browse files

Don't show 'try fingerprint' msg on face auth help

Sometimes multiple biometric-help suggestions for face auth
can be sent right before a face auth sucesss. If udfps
is suppressing the face auth help message, don't show any messages
(previouosly we'd show "try fingerprint" which was unhelpful
and sometimes was shown on screen as a successful face auth
was occurring which was confusing).

Note: we will continue to announce the help
messages for a11y purposes.

Test: atest KeyguardIndicationControllerTest
Test: manually auth with face, see keyguard message
Fixes: 203897784
Change-Id: I75b9e19b812505ff2dafa960600da67135448042
parent 3abdb017
Loading
Loading
Loading
Loading
+5 −1
Original line number Original line Diff line number Diff line
@@ -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);
+2 −2
Original line number Original line Diff line number Diff line
@@ -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));