diff options
| author | Jim Miller <jaggies@google.com> | 2012-09-24 18:38:08 -0700 |
|---|---|---|
| committer | Jim Miller <jaggies@google.com> | 2012-09-24 19:31:29 -0700 |
| commit | 7641506e3cc493ac4e6f5037fd76516754e61c6e (patch) | |
| tree | cf6ebdf9cb742949f0c2d14429799acbc839e187 /policy | |
| parent | 6eeff850b245bd3be3a0e782cd9f28daadf922dc (diff) | |
| download | frameworks_base-7641506e3cc493ac4e6f5037fd76516754e61c6e.zip frameworks_base-7641506e3cc493ac4e6f5037fd76516754e61c6e.tar.gz frameworks_base-7641506e3cc493ac4e6f5037fd76516754e61c6e.tar.bz2 | |
Fix wrong password attempt count in DevicePolicyManager
Keyguard wasn't resetting dpm's count when a successful password
was made. The result is the device would get wiped earlier than
it should.
Also fixes a TODO left over from keyguard refactoring that
allowed face unlock to trigger the same logic (ouch!).
Fixes bug 7219258
Change-Id: I2bd13c50a9beb8225d3237e86d5e34b73d0eb3cf
Diffstat (limited to 'policy')
| -rw-r--r-- | policy/src/com/android/internal/policy/impl/keyguard/KeyguardHostView.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardHostView.java b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardHostView.java index 1a4eeb2..2e7228c 100644 --- a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardHostView.java +++ b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardHostView.java @@ -243,11 +243,15 @@ public class KeyguardHostView extends KeyguardViewBase { public void reportSuccessfulUnlockAttempt() { KeyguardUpdateMonitor.getInstance(mContext).clearFailedUnlockAttempts(); + mLockPatternUtils.reportSuccessfulPasswordAttempt(); } public void reportFailedUnlockAttempt() { - // TODO: handle biometric attempt differently. - KeyguardHostView.this.reportFailedUnlockAttempt(); + if (mCurrentSecuritySelection == SecurityMode.Biometric) { + KeyguardUpdateMonitor.getInstance(mContext).reportFailedBiometricUnlockAttempt(); + } else { + KeyguardHostView.this.reportFailedUnlockAttempt(); + } } public int getFailedAttempts() { |
