Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 08bd7960 authored by Hao Dong's avatar Hao Dong
Browse files

Fix biometrics unicorn consent string bug.

Test: manual test
Bug: 277815321
Change-Id: Id32720807d0c6aec199dcd13449f9333d2c36978
parent ceb8476a
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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>
+4 −0
Original line number Diff line number Diff line
@@ -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(
+14 −1
Original line number Diff line number Diff line
@@ -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);
        }
    }
}
+8 −0
Original line number Diff line number Diff line
@@ -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);
    }
}