summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Danielle Millett <dmillett@google.com> 2011-10-03 17:36:01 -0400
committer Danielle Millett <dmillett@google.com> 2011-10-04 21:01:52 -0400
commit7a07219a1fc8cb94ea2694025e26f70d652ad2a1 (patch)
treea8e16399de9a5196dab772e12d899409243573b6
parent8c60235b550ecbd5cba594584f78ef6630953e56 (diff)
Adding a flag for if biometric weak has ever been used
This flag will be used to show a tutorial screen first time it is used. The flag is set to true once facelock has been set (via the savePassword or savePattern when in fallback mode) Change-Id: I43e3f876810fd32d3d5a5a285201e8054c4b3098
-rw-r--r--core/java/com/android/internal/widget/LockPatternUtils.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/core/java/com/android/internal/widget/LockPatternUtils.java b/core/java/com/android/internal/widget/LockPatternUtils.java
index 4d1276c54368..aa46ea23afeb 100644
--- a/core/java/com/android/internal/widget/LockPatternUtils.java
+++ b/core/java/com/android/internal/widget/LockPatternUtils.java
@@ -119,6 +119,8 @@ public class LockPatternUtils {
private final static String LOCKSCREEN_OPTIONS = "lockscreen.options";
public final static String LOCKSCREEN_BIOMETRIC_WEAK_FALLBACK
= "lockscreen.biometric_weak_fallback";
+ public final static String BIOMETRIC_WEAK_EVER_CHOSEN_KEY
+ = "lockscreen.biometricweakeverchosen";
private final static String PASSWORD_HISTORY_KEY = "lockscreen.passwordhistory";
@@ -341,6 +343,16 @@ public class LockPatternUtils {
}
/**
+ * Return true if the user has ever chosen biometric weak. This is true even if biometric
+ * weak is not current set.
+ *
+ * @return True if the user has ever chosen biometric weak.
+ */
+ public boolean isBiometricWeakEverChosen() {
+ return getBoolean(BIOMETRIC_WEAK_EVER_CHOSEN_KEY);
+ }
+
+ /**
* Used by device policy manager to validate the current password
* information it has.
*/
@@ -479,6 +491,7 @@ public class LockPatternUtils {
setLong(PASSWORD_TYPE_KEY, DevicePolicyManager.PASSWORD_QUALITY_BIOMETRIC_WEAK);
setLong(PASSWORD_TYPE_ALTERNATE_KEY,
DevicePolicyManager.PASSWORD_QUALITY_SOMETHING);
+ setBoolean(BIOMETRIC_WEAK_EVER_CHOSEN_KEY, true);
moveTempGallery();
}
dpm.setActivePasswordState(DevicePolicyManager.PASSWORD_QUALITY_SOMETHING, pattern
@@ -596,6 +609,7 @@ public class LockPatternUtils {
} else {
setLong(PASSWORD_TYPE_KEY, DevicePolicyManager.PASSWORD_QUALITY_BIOMETRIC_WEAK);
setLong(PASSWORD_TYPE_ALTERNATE_KEY, Math.max(quality, computedQuality));
+ setBoolean(BIOMETRIC_WEAK_EVER_CHOSEN_KEY, true);
moveTempGallery();
}
if (computedQuality != DevicePolicyManager.PASSWORD_QUALITY_UNSPECIFIED) {