summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Joe Bolinger <jbolinger@google.com> 2023-06-05 17:10:00 +0000
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2023-06-05 17:10:00 +0000
commit5f7d392366f95f6ff7f39a7a79557bb39840afb9 (patch)
treea15919734091876d403e139cd4d27db3307e7be7
parent0cbddd48690cffdffa163d86e3f2c90a1d05f6d9 (diff)
parentac4f8fa88fd3b94a7a32d9bfdf4ce8d04bb7c9d0 (diff)
Merge "Add "Face" to not recognized message for face auth." into udc-d1-dev am: ac4f8fa88f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23547214 Change-Id: Iaca16d8786591463e31b3563690abf799b8dc122 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--core/res/res/values/strings.xml2
-rw-r--r--core/res/res/values/symbols.xml1
-rw-r--r--packages/SystemUI/src/com/android/systemui/biometrics/AuthController.java6
3 files changed, 8 insertions, 1 deletions
diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml
index fb3acbe79114..4f2eadc0f1ea 100644
--- a/core/res/res/values/strings.xml
+++ b/core/res/res/values/strings.xml
@@ -1789,6 +1789,8 @@
<string name="biometric_error_user_canceled">Authentication canceled</string>
<!-- Message shown by the biometric dialog when biometric is not recognized -->
<string name="biometric_not_recognized">Not recognized</string>
+ <!-- Message shown by the biometric dialog when face is not recognized [CHAR LIMIT=50] -->
+ <string name="biometric_face_not_recognized">Face not recognized</string>
<!-- Message shown when biometric authentication has been canceled [CHAR LIMIT=50] -->
<string name="biometric_error_canceled">Authentication canceled</string>
<!-- Message returned to applications if BiometricPrompt setAllowDeviceCredentials is enabled but no pin, pattern, or password is set. [CHAR LIMIT=NONE] -->
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index d4b229eac2e3..7cab3ba057fc 100644
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -2574,6 +2574,7 @@
<java-symbol type="string" name="biometric_error_hw_unavailable" />
<java-symbol type="string" name="biometric_error_user_canceled" />
<java-symbol type="string" name="biometric_not_recognized" />
+ <java-symbol type="string" name="biometric_face_not_recognized" />
<java-symbol type="string" name="biometric_error_canceled" />
<java-symbol type="string" name="biometric_error_device_not_secured" />
<java-symbol type="string" name="biometric_error_generic" />
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/AuthController.java b/packages/SystemUI/src/com/android/systemui/biometrics/AuthController.java
index b2ffea3d050c..d976ead1f16f 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/AuthController.java
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/AuthController.java
@@ -1054,6 +1054,10 @@ public class AuthController implements CoreStartable, CommandQueue.Callbacks,
return false;
}
+ private String getNotRecognizedString(@Modality int modality) {
+ return mContext.getString(modality == TYPE_FACE
+ ? R.string.biometric_face_not_recognized : R.string.biometric_not_recognized);
+ }
private String getErrorString(@Modality int modality, int error, int vendorCode) {
switch (modality) {
@@ -1100,7 +1104,7 @@ public class AuthController implements CoreStartable, CommandQueue.Callbacks,
mCurrentDialog.animateToCredentialUI();
} else if (isSoftError) {
final String errorMessage = (error == BiometricConstants.BIOMETRIC_PAUSED_REJECTED)
- ? mContext.getString(R.string.biometric_not_recognized)
+ ? getNotRecognizedString(modality)
: getErrorString(modality, error, vendorCode);
if (DEBUG) Log.d(TAG, "onBiometricError, soft error: " + errorMessage);
// The camera privacy error can return before the prompt initializes its state,