summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJay Wang <jaywang@codeaurora.org>2016-05-10 18:03:06 -0700
committerSteve Kondik <steve@cyngn.com>2016-08-21 18:45:51 -0700
commit67f8bccf87818e7ea124fa733c56894030ee5951 (patch)
tree7308a54e8a5812f42d2290d171d559e0e0a54f0a
parent2f15393db4fb2d22281578ecfe10e7e27f64a47f (diff)
downloadandroid_packages_apps_Snap-67f8bccf87818e7ea124fa733c56894030ee5951.tar.gz
android_packages_apps_Snap-67f8bccf87818e7ea124fa733c56894030ee5951.tar.bz2
android_packages_apps_Snap-67f8bccf87818e7ea124fa733c56894030ee5951.zip
SnapdragonCamera: Ensure only UI thread accesses Ui element
Use runOnUiThread to ensure that UI element is accessed only by UI thread. CRs-Fixed: 993611 Change-Id: Ic2faab0813d273140d07f12c5e12a672ce699e1f
-rw-r--r--src/com/android/camera/CaptureModule.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/com/android/camera/CaptureModule.java b/src/com/android/camera/CaptureModule.java
index 052844def..6bb16950f 100644
--- a/src/com/android/camera/CaptureModule.java
+++ b/src/com/android/camera/CaptureModule.java
@@ -1557,8 +1557,13 @@ public class CaptureModule implements CameraModule, PhotoController,
}
@Override
- public void onQueueStatus(boolean full) {
- mUI.enableShutter(!full);
+ public void onQueueStatus(final boolean full) {
+ mActivity.runOnUiThread(new Runnable() {
+ @Override
+ public void run() {
+ mUI.enableShutter(!full);
+ }
+ });
}
public void triggerFocusAtPoint(float x, float y, int id) {