Merge "Fix biometrics unicorn consent string bug." into udc-dev am: ad5954bc94

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/22578994

Change-Id: I8e08c8cb75e1ae7c794be59081b12c48a79f0735
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Hao Dong
2023-04-12 18:30:51 +00:00
committed by Automerger Merge Worker
4 changed files with 32 additions and 1 deletions

View File

@@ -96,6 +96,12 @@
<!-- Introduction detail message shown in face enrollment dialog when asking for parental consent [CHAR LIMIT=NONE]-->
<string name="security_settings_face_enroll_introduction_consent_message_0" product="device">Allow your child to use their face to unlock their device</string>
<!-- Introduction detail message shown in face enrollment dialog when asking for parental consent [CHAR LIMIT=NONE]-->
<string name="security_settings_face_enroll_introduction_consent_message_0_class3" product="default">Allow your child to use their face to unlock their phone or verify it\u2019s them. This happens when they sign in to apps, approve a purchase, and more.</string>
<!-- Introduction detail message shown in face enrollment dialog when asking for parental consent [CHAR LIMIT=NONE]-->
<string name="security_settings_face_enroll_introduction_consent_message_0_class3" product="tablet">Allow your child to use their face to unlock their tablet or verify it\u2019s them. This happens when they sign in to apps, approve a purchase, and more.</string>
<!-- Introduction detail message shown in face enrollment dialog when asking for parental consent [CHAR LIMIT=NONE]-->
<string name="security_settings_face_enroll_introduction_consent_message_0_class3" product="device">Allow your child to use their face to unlock their device or verify it\u2019s them. This happens when they sign in to apps, approve a purchase, and more.</string>
<!-- Introduction detail message shown in face enrollment dialog when asking for parental consent [CHAR LIMIT=NONE]-->
<string name="security_settings_face_enroll_introduction_consent_message" product="default">Using your child\u2019s face to unlock their phone may be less secure than a strong pattern or PIN.</string>
<!-- Introduction detail message shown in face enrollment dialog when asking for parental consent [CHAR LIMIT=NONE]-->
<string name="security_settings_face_enroll_introduction_consent_message" product="tablet">Using your child\u2019s face to unlock their tablet may be less secure than a strong pattern or PIN.</string>

View File

@@ -592,6 +592,10 @@ public class FaceEnrollIntroduction extends BiometricEnrollIntroduction {
return data;
}
protected boolean isFaceStrong() {
return mIsFaceStrong;
}
private void onFaceStrengthChanged() {
// Set up and show the "less secure" info section if necessary.
if (!mIsFaceStrong && getResources().getBoolean(

View File

@@ -47,13 +47,14 @@ public class FaceEnrollParentalConsent extends FaceEnrollIntroduction {
R.string.security_settings_face_enroll_introduction_control_consent_title,
R.string.security_settings_face_enroll_introduction_control_consent_message,
R.string.security_settings_face_enroll_introduction_consent_message_0,
R.string.security_settings_face_enroll_introduction_consent_message_0_class3,
R.string.security_settings_face_enroll_introduction_info_consent_less_secure
};
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setDescriptionText(R.string.security_settings_face_enroll_introduction_consent_message_0);
updateDescriptionText();
}
@Override
@@ -144,4 +145,16 @@ public class FaceEnrollParentalConsent extends FaceEnrollIntroduction {
public int getMetricsCategory() {
return SettingsEnums.FACE_PARENTAL_CONSENT;
}
@Override
protected void updateDescriptionText() {
super.updateDescriptionText();
if (isFaceStrong()) {
setDescriptionText(getString(
R.string.security_settings_face_enroll_introduction_consent_message_0_class3));
} else {
setDescriptionText(
R.string.security_settings_face_enroll_introduction_consent_message_0);
}
}
}

View File

@@ -131,4 +131,12 @@ public class FingerprintEnrollParentalConsent extends FingerprintEnrollIntroduct
public int getMetricsCategory() {
return SettingsEnums.FINGERPRINT_PARENTAL_CONSENT;
}
@Override
protected void updateDescriptionText() {
super.updateDescriptionText();
setDescriptionText(
R.string.security_settings_fingerprint_enroll_introduction_consent_message);
}
}