From e72cab0e2ee47a2286cb6add63f664257c7590ca Mon Sep 17 00:00:00 2001 From: Curtis Belmonte Date: Thu, 12 Aug 2021 13:44:48 -0700 Subject: [PATCH] Support "less secure" info row on face enroll intro Adds an info row that can be configured to show on the face enroll introduction screen, indicating the relative security of face compared to other authentication methods (e.g. pattern or PIN). Test: Manual Bug: 196254139 Change-Id: I956083887945ac97d15722b23a14ac458568dd9e --- res/layout/face_enroll_introduction.xml | 23 +++++++++++++++++++ res/values/config.xml | 3 +++ res/values/strings.xml | 2 ++ .../face/FaceEnrollIntroduction.java | 8 +++++++ 4 files changed, 36 insertions(+) diff --git a/res/layout/face_enroll_introduction.xml b/res/layout/face_enroll_introduction.xml index c1c9ac6ad85..5e7a6a1596c 100644 --- a/res/layout/face_enroll_introduction.xml +++ b/res/layout/face_enroll_introduction.xml @@ -107,6 +107,29 @@ style="@style/BiometricEnrollIntroMessage" /> + + + + + + + + + false + true diff --git a/res/values/strings.xml b/res/values/strings.xml index 11625f6016f..41de5539a3b 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -793,6 +793,8 @@ + + diff --git a/src/com/android/settings/biometrics/face/FaceEnrollIntroduction.java b/src/com/android/settings/biometrics/face/FaceEnrollIntroduction.java index ae211778368..707dea9c3a1 100644 --- a/src/com/android/settings/biometrics/face/FaceEnrollIntroduction.java +++ b/src/com/android/settings/biometrics/face/FaceEnrollIntroduction.java @@ -112,6 +112,14 @@ public class FaceEnrollIntroduction extends BiometricEnrollIntroduction { howMessage.setText(getHowMessage()); inControlMessage.setText(getInControlMessage()); + // Set up and show the "less secure" info section if necessary. + if (getResources().getBoolean(R.bool.config_face_intro_show_less_secure)) { + final LinearLayout infoRowLessSecure = findViewById(R.id.info_row_less_secure); + final ImageView iconLessSecure = findViewById(R.id.icon_less_secure); + infoRowLessSecure.setVisibility(View.VISIBLE); + iconLessSecure.getBackground().setColorFilter(getIconColorFilter()); + } + // Set up and show the "require eyes" info section if necessary. if (getResources().getBoolean(R.bool.config_face_intro_show_require_eyes)) { final LinearLayout infoRowRequireEyes = findViewById(R.id.info_row_require_eyes);