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
This commit is contained in:
Curtis Belmonte
2021-08-12 13:44:48 -07:00
parent eb79498e0f
commit e72cab0e2e
4 changed files with 36 additions and 0 deletions

View File

@@ -107,6 +107,29 @@
style="@style/BiometricEnrollIntroMessage" />
</LinearLayout>
<LinearLayout
android:id="@+id/info_row_less_secure"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:visibility="gone">
<ImageView
android:id="@+id/icon_less_secure"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/ic_info_outline_24dp"/>
<Space
android:layout_width="16dp"
android:layout_height="wrap_content"/>
<TextView
android:id="@+id/info_message_less_secure"
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/BiometricEnrollIntroMessage"
android:text="@string/security_settings_face_enroll_introduction_info_less_secure" />
</LinearLayout>
<LinearLayout
android:id="@+id/info_row_require_eyes"
android:layout_width="match_parent"

View File

@@ -269,6 +269,9 @@
<!-- ComponentName to launch a vendor-specific enrollment activity if available -->
<string name="config_face_enroll" translatable="false"></string>
<!-- Whether to show the "less secure" info section on the face enroll intro screen -->
<bool name="config_face_intro_show_less_secure">false</bool>
<!-- Whether to show the "require eyes" info section on the face enroll intro screen -->
<bool name="config_face_intro_show_require_eyes">true</bool>

View File

@@ -793,6 +793,8 @@
<string name="security_settings_face_enroll_introduction_info_looking"></string>
<!-- Message on the face enrollment introduction page that provides information about what could cause the phone to unlock when asking for parental consent. [CHAR LIMIT=NONE] -->
<string name="security_settings_face_enroll_introduction_info_consent_looking"></string>
<!-- Message on the face enrollment introduction page that provides information about the relative security of face for unlocking the phone. [CHAR LIMIT=NONE] -->
<string name="security_settings_face_enroll_introduction_info_less_secure"></string>
<!-- Message on the face enrollment introduction page that provides information about how to require eyes to be open for Face Unlock. [CHAR LIMIT=NONE] -->
<string name="security_settings_face_enroll_introduction_info_gaze"></string>
<!-- Message on the face enrollment introduction page that provides information about how to require eyes to be open for Face Unlock when asking for parental consent. [CHAR LIMIT=NONE] -->

View File

@@ -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);