am ac1da481: am f873f9ab: am bd5b61c4: Merge "Fingerprint should throttle after 5 attempts" into mnc-dr-dev

* commit 'ac1da4816b360028eb0185ac984f1ffaa79fdb18':
  Fingerprint should throttle after 5 attempts
This commit is contained in:
Jim Miller
2015-09-03 06:23:31 +00:00
committed by Android Git Automerger

View File

@@ -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);