summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorAdrian Roos <roosa@google.com>2015-09-03 19:46:45 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-09-03 19:46:45 +0000
commitbd2ad550c5a7c7b7efbe3510f212322fb173b06c (patch)
tree855f01f6f9e5b5044835ac36fd862f9e8459df34 /core
parent54ceea195bdecfcc9e4e11088aa1bb0b9bb5a481 (diff)
parent34411e8fecab310a0402bd77e8fe5a5a488a783a (diff)
downloadframeworks_base-bd2ad550c5a7c7b7efbe3510f212322fb173b06c.zip
frameworks_base-bd2ad550c5a7c7b7efbe3510f212322fb173b06c.tar.gz
frameworks_base-bd2ad550c5a7c7b7efbe3510f212322fb173b06c.tar.bz2
am 34411e8f: Merge "Don\'t disable fingerprint when entering wrong credential" into mnc-dr-dev
* commit '34411e8fecab310a0402bd77e8fe5a5a488a783a': Don't disable fingerprint when entering wrong credential
Diffstat (limited to 'core')
-rw-r--r--core/java/com/android/internal/widget/LockPatternUtils.java13
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;
}
/**