diff options
author | Jim Miller <jaggies@google.com> | 2014-05-19 11:28:32 -0700 |
---|---|---|
committer | Jim Miller <jaggies@google.com> | 2014-05-19 11:31:08 -0700 |
commit | 526ed2d7fc15fc2683a4f02d93825a4cf606d6ba (patch) | |
tree | 8c40b368cb150685ee56d7ba45386b2adbd637f7 /packages/Keyguard | |
parent | d069cd5164ec4e6edcafa3fb3927675c55e5fe32 (diff) | |
download | frameworks_base-526ed2d7fc15fc2683a4f02d93825a4cf606d6ba.zip frameworks_base-526ed2d7fc15fc2683a4f02d93825a4cf606d6ba.tar.gz frameworks_base-526ed2d7fc15fc2683a4f02d93825a4cf606d6ba.tar.bz2 |
Fix Keyguard PIN error message for N < 4.
This fixes a bug where no error message was shown
when the user enters less than 4 digits for a PIN.
Fixes bug 14658301
Change-Id: Ia36ad205d197f0eb5f5095d71bc239ec7ded85f2
Diffstat (limited to 'packages/Keyguard')
-rw-r--r-- | packages/Keyguard/src/com/android/keyguard/KeyguardAbsKeyInputView.java | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardAbsKeyInputView.java b/packages/Keyguard/src/com/android/keyguard/KeyguardAbsKeyInputView.java index 2d17b7b..aae92e8 100644 --- a/packages/Keyguard/src/com/android/keyguard/KeyguardAbsKeyInputView.java +++ b/packages/Keyguard/src/com/android/keyguard/KeyguardAbsKeyInputView.java @@ -149,14 +149,16 @@ public abstract class KeyguardAbsKeyInputView extends LinearLayout if (mLockPatternUtils.checkPassword(entry)) { mCallback.reportUnlockAttempt(true); mCallback.dismiss(true); - } else if (entry.length() > MINIMUM_PASSWORD_LENGTH_BEFORE_REPORT ) { - // to avoid accidental lockout, only count attempts that are long enough to be a - // real password. This may require some tweaking. - mCallback.reportUnlockAttempt(false); - int attempts = KeyguardUpdateMonitor.getInstance(mContext).getFailedUnlockAttempts(); - if (0 == (attempts % LockPatternUtils.FAILED_ATTEMPTS_BEFORE_TIMEOUT)) { - long deadline = mLockPatternUtils.setLockoutAttemptDeadline(); - handleAttemptLockout(deadline); + } else { + if (entry.length() > MINIMUM_PASSWORD_LENGTH_BEFORE_REPORT ) { + // to avoid accidental lockout, only count attempts that are long enough to be a + // real password. This may require some tweaking. + mCallback.reportUnlockAttempt(false); + int attempts = KeyguardUpdateMonitor.getInstance(mContext).getFailedUnlockAttempts(); + if (0 == (attempts % LockPatternUtils.FAILED_ATTEMPTS_BEFORE_TIMEOUT)) { + long deadline = mLockPatternUtils.setLockoutAttemptDeadline(); + handleAttemptLockout(deadline); + } } mSecurityMessageDisplay.setMessage(getWrongPasswordStringId(), true); } |