diff options
author | Jim Miller <jaggies@google.com> | 2014-01-14 18:57:03 -0800 |
---|---|---|
committer | Jim Miller <jaggies@google.com> | 2014-01-27 15:21:39 -0800 |
commit | 7751ff6cd079e59e3c1f2404198774cd371ea69f (patch) | |
tree | 30030a609b5152d9c42a03af1bcd4409add2ad01 /packages/Keyguard/src/com/android/keyguard/KeyguardAbsKeyInputView.java | |
parent | db7516e3bd24589525c42b9b4761381b547dc3be (diff) | |
download | frameworks_base-7751ff6cd079e59e3c1f2404198774cd371ea69f.zip frameworks_base-7751ff6cd079e59e3c1f2404198774cd371ea69f.tar.gz frameworks_base-7751ff6cd079e59e3c1f2404198774cd371ea69f.tar.bz2 |
Move majority of security-related logic from KeyguardHostView
to KeyguardSecurityContainer.
This removes and/or simplifies the interface between modules to
allow easier separation of KeyguardSecurityContainer into a stand-alone
component.
Bug 12135931
Diffstat (limited to 'packages/Keyguard/src/com/android/keyguard/KeyguardAbsKeyInputView.java')
-rw-r--r-- | packages/Keyguard/src/com/android/keyguard/KeyguardAbsKeyInputView.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardAbsKeyInputView.java b/packages/Keyguard/src/com/android/keyguard/KeyguardAbsKeyInputView.java index 461fd77..3950159 100644 --- a/packages/Keyguard/src/com/android/keyguard/KeyguardAbsKeyInputView.java +++ b/packages/Keyguard/src/com/android/keyguard/KeyguardAbsKeyInputView.java @@ -154,14 +154,14 @@ public abstract class KeyguardAbsKeyInputView extends LinearLayout protected void verifyPasswordAndUnlock() { String entry = mPasswordEntry.getText().toString(); if (mLockPatternUtils.checkPassword(entry)) { - mCallback.reportSuccessfulUnlockAttempt(); + 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.reportFailedUnlockAttempt(); - if (0 == (mCallback.getFailedAttempts() - % LockPatternUtils.FAILED_ATTEMPTS_BEFORE_TIMEOUT)) { + mCallback.reportUnlockAttempt(false); + int attempts = KeyguardUpdateMonitor.getInstance(mContext).getFailedUnlockAttempts(); + if (0 == (attempts % LockPatternUtils.FAILED_ATTEMPTS_BEFORE_TIMEOUT)) { long deadline = mLockPatternUtils.setLockoutAttemptDeadline(); handleAttemptLockout(deadline); } |