diff --git a/res/layout/face_remove_button.xml b/res/layout/face_remove_button.xml index 98459f09422..a05fb85a85b 100644 --- a/res/layout/face_remove_button.xml +++ b/res/layout/face_remove_button.xml @@ -26,6 +26,6 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="start" - android:text="@string/security_settings_face_settings_remove_face_data"/> + android:text="@string/security_settings_face_settings_remove_face_model"/> \ No newline at end of file diff --git a/res/values/strings.xml b/res/values/strings.xml index 68922df8c05..a2282b5564f 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -853,8 +853,6 @@ Always require confirmation When using face unlock in apps, always require confirmation step - - Delete face data Delete face model @@ -866,9 +864,9 @@ Keep in mind:\nLooking at the phone can unlock it when you don\u2019t intend to.\n\nYour phone can be unlocked by someone else if it\u2019s held up to your face, even if your eyes are closed.\n\nYour phone can be unlocked by someone who looks a lot like you, say, an identical sibling. - Delete face data? + Delete face model? - The face data used by face unlock will be permanently and securely deleted. After removal, you will need your PIN, pattern, or password to unlock your phone, sign in to apps, and confirm payments. + Your face model will be permanently and securely deleted. After deletion, you will need your PIN, pattern, or password to unlock your phone or for authentication in apps. Delete face model? @@ -1464,43 +1462,42 @@ Turn off screen lock - Remove device protection? + Delete screen lock? Remove profile protection? - "Device protection features will not work without your pattern." + "A pattern protects your phone if it\u2019s lost or stolen" - "Device protection features will not work without your pattern.\n\nYour saved fingerprints will also be removed from this device and you won\'t be able to unlock your phone, authorize purchases, or sign in to apps with them." + "A pattern protects your phone if it\u2019s lost or stolen.\n\nThis also deletes the fingerprint model stored on your device. You won\u2019t be able to use your fingerprint for authentication in apps." + + "A pattern protects your phone if it\u2019s lost or stolen.\n\nYour face model will also be permanently and securely deleted. You won\u2019t be able to use your face for authentication in apps." + + "A pattern protects your phone if it\u2019s lost or stolen.\n\nThis deletes the fingerprint model stored on your device. Your face model will also be permanently and securely deleted. You won\u2019t be able to use your face or fingerprint for authentication in apps." - "Device protection features will not work without your PIN." + "A PIN protects your phone if it\u2019s lost or stolen" - "Device protection features will not work without your PIN.\n\nYour saved fingerprints will also be removed from this device and you won\'t be able to unlock your phone, authorize purchases, or sign in to apps with them." + "A PIN protects your phone if it\u2019s lost or stolen.\n\nThis also deletes the fingerprint model stored on your device. You won\u2019t be able to use your fingerprint for authentication in apps." + + "A PIN protects your phone if it\u2019s lost or stolen.\n\nYour face model will also be permanently and securely deleted. You won\u2019t be able to use your face for authentication in apps." + + "A PIN protects your phone if it\u2019s lost or stolen.\n\nThis deletes the fingerprint model stored on your device. Your face model will also be permanently and securely deleted. You won\u2019t be able to use your face or fingerprint for authentication in apps." - "Device protection features will not work without your password." + "A password protects your phone if it\u2019s lost or stolen" - "Device protection features will not work without your password.\n\nYour saved fingerprints will also be removed from this device and you won\'t be able to unlock your phone, authorize purchases, or sign in to apps with them." + "A password protects your phone if it\u2019s lost or stolen.\n\nThis also deletes the fingerprint model stored on your device. You won\u2019t be able to use your fingerprint for authentication in apps." + + "A password protects your phone if it\u2019s lost or stolen.\n\nYour face model will also be permanently and securely deleted. You won\u2019t be able to use your face for authentication in apps." + + "A password protects your phone if it\u2019s lost or stolen.\n\nThis deletes the fingerprint model stored on your device. Your face model will also be permanently and securely deleted. You won\u2019t be able to use your face or fingerprint for authentication in apps." "Device protection features will not work without your screen lock." - "Device protection features will not work without your screen lock.\n\nYour saved fingerprints will also be removed from this device and you won\'t be able to unlock your phone, authorize purchases, or sign in to apps with them." - - - "Profile protection features will not work without your pattern." - - "Profile protection features will not work without your pattern.\n\nYour saved fingerprints will also be removed from this profile and you won\'t be able to unlock your profile, authorize purchases, or sign in to apps with them." - - "Profile protection features will not work without your PIN." - - "Profile protection features will not work without your PIN.\n\nYour saved fingerprints will also be removed from this profile and you won\'t be able to unlock your profile, authorize purchases, or sign in to apps with them." - - "Profile protection features will not work without your password." - - "Profile protection features will not work without your password.\n\nYour saved fingerprints will also be removed from this profile and you won\'t be able to unlock your profile, authorize purchases, or sign in to apps with them." - - "Profile protection features will not work without your screen lock." - - "Profile protection features will not work without your screen lock.\n\nYour saved fingerprints will also be removed from this profile and you won\'t be able to unlock your profile, authorize purchases, or sign in to apps with them." + "Device protection features will not work without your screen lock.\n\nThis also deletes the fingerprint model stored on your device. You won\u2019t be able to use your fingerprint for authentication in apps." + + "Device protection features will not work without your screen lock.\n\nYour face model will also be permanently and securely deleted. You won\u2019t be able to use your face for authentication in apps." + + "Device protection features will not work without your screen lock.\n\nThis deletes the fingerprint model stored on your device. Your face model will also be permanently and securely deleted. You won\u2019t be able to use your face or fingerprint for authentication in apps." Yes, remove diff --git a/res/xml/security_settings_face.xml b/res/xml/security_settings_face.xml index 131f222685c..e1ac9b35b64 100644 --- a/res/xml/security_settings_face.xml +++ b/res/xml/security_settings_face.xml @@ -81,7 +81,7 @@ android:title="@string/security_settings_face_preference_title"> diff --git a/src/com/android/settings/password/ChooseLockGeneric.java b/src/com/android/settings/password/ChooseLockGeneric.java index b8e1165cffe..67fc7efc67c 100644 --- a/src/com/android/settings/password/ChooseLockGeneric.java +++ b/src/com/android/settings/password/ChooseLockGeneric.java @@ -975,31 +975,38 @@ public class ChooseLockGeneric extends SettingsActivity { private int getResIdForFactoryResetProtectionWarningMessage() { final boolean hasFingerprints; + final boolean hasFace; if (mFingerprintManager != null && mFingerprintManager.isHardwareDetected()) { hasFingerprints = mFingerprintManager.hasEnrolledFingerprints(mUserId); } else { hasFingerprints = false; } + + if (mFaceManager != null && mFaceManager.isHardwareDetected()) { + hasFace = mFaceManager.hasEnrolledTemplates(mUserId); + } else { + hasFace = false; + } + switch (mLockPatternUtils.getKeyguardStoredPasswordQuality(mUserId)) { case DevicePolicyManager.PASSWORD_QUALITY_SOMETHING: - if (hasFingerprints && mIsManagedProfile) { - return R.string - .unlock_disable_frp_warning_content_pattern_fingerprint_profile; - } else if (hasFingerprints && !mIsManagedProfile) { + if (hasFingerprints && hasFace) { + return R.string.unlock_disable_frp_warning_content_pattern_face_fingerprint; + } else if (hasFingerprints) { return R.string.unlock_disable_frp_warning_content_pattern_fingerprint; - } else if (mIsManagedProfile) { - return R.string.unlock_disable_frp_warning_content_pattern_profile; + } else if (hasFace) { + return R.string.unlock_disable_frp_warning_content_pattern_face; } else { return R.string.unlock_disable_frp_warning_content_pattern; } case DevicePolicyManager.PASSWORD_QUALITY_NUMERIC: case DevicePolicyManager.PASSWORD_QUALITY_NUMERIC_COMPLEX: - if (hasFingerprints && mIsManagedProfile) { - return R.string.unlock_disable_frp_warning_content_pin_fingerprint_profile; - } else if (hasFingerprints && !mIsManagedProfile) { + if (hasFingerprints && hasFace) { + return R.string.unlock_disable_frp_warning_content_pin_face_fingerprint; + } else if (hasFingerprints) { return R.string.unlock_disable_frp_warning_content_pin_fingerprint; - } else if (mIsManagedProfile) { - return R.string.unlock_disable_frp_warning_content_pin_profile; + } else if (hasFace) { + return R.string.unlock_disable_frp_warning_content_pin_face; } else { return R.string.unlock_disable_frp_warning_content_pin; } @@ -1007,24 +1014,23 @@ public class ChooseLockGeneric extends SettingsActivity { case DevicePolicyManager.PASSWORD_QUALITY_ALPHANUMERIC: case DevicePolicyManager.PASSWORD_QUALITY_COMPLEX: case DevicePolicyManager.PASSWORD_QUALITY_MANAGED: - if (hasFingerprints && mIsManagedProfile) { + if (hasFingerprints && hasFace) { return R.string - .unlock_disable_frp_warning_content_password_fingerprint_profile; - } else if (hasFingerprints && !mIsManagedProfile) { + .unlock_disable_frp_warning_content_password_face_fingerprint; + } else if (hasFingerprints) { return R.string.unlock_disable_frp_warning_content_password_fingerprint; - } else if (mIsManagedProfile) { - return R.string.unlock_disable_frp_warning_content_password_profile; + } else if (hasFace) { + return R.string.unlock_disable_frp_warning_content_password_face; } else { return R.string.unlock_disable_frp_warning_content_password; } default: - if (hasFingerprints && mIsManagedProfile) { - return R.string - .unlock_disable_frp_warning_content_unknown_fingerprint_profile; - } else if (hasFingerprints && !mIsManagedProfile) { + if (hasFingerprints && hasFace) { + return R.string.unlock_disable_frp_warning_content_unknown_face_fingerprint; + } else if (hasFingerprints) { return R.string.unlock_disable_frp_warning_content_unknown_fingerprint; - } else if (mIsManagedProfile) { - return R.string.unlock_disable_frp_warning_content_unknown_profile; + } else if (hasFace) { + return R.string.unlock_disable_frp_warning_content_unknown_face; } else { return R.string.unlock_disable_frp_warning_content_unknown; }