summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2018-09-24 21:26:34 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2018-09-24 21:26:34 -0700
commit37f1600e631f84ffc20b0968db71182f839f6fbb (patch)
tree1b77eef0b160812a60ef2ae18ac6e598938e9c28 /src
parent499184fc45c238aba88dad68016f89727b26ee1e (diff)
parent15f388f166ca3c54dbb5ba19ddd2ba435030962a (diff)
downloadandroid_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-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 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();