OSDN Git Service

Ensure focusAndCapture() is called on the main thread.
authorSascha Haeberling <haeberling@google.com>
Wed, 25 Jun 2014 18:05:49 +0000 (11:05 -0700)
committerSascha Haeberling <haeberling@google.com>
Wed, 25 Jun 2014 18:10:56 +0000 (11:10 -0700)
  Bug: 15863231

Change-Id: Ieeb6e61e5a8a1d49832ea8ded6de2575afb0bdad

src/com/android/camera/PhotoModule.java

index a10c297..f1fb0d0 100644 (file)
@@ -2324,7 +2324,12 @@ public class PhotoModule
 
     @Override
     public void onRemoteShutterPress() {
-        focusAndCapture();
+        mHandler.post(new Runnable() {
+            @Override
+            public void run() {
+                focusAndCapture();
+            }
+        });
     }
 
     /**