From 4fc67c1e80fbfd788d4a324cb9ffa6e744da3704 Mon Sep 17 00:00:00 2001 From: Chandru Date: Mon, 7 Nov 2022 11:58:55 +0000 Subject: Show the "Face unlock unavailable" message on bouncer as well Other changes: - Updates the char limit on face unlock unavailable message - https://localization.google.com/query/10894717 Fixes: 247688462 Test: atest KeyguardIndicationControllerTest Change-Id: I8341db47318a2cf00b04aaf9f42e8ab0392b46fe --- packages/SystemUI/res/values/strings.xml | 2 +- .../systemui/statusbar/KeyguardIndicationController.java | 3 ++- .../statusbar/KeyguardIndicationControllerTest.java | 15 +++++++++++++++ 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/packages/SystemUI/res/values/strings.xml b/packages/SystemUI/res/values/strings.xml index 72305c62030d..dc84435f4081 100644 --- a/packages/SystemUI/res/values/strings.xml +++ b/packages/SystemUI/res/values/strings.xml @@ -405,7 +405,7 @@ Can\u2019t recognize face Use fingerprint instead - + Face unlock unavailable. diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java b/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java index 3670d0987a03..0deb47d73460 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java @@ -1263,7 +1263,8 @@ public class KeyguardIndicationController { showErrorMessageNowOrLater(errString, followupMessage); } else if (!mAuthController.isUdfpsFingerDown()) { // On subsequent lockouts, we show a more generic locked out message. - showBiometricMessage(mContext.getString(R.string.keyguard_face_unlock_unavailable), + showErrorMessageNowOrLater( + mContext.getString(R.string.keyguard_face_unlock_unavailable), followupMessage); } } 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 9b17cc296081..797256f91022 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/KeyguardIndicationControllerTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/KeyguardIndicationControllerTest.java @@ -1417,6 +1417,21 @@ public class KeyguardIndicationControllerTest extends SysuiTestCase { mContext.getString(R.string.keyguard_face_unlock_unavailable)); } + @Test + public void onBiometricError_faceLockedOutSecondTimeOnBouncer_showsUnavailableMessage() { + createController(); + onFaceLockoutError("first lockout"); + clearInvocations(mRotateTextViewController); + when(mStatusBarKeyguardViewManager.isBouncerShowing()).thenReturn(true); + + onFaceLockoutError("second lockout"); + + verify(mStatusBarKeyguardViewManager) + .setKeyguardMessage( + eq(mContext.getString(R.string.keyguard_face_unlock_unavailable)), + any()); + } + @Test public void onBiometricError_faceLockedOutSecondTimeButUdfpsActive_showsNoMessage() { createController(); -- cgit v1.2.3-59-g8ed1b