diff options
Diffstat (limited to 'src')
-rwxr-xr-x | src/com/android/camera/CaptureModule.java | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/com/android/camera/CaptureModule.java b/src/com/android/camera/CaptureModule.java index 6138e5269..f785d1146 100755 --- a/src/com/android/camera/CaptureModule.java +++ b/src/com/android/camera/CaptureModule.java @@ -4136,15 +4136,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); } } @@ -6377,8 +6377,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(); |