summaryrefslogtreecommitdiffstats
path: root/policy
diff options
context:
space:
mode:
authorSteven Ross <stross@google.com>2012-09-27 07:47:55 -0400
committerSteven Ross <stross@google.com>2012-09-27 08:25:47 -0400
commitfbb9c6197f4c9dd2583590559502e3b0600867d8 (patch)
tree21a37e44784b888937ce06db6497f65c995ca7ad /policy
parent2da2ec19e0e5d5b50575eb7ebe4e2e7f170647dc (diff)
downloadframeworks_base-fbb9c6197f4c9dd2583590559502e3b0600867d8.zip
frameworks_base-fbb9c6197f4c9dd2583590559502e3b0600867d8.tar.gz
frameworks_base-fbb9c6197f4c9dd2583590559502e3b0600867d8.tar.bz2
Stop FaceUnlock when detached from window fixes b/7222226
The FaceUnlock service gets onConfigurationChanged at about the same time as onDetachedFromWindow is received by the KeyguardFaceUnlockView, so we could do something beyond hiding the window there, but this approach should operate on the same thread as onPause and onResume, and thus be safe against threading issues. Before this change, I was seeing startUi calls in FaceUnlock.java crashing the service because the ProcessingThread had already been set to null. After this change, onDetachedFromWindow gets called, followed by onPause, after a rotation. The onDetachedFromWindow call now clears the messages and shuts down the connection, which prevents the startUi call. We should also probably make sure startUi in the service exits if mThread is null for good measure. Change-Id: I083066c9cb210e398d911e70c0f3bb5d2736cd8d
Diffstat (limited to 'policy')
-rw-r--r--policy/src/com/android/internal/policy/impl/keyguard/KeyguardFaceUnlockView.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardFaceUnlockView.java b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardFaceUnlockView.java
index 062c1be..5922810 100644
--- a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardFaceUnlockView.java
+++ b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardFaceUnlockView.java
@@ -69,6 +69,14 @@ public class KeyguardFaceUnlockView extends LinearLayout implements KeyguardSecu
}
@Override
+ public void onDetachedFromWindow() {
+ if (mBiometricUnlock != null) {
+ mBiometricUnlock.hide();
+ mBiometricUnlock.stop();
+ }
+ }
+
+ @Override
public void onPause() {
if (mBiometricUnlock != null) {
mBiometricUnlock.hide();