OSDN Git Service

Disable face unlock when returning from camera.
authorRuben Brunk <rubenbrunk@google.com>
Wed, 6 Nov 2013 02:29:06 +0000 (18:29 -0800)
committerRuben Brunk <rubenbrunk@google.com>
Wed, 6 Nov 2013 18:21:43 +0000 (10:21 -0800)
Bug: 11063890

- Workaround for bug 11063890.  Avoids the acquire/release
  race when resuming face unlock while pausing the camera
  widget.
Change-Id: I0a58f3a07f346da72ea55772242b4f9c54537235

packages/Keyguard/src/com/android/keyguard/KeyguardActivityLauncher.java

index 9a1aa5b..0a915ea 100644 (file)
@@ -99,6 +99,11 @@ public abstract class KeyguardActivityLauncher {
 
     public void launchCamera(Handler worker, Runnable onSecureCameraStarted) {
         LockPatternUtils lockPatternUtils = getLockPatternUtils();
+
+        // Workaround to avoid camera release/acquisition race when resuming face unlock
+        // after showing lockscreen camera (bug 11063890).
+        KeyguardUpdateMonitor.getInstance(getContext()).setAlternateUnlockEnabled(false);
+
         if (lockPatternUtils.isSecure()) {
             // Launch the secure version of the camera
             if (wouldLaunchResolverActivity(SECURE_CAMERA_INTENT)) {