From 8fd6efd76d1a36f96bf1c3562d2e6badb617ad54 Mon Sep 17 00:00:00 2001 From: Beverly Date: Thu, 31 Mar 2022 19:45:30 +0000 Subject: [PATCH] Update UDFPS "press to unlock" strings To make it clear to the user that we're asking that they press on the unlock icon. Fixes: 227501872 Test: trigger face auth, see message Test: enable a trust agent, then tap empty space on LS, see message Change-Id: I4f0d5c9e3be2870a038276944e3e2b3e9ae77630 --- packages/SystemUI/res/values/strings.xml | 9 ++++++--- .../src/com/android/keyguard/KeyguardUpdateMonitor.java | 6 +++++- .../systemui/statusbar/KeyguardIndicationController.java | 5 ++++- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/packages/SystemUI/res/values/strings.xml b/packages/SystemUI/res/values/strings.xml index 898f66d9939b..33ed7b8421db 100644 --- a/packages/SystemUI/res/values/strings.xml +++ b/packages/SystemUI/res/values/strings.xml @@ -338,7 +338,7 @@ Tap Confirm to complete - Unlocked by face. Press to continue. + Unlocked by face. Press the unlock icon to continue. Authenticated @@ -796,8 +796,11 @@ Swipe up to open - - Press to open + + Press the unlock icon to open + + + Unlocked by face. Press the unlock icon to open. Swipe up to try again diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java b/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java index 3b8a29bfe8c4..e9137ee100e5 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java @@ -1160,7 +1160,11 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab || isSimPinSecure()); } - private boolean getIsFaceAuthenticated() { + /** + * @return whether the current user has been authenticated with face. This may be true + * on the lockscreen if the user doesn't have bypass enabled. + */ + public boolean getIsFaceAuthenticated() { boolean faceAuthenticated = false; BiometricAuthenticated bioFaceAuthenticated = mUserFaceAuthenticated.get(getCurrentUser()); if (bioFaceAuthenticated != null) { diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java b/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java index 55ca8f3fd634..b07a898e356b 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java @@ -887,7 +887,10 @@ public class KeyguardIndicationController { if (mKeyguardUpdateMonitor.isUdfpsSupported() && mKeyguardUpdateMonitor.getUserCanSkipBouncer( KeyguardUpdateMonitor.getCurrentUser())) { - showBiometricMessage(mContext.getString(R.string.keyguard_unlock_press)); + final int stringId = mKeyguardUpdateMonitor.getIsFaceAuthenticated() + ? R.string.keyguard_face_successful_unlock_press + : R.string.keyguard_unlock_press; + showBiometricMessage(mContext.getString(stringId)); } else { showBiometricMessage(mContext.getString(R.string.keyguard_unlock)); }