<!-- Security settings screen when using face unlock, setting option name to start an activity that allows the user to improve accuracy by adding additional enrollment faces -->
<string name="biometric_weak_improve_matching_title">Improve face matching</string>
+ <!-- On the security settings screen when using face unlock. This checkbox is used to toggle whether liveliness detection is required. If it is checked the user must blink during unlock to prove it's not a photo -->
+ <string name="biometric_weak_liveliness_title">Require eye blink</string>
+ <!-- On the security settings screen when using face unlock. The summary of the liveliness checkbox -->
+ <string name="biometric_weak_liveliness_summary" product="default">Prevent others from using a photo of you to unlock your phone</string>
+ <!-- On the security settings screen when using face unlock. The summary of the liveliness checkbox -->
+ <string name="biometric_weak_liveliness_summary" product="tablet">Prevent others from using a photo of you to unlock your tablet</string>
+
<!-- Security settings screen, setting option name to change screen timeout -->
<string name="lock_after_timeout">Automatically lock</string>
android:title="@string/biometric_weak_improve_matching_title"/>
<CheckBoxPreference
+ android:key="biometric_weak_liveliness"
+ android:title="@string/biometric_weak_liveliness_title"
+ android:summary="@string/biometric_weak_liveliness_summary"/>
+
+ <CheckBoxPreference
android:key="visiblepattern"
android:title="@string/lockpattern_settings_enable_visible_pattern_title"/>
private static final String KEY_UNLOCK_SET_OR_CHANGE = "unlock_set_or_change";
private static final String KEY_BIOMETRIC_WEAK_IMPROVE_MATCHING =
"biometric_weak_improve_matching";
+ private static final String KEY_BIOMETRIC_WEAK_LIVELINESS = "biometric_weak_liveliness";
private static final String KEY_LOCK_ENABLED = "lockenabled";
private static final String KEY_VISIBLE_PATTERN = "visiblepattern";
private static final String KEY_TACTILE_FEEDBACK_ENABLED = "unlock_tactile_feedback";
private LockPatternUtils mLockPatternUtils;
private ListPreference mLockAfter;
+ private CheckBoxPreference mBiometricWeakLiveliness;
private CheckBoxPreference mVisiblePattern;
private CheckBoxPreference mTactileFeedback;
updateLockAfterPreferenceSummary();
}
+ // biometric weak liveliness
+ mBiometricWeakLiveliness =
+ (CheckBoxPreference) root.findPreference(KEY_BIOMETRIC_WEAK_LIVELINESS);
+
// visible pattern
mVisiblePattern = (CheckBoxPreference) root.findPreference(KEY_VISIBLE_PATTERN);
createPreferenceHierarchy();
final LockPatternUtils lockPatternUtils = mChooseLockSettingsHelper.utils();
+ if (mBiometricWeakLiveliness != null) {
+ mBiometricWeakLiveliness.setChecked(
+ lockPatternUtils.isBiometricWeakLivelinessEnabled());
+ }
if (mVisiblePattern != null) {
mVisiblePattern.setChecked(lockPatternUtils.isVisiblePatternEnabled());
}
CONFIRM_EXISTING_FOR_BIOMETRIC_IMPROVE_REQUEST, null, null)) {
startBiometricWeakImprove(); // no password set, so no need to confirm
}
+ } else if (KEY_BIOMETRIC_WEAK_LIVELINESS.equals(key)) {
+ lockPatternUtils.setBiometricWeakLivelinessEnabled(isToggled(preference));
} else if (KEY_LOCK_ENABLED.equals(key)) {
lockPatternUtils.setLockPatternEnabled(isToggled(preference));
} else if (KEY_VISIBLE_PATTERN.equals(key)) {