diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml
index 2ffa29b533310..4af561b947cda 100644
--- a/core/res/res/values/strings.xml
+++ b/core/res/res/values/strings.xml
@@ -1532,6 +1532,8 @@
Verify it\u2019s you
Use your biometric to continue
+
+ Use your biometric or screen lock to continue
Biometric hardware unavailable
@@ -1604,6 +1606,8 @@
Use fingerprint or screen lock
Use your fingerprint to continue
+
+ Use your fingerprint or screen lock to continue
@@ -1704,6 +1708,8 @@
Use face or screen lock
Use face unlock to continue
+
+ Use your face or screen lock to continue
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index 07938fd3a3248..d904f7ab97ed5 100644
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -2473,6 +2473,7 @@
+
@@ -2504,6 +2505,7 @@
+
@@ -2553,6 +2555,7 @@
+
diff --git a/services/core/java/com/android/server/biometrics/AuthService.java b/services/core/java/com/android/server/biometrics/AuthService.java
index 050b28b363d21..285f3185abc2d 100644
--- a/services/core/java/com/android/server/biometrics/AuthService.java
+++ b/services/core/java/com/android/server/biometrics/AuthService.java
@@ -406,26 +406,49 @@ public class AuthService extends SystemService {
mBiometricService.getCurrentModality(
opPackageName, userId, callingUserId, authenticators);
+ final boolean isCredentialAllowed = Utils.isCredentialRequested(authenticators);
+
final String result;
switch (getCredentialBackupModality(modality)) {
case BiometricAuthenticator.TYPE_NONE:
result = null;
break;
+
case BiometricAuthenticator.TYPE_CREDENTIAL:
result = getContext().getString(
R.string.screen_lock_dialog_default_subtitle);
break;
+
case BiometricAuthenticator.TYPE_FINGERPRINT:
- result = getContext().getString(
- R.string.fingerprint_dialog_default_subtitle);
+ if (isCredentialAllowed) {
+ result = getContext().getString(
+ R.string.fingerprint_or_screen_lock_dialog_default_subtitle);
+ } else {
+ result = getContext().getString(
+ R.string.fingerprint_dialog_default_subtitle);
+ }
break;
+
case BiometricAuthenticator.TYPE_FACE:
- result = getContext().getString(R.string.face_dialog_default_subtitle);
+ if (isCredentialAllowed) {
+ result = getContext().getString(
+ R.string.face_or_screen_lock_dialog_default_subtitle);
+ } else {
+ result = getContext().getString(R.string.face_dialog_default_subtitle);
+ }
break;
+
default:
- result = getContext().getString(R.string.biometric_dialog_default_subtitle);
+ if (isCredentialAllowed) {
+ result = getContext().getString(
+ R.string.biometric_or_screen_lock_dialog_default_subtitle);
+ } else {
+ result = getContext().getString(
+ R.string.biometric_dialog_default_subtitle);
+ }
break;
}
+
return result;
} finally {
Binder.restoreCallingIdentity(identity);