Add string ids to the result bundle for parental consent.
Bug: 198491515
Test: N/A (builds)
Change-Id: Id120f5f7a7e923f9d3ce7dd38d3e5214296ca219
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 1951718..b069a35 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -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] -->
diff --git a/src/com/android/settings/biometrics/ParentalConsentHelper.java b/src/com/android/settings/biometrics/ParentalConsentHelper.java
index 6c4004e..e0e082b 100644
--- a/src/com/android/settings/biometrics/ParentalConsentHelper.java
+++ b/src/com/android/settings/biometrics/ParentalConsentHelper.java
@@ -48,6 +48,10 @@
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 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;
}
diff --git a/src/com/android/settings/biometrics/face/FaceEnrollParentalConsent.java b/src/com/android/settings/biometrics/face/FaceEnrollParentalConsent.java
index 183e05e..54466f9 100644
--- a/src/com/android/settings/biometrics/face/FaceEnrollParentalConsent.java
+++ b/src/com/android/settings/biometrics/face/FaceEnrollParentalConsent.java
@@ -33,6 +33,21 @@
*/
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);
diff --git a/src/com/android/settings/biometrics/fingerprint/FingerprintEnrollParentalConsent.java b/src/com/android/settings/biometrics/fingerprint/FingerprintEnrollParentalConsent.java
index a95a912..22212f2 100644
--- a/src/com/android/settings/biometrics/fingerprint/FingerprintEnrollParentalConsent.java
+++ b/src/com/android/settings/biometrics/fingerprint/FingerprintEnrollParentalConsent.java
@@ -33,6 +33,20 @@
*/
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);