diff options
author | Jorim Jaggi <jjaggi@google.com> | 2015-08-28 16:59:13 -0700 |
---|---|---|
committer | Jorim Jaggi <jjaggi@google.com> | 2015-09-01 00:37:54 +0000 |
commit | 3a464785088e7fd206666f640912729533948ce8 (patch) | |
tree | bbd72220a48ec8173ce7a80e9072640e4c643bdb /packages | |
parent | 70c958c414204b195d4195cdcafe33932087e6b1 (diff) | |
download | frameworks_base-3a464785088e7fd206666f640912729533948ce8.zip frameworks_base-3a464785088e7fd206666f640912729533948ce8.tar.gz frameworks_base-3a464785088e7fd206666f640912729533948ce8.tar.bz2 |
Add a private API to get notified about lockout resets
SystemUI uses it to start authentication again after lockout reset
expired.
Bug: 22846755
Change-Id: I90a987c6aa4ac52cc7e7aff1bce262d1db3f12ee
Diffstat (limited to 'packages')
-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() { |