summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/PhotoUI.java
diff options
context:
space:
mode:
authorJay Wang <jaywang@codeaurora.org>2016-06-24 18:14:19 -0700
committerJay Wang <jaywang@codeaurora.org>2016-06-24 18:14:19 -0700
commitede09e254df3a4eb60797edb22a48623bdb9fd28 (patch)
tree7d6d6366ad80357b6b84b666d087869c1a1e9732 /src/com/android/camera/PhotoUI.java
parentd9eb5a45ad2abe74ea3bdf43c0ca03de3750c019 (diff)
downloadandroid_packages_apps_Snap-ede09e254df3a4eb60797edb22a48623bdb9fd28.tar.gz
android_packages_apps_Snap-ede09e254df3a4eb60797edb22a48623bdb9fd28.tar.bz2
android_packages_apps_Snap-ede09e254df3a4eb60797edb22a48623bdb9fd28.zip
SnapdragonCamera: Fix the crash caused by Ubifocus help menu
In some cases, the Ubifocus UI operation is called from camera thread and caused the exception. To resolve the issue, make sure UI operation is done only in UI thread. Change-Id: I07ef3392577169ecd642bf98a6c39de3580e963d CRs-Fixed: 1032532
Diffstat (limited to 'src/com/android/camera/PhotoUI.java')
-rw-r--r--src/com/android/camera/PhotoUI.java14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/com/android/camera/PhotoUI.java b/src/com/android/camera/PhotoUI.java
index 09e24a710..7c715d9fd 100644
--- a/src/com/android/camera/PhotoUI.java
+++ b/src/com/android/camera/PhotoUI.java
@@ -1445,16 +1445,12 @@ public class PhotoUI implements PieListener,
AlertDialog dialog = new AlertDialog.Builder(mActivity)
.setTitle(R.string.refocus_prompt_title)
.setMessage(R.string.refocus_prompt_message)
- .setPositiveButton(R.string.dialog_ok,
- new DialogInterface.OnClickListener() {
- @Override
- public void onClick(DialogInterface dialog, int arg1) {
- SharedPreferences.Editor editor = prefs.edit();
- editor.putInt(CameraSettings.KEY_REFOCUS_PROMPT, 0);
- editor.apply();
- }
- })
+ .setPositiveButton(R.string.dialog_ok, null)
.show();
+ SharedPreferences.Editor editor = prefs.edit();
+ editor.putInt(CameraSettings.KEY_REFOCUS_PROMPT, 0);
+ editor.apply();
+
}
}