From 4af5a3644d93261d999694b6c6cc02635ae1f661 Mon Sep 17 00:00:00 2001 From: Joe Bolinger Date: Mon, 14 Jun 2021 18:50:13 -0700 Subject: [PATCH] Update strings for parental consent flow in setup wizard. Bug: 188847063 Test: manual Change-Id: I044be874818f6563a47c3f7c8c5011b3cab31ae9 --- .../ic_face_enroll_introduction_shield.xml | 45 ----- res/layout/face_enroll_introduction.xml | 62 ++----- .../fingerprint_enroll_introduction.xml | 171 ++++++++++-------- res/values/strings.xml | 38 +++- .../face/FaceEnrollIntroduction.java | 38 +++- .../face/FaceEnrollParentalConsent.java | 39 ++++ .../FingerprintEnrollIntroduction.java | 49 ++++- .../FingerprintEnrollParentalConsent.java | 38 ++++ 8 files changed, 295 insertions(+), 185 deletions(-) delete mode 100644 res/drawable/ic_face_enroll_introduction_shield.xml diff --git a/res/drawable/ic_face_enroll_introduction_shield.xml b/res/drawable/ic_face_enroll_introduction_shield.xml deleted file mode 100644 index 09d3909cbe1..00000000000 --- a/res/drawable/ic_face_enroll_introduction_shield.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/res/layout/face_enroll_introduction.xml b/res/layout/face_enroll_introduction.xml index 77a10197f1b..2887bcac277 100644 --- a/res/layout/face_enroll_introduction.xml +++ b/res/layout/face_enroll_introduction.xml @@ -30,7 +30,9 @@ android:layout_height="wrap_content" android:clipChildren="false" android:clipToPadding="false" - android:orientation="vertical"> + android:orientation="vertical" + android:layout_marginStart="?attr/sudMarginStart" + android:layout_marginEnd="?attr/sudMarginEnd"> + - - - + android:textSize="16sp"/> - - - - - - - - - - - - - + android:textSize="16sp"/> + + android:textSize="16sp"/> + @@ -184,12 +155,11 @@ android:layout_height="24dp"/> + android:textSize="16sp"/> diff --git a/res/layout/fingerprint_enroll_introduction.xml b/res/layout/fingerprint_enroll_introduction.xml index beac124f6e8..65c1497d9ff 100644 --- a/res/layout/fingerprint_enroll_introduction.xml +++ b/res/layout/fingerprint_enroll_introduction.xml @@ -30,7 +30,9 @@ android:layout_height="wrap_content" android:clipChildren="false" android:clipToPadding="false" - android:orientation="vertical"> + android:orientation="vertical" + android:layout_marginStart="?attr/sudMarginStart" + android:layout_marginEnd="?attr/sudMarginEnd"> + - + android:textColor="?android:attr/textColorPrimary" + android:textSize="20sp"/> + android:paddingTop="24dp"> + android:textColor="?android:attr/textColorPrimary" + android:textSize="16sp"/> + android:paddingTop="24dp"> + android:textColor="?android:attr/textColorPrimary" + android:textSize="16sp"/> + + - + android:textColor="?android:attr/textColorPrimary" + android:textSize="20sp"/> + android:paddingTop="24dp"> + + + + + + + + + + + + + + + + + + + + android:text="@string/security_settings_fingerprint_v2_enroll_introduction_message_learn_more" + android:textColor="?android:attr/textColorPrimary" + android:textSize="16sp"/> - - - - - - - - - - - - - - - - - diff --git a/res/values/strings.xml b/res/values/strings.xml index 0302461559c..62ac59d750f 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -783,6 +783,8 @@ Use your face to authenticate Use your face to unlock your phone, authorize purchases, or sign in to apps. + + 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. Use your face to unlock your phone or approve purchases.\n\nNote: You can\u2019t use your face to unlock this device. For more information, contact your organization\u2019s admin. @@ -791,18 +793,26 @@ + + - - + + + + + + + + Center your face in the circle @@ -897,10 +907,14 @@ Use your fingerprint - Just touch the fingerprint sensor to unlock your phone, authorize purchases, or sign in to apps. Be careful whose fingerprints you add. Even one added print can do any of these things. + Use your fingerprint to unlock your phone or verify it\u2019s you, like when you sign in to apps or approve a purchase. + + Allow your child to use their fingerprint to unlock their phone or verify it\u2019s them. This happens when they sign in to apps, approve a purchase, and more. You\u2019re in control + You and your child are in control + Keep in mind The data recorded by Fingerprint is stored securely and never leaves your phone. You can delete your data anytime in Settings. @@ -939,13 +953,21 @@ How it works - Fingerprint Unlock creates a unique model of your fingerprint to recognize you during authentication. To create this fingerprint model during setup, you will take images of your fingerprint from different positions. + Fingerprint Unlock creates a unique model of your fingerprint to verify it\u2019s you. To create this fingerprint model during setup, you will take images of your fingerprint from different positions. + + Fingerprint Unlock creates a unique model of your child\u2019s fingerprint to verify it\u2019s them. To create this fingerprint model during setup, they will take images of their fingerprint from different positions. - The phone will also use images from your interactions with Fingerprint Unlock to update your fingerprint model. Images used to create your fingerprint model are never stored, but the fingerprint model is stored securely on your phone and never leaves the phone. All processing occurs securely on your phone. - - You can delete your fingerprint model, or turn off Fingerprint Unlock at any time in Settings. Fingerprint models are stored on the phone until you delete them. + When you use Pixel Imprint, images are used to update your fingerprint model. Images used to create your fingerprint model are never stored, but the fingerprint model is stored securely on your phone and never leaves the phone. All processing occurs securely on your phone. + + When they use Pixel Imprint, images are used to update their fingerprint model. Images used to create your child\u2019s fingerprint model are never stored, but the fingerprint model is stored securely on the phone and never leaves the phone. All processing occurs securely on the phone. + + You can delete your fingerprint images and model, or turn off Fingerprint Unlock at any time in Settings. Fingerprint images and models are stored on the phone until you delete them. + + You and your child can delete their fingerprint images and model, or turn off Fingerprint Unlock at any time in Settings. Fingerprint images and models are stored on the phone until they\u2019re deleted. Your phone can be unlocked when you don\u2019t intend to, like if someone holds it up to your finger. + + Your child\u2019s phone can be unlocked when they don\u2019t intend to, like if someone holds it up to their finger. @@ -965,7 +987,7 @@ You\u2019ve reached the maximum number of attempts - Use your fingerprint to unlock your phone or for authentication, like when you sign in to apps or approve a purchase\n\nLearn more + Use your fingerprint to unlock your phone or verify it\u2019s you, like when you sign in to apps or approve a purchase.\n\nLearn more diff --git a/src/com/android/settings/biometrics/face/FaceEnrollIntroduction.java b/src/com/android/settings/biometrics/face/FaceEnrollIntroduction.java index fc13a8c6161..91cc3a9bfdc 100644 --- a/src/com/android/settings/biometrics/face/FaceEnrollIntroduction.java +++ b/src/com/android/settings/biometrics/face/FaceEnrollIntroduction.java @@ -76,10 +76,19 @@ public class FaceEnrollIntroduction extends BiometricEnrollIntroduction { final ImageView iconGlasses = findViewById(R.id.icon_glasses); final ImageView iconLooking = findViewById(R.id.icon_looking); - final ImageView iconSecurity = findViewById(R.id.icon_security); iconGlasses.getBackground().setColorFilter(getIconColorFilter()); iconLooking.getBackground().setColorFilter(getIconColorFilter()); - iconSecurity.getBackground().setColorFilter(getIconColorFilter()); + + final TextView infoMessageGlasses = findViewById(R.id.info_message_glasses); + final TextView infoMessageLooking = findViewById(R.id.info_message_looking); + final TextView howMessage = findViewById(R.id.how_message); + final TextView inControlTitle = findViewById(R.id.title_in_control); + final TextView inControlMessage = findViewById(R.id.message_in_control); + infoMessageGlasses.setText(getInfoMessageGlasses()); + infoMessageLooking.setText(getInfoMessageLooking()); + howMessage.setText(getHowMessage()); + inControlTitle.setText(getInControlTitle()); + inControlMessage.setText(getInControlMessage()); mFaceManager = Utils.getFaceManagerOrNull(this); mFaceFeatureProvider = FeatureFactory.getFactory(getApplicationContext()) @@ -107,6 +116,31 @@ public class FaceEnrollIntroduction extends BiometricEnrollIntroduction { return true; } + @StringRes + protected int getInfoMessageGlasses() { + return R.string.security_settings_face_enroll_introduction_info_glasses; + } + + @StringRes + protected int getInfoMessageLooking() { + return R.string.security_settings_face_enroll_introduction_info_looking; + } + + @StringRes + protected int getHowMessage() { + return R.string.security_settings_face_enroll_introduction_how_message; + } + + @StringRes + protected int getInControlTitle() { + return R.string.security_settings_face_enroll_introduction_control_title; + } + + @StringRes + protected int getInControlMessage() { + return R.string.security_settings_face_enroll_introduction_control_message; + } + @Override protected boolean isDisabledByAdmin() { return RestrictedLockUtilsInternal.checkIfKeyguardFeaturesDisabled( diff --git a/src/com/android/settings/biometrics/face/FaceEnrollParentalConsent.java b/src/com/android/settings/biometrics/face/FaceEnrollParentalConsent.java index 8e80b3958c5..1f55d82145f 100644 --- a/src/com/android/settings/biometrics/face/FaceEnrollParentalConsent.java +++ b/src/com/android/settings/biometrics/face/FaceEnrollParentalConsent.java @@ -19,9 +19,11 @@ package com.android.settings.biometrics.face; import static android.hardware.biometrics.BiometricAuthenticator.TYPE_FACE; import android.content.Intent; +import android.os.Bundle; import android.view.View; import androidx.annotation.Nullable; +import androidx.annotation.StringRes; import com.android.settings.R; @@ -32,6 +34,13 @@ import com.android.settings.R; */ public class FaceEnrollParentalConsent extends FaceEnrollIntroduction { + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + + setDescriptionText(R.string.security_settings_face_enroll_introduction_consent_message); + } + @Override protected void onNextButtonClick(View view) { onConsentResult(true /* granted */); @@ -60,6 +69,36 @@ public class FaceEnrollParentalConsent extends FaceEnrollIntroduction { return false; } + @Override + @StringRes + protected int getInfoMessageGlasses() { + return R.string.security_settings_face_enroll_introduction_info_consent_glasses; + } + + @Override + @StringRes + protected int getInfoMessageLooking() { + return R.string.security_settings_face_enroll_introduction_info_consent_looking; + } + + @Override + @StringRes + protected int getHowMessage() { + return R.string.security_settings_face_enroll_introduction_how_consent_message; + } + + @Override + @StringRes + protected int getInControlTitle() { + return R.string.security_settings_face_enroll_introduction_control_consent_title; + } + + @Override + @StringRes + protected int getInControlMessage() { + return R.string.security_settings_face_enroll_introduction_control_consent_message; + } + @Override protected int getHeaderResDefault() { return R.string.security_settings_face_enroll_consent_introduction_title; diff --git a/src/com/android/settings/biometrics/fingerprint/FingerprintEnrollIntroduction.java b/src/com/android/settings/biometrics/fingerprint/FingerprintEnrollIntroduction.java index 5142e21dc49..8c3b1ceb89a 100644 --- a/src/com/android/settings/biometrics/fingerprint/FingerprintEnrollIntroduction.java +++ b/src/com/android/settings/biometrics/fingerprint/FingerprintEnrollIntroduction.java @@ -64,21 +64,62 @@ public class FingerprintEnrollIntroduction extends BiometricEnrollIntroduction { super.onCreate(savedInstanceState); final ImageView iconFingerprint = findViewById(R.id.icon_fingerprint); - final ImageView iconLocked = findViewById(R.id.icon_locked); - final ImageView iconDelete = findViewById(R.id.icon_delete); final ImageView iconInfo = findViewById(R.id.icon_info); final ImageView iconLink = findViewById(R.id.icon_link); iconFingerprint.getDrawable().setColorFilter(getIconColorFilter()); - iconLocked.getDrawable().setColorFilter(getIconColorFilter()); - iconDelete.getDrawable().setColorFilter(getIconColorFilter()); iconInfo.getDrawable().setColorFilter(getIconColorFilter()); iconLink.getDrawable().setColorFilter(getIconColorFilter()); + + final TextView footerMessage2 = findViewById(R.id.footer_message_2); + final TextView footerMessage3 = findViewById(R.id.footer_message_3); + final TextView footerMessage4 = findViewById(R.id.footer_message_4); + final TextView footerMessage5 = findViewById(R.id.footer_message_5); + footerMessage2.setText(getFooterMessage2()); + footerMessage3.setText(getFooterMessage3()); + footerMessage4.setText(getFooterMessage4()); + footerMessage5.setText(getFooterMessage5()); + + final TextView footerTitle1 = findViewById(R.id.footer_title_1); + final TextView footerTitle2 = findViewById(R.id.footer_title_2); + footerTitle1.setText(getFooterTitle1()); + footerTitle2.setText(getFooterTitle2()); } + @StringRes int getNegativeButtonTextId() { return R.string.security_settings_fingerprint_enroll_introduction_skip; } + @StringRes + protected int getFooterTitle1() { + return R.string.security_settings_fingerprint_enroll_introduction_footer_title_1; + } + + @StringRes + protected int getFooterTitle2() { + return R.string.security_settings_fingerprint_enroll_introduction_footer_title_2; + } + + @StringRes + protected int getFooterMessage2() { + return R.string.security_settings_fingerprint_v2_enroll_introduction_footer_message_2; + } + + @StringRes + protected int getFooterMessage3() { + return R.string.security_settings_fingerprint_v2_enroll_introduction_footer_message_3; + } + + @StringRes + protected int getFooterMessage4() { + return R.string.security_settings_fingerprint_v2_enroll_introduction_footer_message_4; + } + + @StringRes + protected int getFooterMessage5() { + return R.string.security_settings_fingerprint_v2_enroll_introduction_footer_message_5; + } + @Override protected boolean isDisabledByAdmin() { return RestrictedLockUtilsInternal.checkIfKeyguardFeaturesDisabled( diff --git a/src/com/android/settings/biometrics/fingerprint/FingerprintEnrollParentalConsent.java b/src/com/android/settings/biometrics/fingerprint/FingerprintEnrollParentalConsent.java index 8920307cfa8..5d8cf9b0423 100644 --- a/src/com/android/settings/biometrics/fingerprint/FingerprintEnrollParentalConsent.java +++ b/src/com/android/settings/biometrics/fingerprint/FingerprintEnrollParentalConsent.java @@ -19,9 +19,11 @@ package com.android.settings.biometrics.fingerprint; import static android.hardware.biometrics.BiometricAuthenticator.TYPE_FINGERPRINT; import android.content.Intent; +import android.os.Bundle; import android.view.View; import androidx.annotation.Nullable; +import androidx.annotation.StringRes; import com.android.settings.R; @@ -32,6 +34,14 @@ import com.android.settings.R; */ public class FingerprintEnrollParentalConsent extends FingerprintEnrollIntroduction { + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + + setDescriptionText( + R.string.security_settings_fingerprint_enroll_introduction_consent_message); + } + @Override protected void onNextButtonClick(View view) { onConsentResult(true /* granted */); @@ -55,6 +65,34 @@ public class FingerprintEnrollParentalConsent extends FingerprintEnrollIntroduct return true; } + @StringRes + @Override + protected int getFooterTitle1() { + return R.string.security_settings_fingerprint_enroll_introduction_footer_title_consent_1; + } + + @StringRes + @Override + protected int getFooterMessage2() { + return R.string.security_settings_fingerprint_v2_enroll_introduction_footer_message_consent_2; + } + + @StringRes + @Override + protected int getFooterMessage3() { + return R.string.security_settings_fingerprint_v2_enroll_introduction_footer_message_consent_3; + } + + @StringRes + protected int getFooterMessage4() { + return R.string.security_settings_fingerprint_v2_enroll_introduction_footer_message_consent_4; + } + + @StringRes + protected int getFooterMessage5() { + return R.string.security_settings_fingerprint_v2_enroll_introduction_footer_message_consent_5; + } + @Override protected int getHeaderResDefault() { return R.string.security_settings_fingerprint_enroll_consent_introduction_title;