From 81dc0295d7e2aa1f67459b67a1ba8187d274e534 Mon Sep 17 00:00:00 2001 From: Kevin Chyn Date: Thu, 28 Jun 2018 14:59:38 -0700 Subject: [PATCH] 2/n: Add face to ChooseLock* Bug: 110589286 Test: manual Test: make -j56 RunSettingsRoboTests Test: setting up new fingerprint still works Change-Id: I1b7d2bb6bb417dae2c99e5abeb68d3f694cb3cb8 --- .../choose_lock_generic_face_header.xml | 27 ++++ ...choose_lock_generic_biometrics_header.xml} | 2 +- res/values/strings.xml | 33 ++++- res/values/styles.xml | 6 + res/xml/security_settings_picker.xml | 5 + .../settings/EncryptionInterstitial.java | 10 +- .../settings/password/ChooseLockGeneric.java | 29 +++- .../settings/password/ChooseLockPassword.java | 106 +++++++++++---- .../settings/password/ChooseLockPattern.java | 44 ++++-- .../password/ChooseLockSettingsHelper.java | 1 + .../password/SetNewPasswordController.java | 37 ++++- .../password/SetupChooseLockGeneric.java | 4 +- .../SetNewPasswordControllerTest.java | 127 +++++++++++++++++- 13 files changed, 383 insertions(+), 48 deletions(-) create mode 100644 res/layout/choose_lock_generic_face_header.xml rename res/layout/{setup_choose_lock_generic_fingerprint_header.xml => setup_choose_lock_generic_biometrics_header.xml} (92%) diff --git a/res/layout/choose_lock_generic_face_header.xml b/res/layout/choose_lock_generic_face_header.xml new file mode 100644 index 00000000000..b97b0d6048e --- /dev/null +++ b/res/layout/choose_lock_generic_face_header.xml @@ -0,0 +1,27 @@ + + + + diff --git a/res/layout/setup_choose_lock_generic_fingerprint_header.xml b/res/layout/setup_choose_lock_generic_biometrics_header.xml similarity index 92% rename from res/layout/setup_choose_lock_generic_fingerprint_header.xml rename to res/layout/setup_choose_lock_generic_biometrics_header.xml index ec5d750f896..ca808e87893 100644 --- a/res/layout/setup_choose_lock_generic_fingerprint_header.xml +++ b/res/layout/setup_choose_lock_generic_biometrics_header.xml @@ -23,4 +23,4 @@ android:paddingEnd="?android:attr/listPreferredItemPaddingEnd" android:paddingTop="@dimen/suw_description_glif_margin_top" android:paddingBottom="@dimen/suw_description_glif_margin_bottom_lists" - android:text="@string/lock_settings_picker_fingerprint_added_security_message" /> + android:text="@string/lock_settings_picker_biometrics_added_security_message" /> diff --git a/res/values/strings.xml b/res/values/strings.xml index 0ff5318fe72..2d80b855dd2 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -1220,7 +1220,7 @@ Protect your phone - For added security, set a backup screen lock + For added security, set a backup screen lock Prevent others from using this tablet without your permission by activating device protection features. Choose the screen lock you want to use. @@ -1232,6 +1232,9 @@ Choose your backup screen lock method + + Choose your backup screen lock method + Screen lock options @@ -1307,6 +1310,21 @@ You can unlock your phone using your fingerprint. For security, this option requires a backup screen lock. + + Face authentication + Pattern + + + Face authentication + PIN + + + Face authentication + Password + + + Continue without face authentication + + + You can unlock your phone using your face. For security, this option requires a backup screen lock. + Disabled by admin, encryption policy, or credential storage @@ -3723,6 +3741,12 @@ PIN has been set Pattern has been set + + To use face authentication, set password + + To use face authentication, set pattern + + To use face authentication, set PIN @@ -8226,6 +8250,13 @@ In addition to using your fingerprint to unlock your device, you can further protect this device by requiring your password before it starts up. Until the device starts up, it can\u2019t receive calls, messages, or notifications, including alarms.\n\nThis helps protect data on lost or stolen devices. Require password to start your device? + + In addition to using your face to unlock your device, you can further protect this device by requiring your PIN before it starts up. Until the device starts up, it can\u2019t receive calls, messages, or notifications, including alarms.\n\nThis helps protect data on lost or stolen devices. Require PIN to start your device? + + In addition to using your face to unlock your device, you can further protect this device by requiring your pattern before it starts up. Until the device starts up, it can\u2019t receive calls, messages, or notifications, including alarms.\n\nThis helps protect data on lost or stolen devices. Require pattern to start your device? + + In addition to using your face to unlock your device, you can further protect this device by requiring your password before it starts up. Until the device starts up, it can\u2019t receive calls, messages, or notifications, including alarms.\n\nThis helps protect data on lost or stolen devices. Require password to start your device? + Yes diff --git a/res/values/styles.xml b/res/values/styles.xml index ba462d86be1..4e5bdda6c69 100644 --- a/res/values/styles.xml +++ b/res/values/styles.xml @@ -410,6 +410,12 @@ 1.2 + +