Merge "Fix 5452698: fix broken logic in reportFailedAttempt() in lockscreen" into ics-mr0

This commit is contained in:
Jim Miller
2011-10-18 15:10:04 -07:00
committed by Android (Google) Code Review

View File

@@ -421,16 +421,20 @@ public class LockPatternKeyguardView extends KeyguardViewBase implements Handler
Slog.i(TAG, "Too many unlock attempts; device will be wiped!");
showWipeDialog(failedAttempts);
}
} else if (usingPattern && mEnableFallback) {
if (failedAttempts == failedAttemptWarning) {
showAlmostAtAccountLoginDialog();
} else if (failedAttempts >= LockPatternUtils.FAILED_ATTEMPTS_BEFORE_RESET) {
mLockPatternUtils.setPermanentlyLocked(true);
updateScreen(mMode, false);
}
} else {
final boolean showTimeout =
boolean showTimeout =
(failedAttempts % LockPatternUtils.FAILED_ATTEMPTS_BEFORE_TIMEOUT) == 0;
if (usingPattern && mEnableFallback) {
if (failedAttempts == failedAttemptWarning) {
showAlmostAtAccountLoginDialog();
showTimeout = false; // don't show both dialogs
} else if (failedAttempts >= LockPatternUtils.FAILED_ATTEMPTS_BEFORE_RESET) {
mLockPatternUtils.setPermanentlyLocked(true);
updateScreen(mMode, false);
// don't show timeout dialog because we show account unlock screen next
showTimeout = false;
}
}
if (showTimeout) {
showTimeoutDialog();
}