diff options
author | Adrian Roos <roosa@google.com> | 2015-09-02 13:23:30 -0700 |
---|---|---|
committer | Adrian Roos <roosa@google.com> | 2015-09-03 12:34:12 -0700 |
commit | af4ab3e2d3665c72889bf2337c744eca6c7d5e86 (patch) | |
tree | c36c1e2047078f29a636018390292ca21e01956d /core | |
parent | f6d51acec69366b6ea34f5e0c9aa8cc840f04a4d (diff) | |
download | frameworks_base-af4ab3e2d3665c72889bf2337c744eca6c7d5e86.zip frameworks_base-af4ab3e2d3665c72889bf2337c744eca6c7d5e86.tar.gz frameworks_base-af4ab3e2d3665c72889bf2337c744eca6c7d5e86.tar.bz2 |
Don't disable fingerprint when entering wrong credential
Bug: 23748205
Change-Id: I0ee2a0562d5ef2992a6a4b40d235601b19dcef16
Diffstat (limited to 'core')
-rw-r--r-- | core/java/com/android/internal/widget/LockPatternUtils.java | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/core/java/com/android/internal/widget/LockPatternUtils.java b/core/java/com/android/internal/widget/LockPatternUtils.java index a3a01da..4ac2958 100644 --- a/core/java/com/android/internal/widget/LockPatternUtils.java +++ b/core/java/com/android/internal/widget/LockPatternUtils.java @@ -232,7 +232,7 @@ public class LockPatternUtils { public void reportFailedPasswordAttempt(int userId) { getDevicePolicyManager().reportFailedPasswordAttempt(userId); getTrustManager().reportUnlockAttempt(false /* authenticated */, userId); - requireCredentialEntry(userId); + requireStrongAuth(StrongAuthTracker.SOME_AUTH_REQUIRED_AFTER_WRONG_CREDENTIAL, userId); } public void reportSuccessfulPasswordAttempt(int userId) { @@ -1281,10 +1281,17 @@ public class LockPatternUtils { */ public static final int STRONG_AUTH_REQUIRED_AFTER_LOCKOUT = 0x8; + /** + * Some authentication is required because the user has entered a wrong credential. + */ + public static final int SOME_AUTH_REQUIRED_AFTER_WRONG_CREDENTIAL = 0x10; + public static final int DEFAULT = STRONG_AUTH_REQUIRED_AFTER_BOOT; - final SparseIntArray mStrongAuthRequiredForUser = new SparseIntArray(); + private static final int ALLOWING_FINGERPRINT = STRONG_AUTH_NOT_REQUIRED + | SOME_AUTH_REQUIRED_AFTER_WRONG_CREDENTIAL; + private final SparseIntArray mStrongAuthRequiredForUser = new SparseIntArray(); private final H mHandler; public StrongAuthTracker() { @@ -1323,7 +1330,7 @@ public class LockPatternUtils { * current strong authentication requirements. */ public boolean isFingerprintAllowedForUser(int userId) { - return getStrongAuthForUser(userId) == STRONG_AUTH_NOT_REQUIRED; + return (getStrongAuthForUser(userId) & ~ALLOWING_FINGERPRINT) == 0; } /** |