summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJim Miller <jaggies@google.com>2014-05-20 23:12:07 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-05-20 23:12:07 +0000
commit90b6b63d1dd89cb1816cb5226a0f83f6817c140a (patch)
tree8abfcb6dc4c44d1d1dec742211d3c6d840aa516a
parentcd47ecb6903edb57f4a2ec52ecd33d4346ba13e9 (diff)
parent526ed2d7fc15fc2683a4f02d93825a4cf606d6ba (diff)
downloadframeworks_base-90b6b63d1dd89cb1816cb5226a0f83f6817c140a.zip
frameworks_base-90b6b63d1dd89cb1816cb5226a0f83f6817c140a.tar.gz
frameworks_base-90b6b63d1dd89cb1816cb5226a0f83f6817c140a.tar.bz2
Merge "Fix Keyguard PIN error message for N < 4."
-rw-r--r--packages/Keyguard/src/com/android/keyguard/KeyguardAbsKeyInputView.java18
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);
}