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
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 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() {