From 689ec01c89f5541326329b5a17d6b10c16a680ff Mon Sep 17 00:00:00 2001 From: Beverly Date: Mon, 18 Apr 2022 14:17:41 +0000 Subject: 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 --- .../statusbar/KeyguardIndicationController.java | 19 --------------- .../KeyguardIndicationControllerTest.java | 27 ---------------------- 2 files changed, 46 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java b/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java index 83138f0666c1..26e1333ff682 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java @@ -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 diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/KeyguardIndicationControllerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/KeyguardIndicationControllerTest.java index a2a02cd939ef..d394d7dcebbe 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/KeyguardIndicationControllerTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/KeyguardIndicationControllerTest.java @@ -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(); -- cgit v1.2.3-59-g8ed1b