Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f13313a0 authored by Jim Miller's avatar Jim Miller Committed by Android (Google) Code Review
Browse files

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

parents 3f70aa78 29aa5dc7
Loading
Loading
Loading
Loading
+12 −8
Original line number Diff line number Diff line
@@ -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) {
                } else {
                    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;
                        }
                    }
                } else {
                    final boolean showTimeout =
                        (failedAttempts % LockPatternUtils.FAILED_ATTEMPTS_BEFORE_TIMEOUT) == 0;
                    if (showTimeout) {
                        showTimeoutDialog();
                    }