diff options
author | Jorim Jaggi <jjaggi@google.com> | 2015-09-01 00:47:00 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-09-01 00:47:00 +0000 |
commit | 4a306fd744bc2f6f434cb7032580b063b704a9c5 (patch) | |
tree | e9543233f42d39303b0394015ee5983f8c2f6fb9 /packages/Keyguard | |
parent | 1bc7d0c84a1fbd27add883b8e000096677a1ca22 (diff) | |
parent | 3a464785088e7fd206666f640912729533948ce8 (diff) | |
download | frameworks_base-4a306fd744bc2f6f434cb7032580b063b704a9c5.zip frameworks_base-4a306fd744bc2f6f434cb7032580b063b704a9c5.tar.gz frameworks_base-4a306fd744bc2f6f434cb7032580b063b704a9c5.tar.bz2 |
am 3a464785: Add a private API to get notified about lockout resets
* commit '3a464785088e7fd206666f640912729533948ce8':
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() { |