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

Commit 8b3792d6 authored by Joe Bolinger's avatar Joe Bolinger
Browse files

Add string ids to the result bundle for parental consent.

Bug: 198491515
Test: N/A (builds)
Change-Id: Id120f5f7a7e923f9d3ce7dd38d3e5214296ca219
parent 790491bc
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -726,6 +726,7 @@
    <string name="security_dashboard_summary">Screen lock, Find My Device, app security</string>
    <!-- Face enrollment and settings --><skip />
    <!-- Note: Update FaceEnrollParentalConsent.CONSENT_STRING_RESOURCES when any _consent_ strings are added or removed. -->
    <!-- Message shown in summary field when face unlock is set up. [CHAR LIMIT=40] -->
    <string name="security_settings_face_preference_summary">Face added</string>
    <!-- Message shown in summary field when Face Unlock is not set up. [CHAR LIMIT=54] -->
@@ -879,6 +880,7 @@
    <string name="security_settings_face_settings_context_subtitle">Use Face Unlock to unlock your phone</string>
    <!-- Fingerprint enrollment and settings --><skip />
    <!-- Note: Update FingerprintEnrollParentalConsent.CONSENT_STRING_RESOURCES when any _consent_ strings are added or removed. -->
    <!-- Title shown for menu item that launches fingerprint settings or enrollment [CHAR LIMIT=22] -->
    <string name="security_settings_fingerprint_preference_title">Fingerprint</string>
    <!-- Fingerprint managment category title - configuration options for managing enrolled fingerprints [CHAR LIMIT=22] -->
+9 −0
Original line number Diff line number Diff line
@@ -48,6 +48,10 @@ public class ParentalConsentHelper {
    private static final String KEY_FINGERPRINT_CONSENT = "fingerprint";
    private static final String KEY_IRIS_CONSENT = "iris";

    private static final String KEY_FACE_CONSENT_STRINGS = "face_strings";
    private static final String KEY_FINGERPRINT_CONSENT_STRINGS = "fingerprint_strings";
    private static final String KEY_IRIS_CONSENT_STRINGS = "iris_strings";

    private final boolean mRequireFace;
    private final boolean mRequireFingerprint;

@@ -152,9 +156,14 @@ public class ParentalConsentHelper {
    public Bundle getConsentResult() {
        final Bundle result = new Bundle();
        result.putBoolean(KEY_FACE_CONSENT, mConsentFace != null ? mConsentFace : false);
        result.putIntArray(KEY_FACE_CONSENT_STRINGS,
                FaceEnrollParentalConsent.CONSENT_STRING_RESOURCES);
        result.putBoolean(KEY_FINGERPRINT_CONSENT,
                mConsentFingerprint != null ? mConsentFingerprint : false);
        result.putIntArray(KEY_FINGERPRINT_CONSENT_STRINGS,
                FingerprintEnrollParentalConsent.CONSENT_STRING_RESOURCES);
        result.putBoolean(KEY_IRIS_CONSENT, false);
        result.putIntArray(KEY_IRIS_CONSENT_STRINGS, new int[0]);
        return result;
    }

+15 −0
Original line number Diff line number Diff line
@@ -33,6 +33,21 @@ import com.android.settings.R;
 */
public class FaceEnrollParentalConsent extends FaceEnrollIntroduction {

    /**
     * List of string resources to log when recording the result of this activity in gms.
     * This must be updated when any strings are added/removed.
     */
    public static final int[] CONSENT_STRING_RESOURCES = new int[] {
            R.string.security_settings_face_enroll_consent_introduction_title,
            R.string.security_settings_face_enroll_introduction_consent_message,
            R.string.security_settings_face_enroll_introduction_info_consent_glasses,
            R.string.security_settings_face_enroll_introduction_info_consent_looking,
            R.string.security_settings_face_enroll_introduction_info_consent_gaze,
            R.string.security_settings_face_enroll_introduction_how_consent_message,
            R.string.security_settings_face_enroll_introduction_control_consent_title,
            R.string.security_settings_face_enroll_introduction_control_consent_message
    };

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
+14 −0
Original line number Diff line number Diff line
@@ -33,6 +33,20 @@ import com.android.settings.R;
 */
public class FingerprintEnrollParentalConsent extends FingerprintEnrollIntroduction {

    /**
     * List of string resources to log when recording the result of this activity in gms.
     * This must be updated when any strings are added/removed.
     */
    public static final int[] CONSENT_STRING_RESOURCES = new int[] {
            R.string.security_settings_fingerprint_enroll_consent_introduction_title,
            R.string.security_settings_fingerprint_enroll_introduction_consent_message,
            R.string.security_settings_fingerprint_enroll_introduction_footer_title_consent_1,
            R.string.security_settings_fingerprint_v2_enroll_introduction_footer_message_consent_2,
            R.string.security_settings_fingerprint_v2_enroll_introduction_footer_message_consent_3,
            R.string.security_settings_fingerprint_v2_enroll_introduction_footer_message_consent_4,
            R.string.security_settings_fingerprint_v2_enroll_introduction_footer_message_consent_5
    };

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);