summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorJim Miller <jaggies@google.com>2015-09-02 15:35:33 -0700
committerJim Miller <jaggies@google.com>2015-09-02 15:35:33 -0700
commit73633ddbcf285f328f9c0183dadafde24e2da2f4 (patch)
treeaa672f01afc7872613ebb9d4e68d80eaec83d195 /services
parent7bae31f88f8dcaf8114d9d43b29e154bc23374ad (diff)
downloadframeworks_base-73633ddbcf285f328f9c0183dadafde24e2da2f4.zip
frameworks_base-73633ddbcf285f328f9c0183dadafde24e2da2f4.tar.gz
frameworks_base-73633ddbcf285f328f9c0183dadafde24e2da2f4.tar.bz2
Fingerprint should throttle after 5 attempts
Fixes bug 23762058 Change-Id: I62665dd3097b8e71075a5eddbf34a551db1507d5
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);