summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorJim Miller <jaggies@google.com>2015-09-02 23:19:26 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-09-02 23:19:26 +0000
commitf873f9ab6e2f59ebedbc1542ad780040e539f867 (patch)
treea735b1cea15ec6bd043324617e93be5a22057ac5 /services
parent1afe952ca1964a43d8a1ec3dd69a8ee1b85dba17 (diff)
parentbd5b61c489fb0543c8db29030e57189c273010eb (diff)
downloadframeworks_base-f873f9ab6e2f59ebedbc1542ad780040e539f867.zip
frameworks_base-f873f9ab6e2f59ebedbc1542ad780040e539f867.tar.gz
frameworks_base-f873f9ab6e2f59ebedbc1542ad780040e539f867.tar.bz2
am bd5b61c4: Merge "Fingerprint should throttle after 5 attempts" into mnc-dr-dev
* commit 'bd5b61c489fb0543c8db29030e57189c273010eb': Fingerprint should throttle after 5 attempts
Diffstat (limited to 'services')
-rw-r--r--services/core/java/com/android/server/fingerprint/FingerprintService.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/services/core/java/com/android/server/fingerprint/FingerprintService.java b/services/core/java/com/android/server/fingerprint/FingerprintService.java
index 67c9ee8..0023258 100644
--- a/services/core/java/com/android/server/fingerprint/FingerprintService.java
+++ b/services/core/java/com/android/server/fingerprint/FingerprintService.java
@@ -259,7 +259,7 @@ public class FingerprintService extends SystemService implements IBinder.DeathRe
}
private boolean inLockoutMode() {
- return mFailedAttempts > MAX_FAILED_ATTEMPTS;
+ return mFailedAttempts >= MAX_FAILED_ATTEMPTS;
}
private void resetFailedAttempts() {
@@ -275,7 +275,7 @@ public class FingerprintService extends SystemService implements IBinder.DeathRe
private boolean handleFailedAttempt(ClientMonitor clientMonitor) {
mFailedAttempts++;
- if (mFailedAttempts > MAX_FAILED_ATTEMPTS) {
+ if (inLockoutMode()) {
// Failing multiple times will continue to push out the lockout time.
mHandler.removeCallbacks(mLockoutReset);
mHandler.postDelayed(mLockoutReset, FAIL_LOCKOUT_TIMEOUT_MS);