summaryrefslogtreecommitdiffstats
path: root/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
diff options
context:
space:
mode:
Diffstat (limited to 'packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java')
-rw-r--r--packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java29
1 files changed, 29 insertions, 0 deletions
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java b/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
index f39acde..806f280 100644
--- a/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
+++ b/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
@@ -409,6 +409,10 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener {
}
private void handleFingerprintAuthFailed() {
+ if (mFpWakeMode == FP_WAKE_DIRECT_UNLOCK) {
+ notifyOnFingerprintWakeAndUnlockingFinished();
+ }
+ mFpWakeMode = FP_WAKE_NONE;
releaseFingerprintWakeLock();
handleFingerprintHelp(-1, mContext.getString(R.string.fingerprint_not_recognized));
}
@@ -428,6 +432,9 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener {
}
mHandler.postDelayed(mReleaseFingerprintWakeLockRunnable,
FINGERPRINT_WAKELOCK_TIMEOUT_MS);
+ if (mFpWakeMode == FP_WAKE_DIRECT_UNLOCK) {
+ notifyOnFingerprintWakeAndUnlockingStarted();
+ }
} else if (!mDeviceInteractive) {
mFpWakeMode = FP_WAKE_TO_BOUNCER;
} else {
@@ -435,6 +442,24 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener {
}
}
+ private void notifyOnFingerprintWakeAndUnlockingStarted() {
+ for (int i = 0; i < mCallbacks.size(); i++) {
+ KeyguardUpdateMonitorCallback cb = mCallbacks.get(i).get();
+ if (cb != null) {
+ cb.onFingerprintWakeAndUnlockingStarted();
+ }
+ }
+ }
+
+ private void notifyOnFingerprintWakeAndUnlockingFinished() {
+ for (int i = 0; i < mCallbacks.size(); i++) {
+ KeyguardUpdateMonitorCallback cb = mCallbacks.get(i).get();
+ if (cb != null) {
+ cb.onFingerprintWakeAndUnlockingFinished();
+ }
+ }
+ }
+
private final Runnable mReleaseFingerprintWakeLockRunnable = new Runnable() {
@Override
public void run() {
@@ -891,6 +916,10 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener {
cb.onScreenTurnedOn();
}
}
+ if (mFpWakeMode == FP_WAKE_DIRECT_UNLOCK) {
+ notifyOnFingerprintWakeAndUnlockingFinished();
+ }
+ mFpWakeMode = FP_WAKE_NONE;
}
private void handleScreenTurnedOff() {