diff options
author | Jim Miller <jaggies@google.com> | 2011-10-18 15:10:04 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-10-18 15:10:04 -0700 |
commit | f13313a073ad3f3c4e91baa4adbfdec66395065e (patch) | |
tree | 0b0a467005301aff78237e7ea6dd6dd7070d9a5d /policy/src | |
parent | 3f70aa783cca9f4c331c2a1b390bb7bebc6e248c (diff) | |
parent | 29aa5dc7de41cc41428dfa958a0cbeac38b29e26 (diff) | |
download | frameworks_base-f13313a073ad3f3c4e91baa4adbfdec66395065e.zip frameworks_base-f13313a073ad3f3c4e91baa4adbfdec66395065e.tar.gz frameworks_base-f13313a073ad3f3c4e91baa4adbfdec66395065e.tar.bz2 |
Merge "Fix 5452698: fix broken logic in reportFailedAttempt() in lockscreen" into ics-mr0
Diffstat (limited to 'policy/src')
-rw-r--r-- | policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java b/policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java index 96998af..ac2a41e 100644 --- a/policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java +++ b/policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java @@ -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(); } |