diff options
author | Linux Build Service Account <lnxbuild@localhost> | 2018-09-24 21:26:34 -0700 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2018-09-24 21:26:34 -0700 |
commit | 37f1600e631f84ffc20b0968db71182f839f6fbb (patch) | |
tree | 1b77eef0b160812a60ef2ae18ac6e598938e9c28 /src | |
parent | 499184fc45c238aba88dad68016f89727b26ee1e (diff) | |
parent | 15f388f166ca3c54dbb5ba19ddd2ba435030962a (diff) | |
download | android_packages_apps_Snap-37f1600e631f84ffc20b0968db71182f839f6fbb.tar.gz android_packages_apps_Snap-37f1600e631f84ffc20b0968db71182f839f6fbb.tar.bz2 android_packages_apps_Snap-37f1600e631f84ffc20b0968db71182f839f6fbb.zip |
Merge "SnapdragonCamera: Update UI should be run in UI thread." into camera-SnapdragonCamera.lnx.2.0
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(); |