summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xsrc/com/android/camera/CaptureModule.java16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/com/android/camera/CaptureModule.java b/src/com/android/camera/CaptureModule.java
index 7bfee3041..4343a46cd 100755
--- a/src/com/android/camera/CaptureModule.java
+++ b/src/com/android/camera/CaptureModule.java
@@ -4097,15 +4097,15 @@ public class CaptureModule implements CameraModule, PhotoController,
}
private class HandlerExecutor implements Executor {
- private final Handler mHandler;
+ private final Handler ihandler;
public HandlerExecutor(Handler handler) {
- mHandler = handler;
+ ihandler = handler;
}
@Override
public void execute(Runnable runCmd) {
- mHandler.post(runCmd);
+ ihandler.post(runCmd);
}
}
@@ -6293,8 +6293,14 @@ public class CaptureModule implements CameraModule, PhotoController,
closeSessions();
if(isSurfaceChanged) {
- mUI.hideSurfaceView();
- mUI.showSurfaceView();
+ //run in UI thread
+ mHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ mUI.hideSurfaceView();
+ mUI.showSurfaceView();
+ }
+ });
}
initializeValues();