diff options
author | Jorim Jaggi <jjaggi@google.com> | 2015-09-01 00:58:31 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-09-01 00:58:31 +0000 |
commit | d302508d2838000b1dde05d9bfaf5e5181dcf9dc (patch) | |
tree | 94a77562cf520b7ad60ec84c0b9a6149a727ba39 /packages/Keyguard | |
parent | d6597cb43c1985ec955f2f5c5daf7be52a9f12a2 (diff) | |
parent | 4a306fd744bc2f6f434cb7032580b063b704a9c5 (diff) | |
download | frameworks_base-d302508d2838000b1dde05d9bfaf5e5181dcf9dc.zip frameworks_base-d302508d2838000b1dde05d9bfaf5e5181dcf9dc.tar.gz frameworks_base-d302508d2838000b1dde05d9bfaf5e5181dcf9dc.tar.bz2 |
am 4a306fd7: am 3a464785: Add a private API to get notified about lockout resets
* commit '4a306fd744bc2f6f434cb7032580b063b704a9c5':
Add a private API to get notified about lockout resets
Diffstat (limited to 'packages/Keyguard')
-rw-r--r-- | packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java b/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java index fc6117f..cfc232c 100644 --- a/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java +++ b/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java @@ -29,6 +29,7 @@ import android.content.Intent; import android.content.IntentFilter; import android.database.ContentObserver; import android.graphics.Bitmap; +import android.hardware.fingerprint.Fingerprint; import android.hardware.fingerprint.FingerprintManager; import android.hardware.fingerprint.FingerprintManager.AuthenticationCallback; import android.hardware.fingerprint.FingerprintManager.AuthenticationResult; @@ -472,6 +473,10 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { } } + private void handleFingerprintLockoutReset() { + updateFingerprintListeningState(); + } + private void setFingerprintRunningState(int fingerprintRunningState) { boolean wasRunning = mFingerprintRunningState == FINGERPRINT_STATE_RUNNING; boolean isRunning = fingerprintRunningState == FINGERPRINT_STATE_RUNNING; @@ -681,6 +686,14 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { } }; + private final FingerprintManager.LockoutResetCallback mLockoutResetCallback + = new FingerprintManager.LockoutResetCallback() { + @Override + public void onLockoutReset() { + handleFingerprintLockoutReset(); + } + }; + private FingerprintManager.AuthenticationCallback mAuthenticationCallback = new AuthenticationCallback() { @@ -1003,6 +1016,9 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { mFpm = (FingerprintManager) context.getSystemService(Context.FINGERPRINT_SERVICE); updateFingerprintListeningState(); + if (mFpm != null) { + mFpm.addLockoutResetCallback(mLockoutResetCallback); + } } private void updateFingerprintListeningState() { |