summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Jim Miller <jaggies@google.com> 2011-10-18 15:12:02 -0700
committer Android Git Automerger <android-git-automerger@android.com> 2011-10-18 15:12:02 -0700
commitcf7b76e177dc540007f5010414f11269c1c5108a (patch)
tree330d97b3b9586a66e223e79f50f7784d6bfcc952
parentbe3ffd56bfafeee1a16970d02fd702ea19809a1e (diff)
parentf13313a073ad3f3c4e91baa4adbfdec66395065e (diff)
am f13313a0: Merge "Fix 5452698: fix broken logic in reportFailedAttempt() in lockscreen" into ics-mr0
* commit 'f13313a073ad3f3c4e91baa4adbfdec66395065e': Fix 5452698: fix broken logic in reportFailedAttempt() in lockscreen
-rw-r--r--policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java20
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 96998afa8f6c..ac2a41eca347 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();
}