Skip to content

Commit f13313a

Browse files
Jim MillerAndroid (Google) Code Review
authored andcommitted
Merge "Fix 5452698: fix broken logic in reportFailedAttempt() in lockscreen" into ics-mr0
2 parents 3f70aa7 + 29aa5dc commit f13313a

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -421,16 +421,20 @@ public void reportFailedUnlockAttempt() {
421421
Slog.i(TAG, "Too many unlock attempts; device will be wiped!");
422422
showWipeDialog(failedAttempts);
423423
}
424-
} else if (usingPattern && mEnableFallback) {
425-
if (failedAttempts == failedAttemptWarning) {
426-
showAlmostAtAccountLoginDialog();
427-
} else if (failedAttempts >= LockPatternUtils.FAILED_ATTEMPTS_BEFORE_RESET) {
428-
mLockPatternUtils.setPermanentlyLocked(true);
429-
updateScreen(mMode, false);
430-
}
431424
} else {
432-
final boolean showTimeout =
425+
boolean showTimeout =
433426
(failedAttempts % LockPatternUtils.FAILED_ATTEMPTS_BEFORE_TIMEOUT) == 0;
427+
if (usingPattern && mEnableFallback) {
428+
if (failedAttempts == failedAttemptWarning) {
429+
showAlmostAtAccountLoginDialog();
430+
showTimeout = false; // don't show both dialogs
431+
} else if (failedAttempts >= LockPatternUtils.FAILED_ATTEMPTS_BEFORE_RESET) {
432+
mLockPatternUtils.setPermanentlyLocked(true);
433+
updateScreen(mMode, false);
434+
// don't show timeout dialog because we show account unlock screen next
435+
showTimeout = false;
436+
}
437+
}
434438
if (showTimeout) {
435439
showTimeoutDialog();
436440
}

0 commit comments

Comments
 (0)