summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCamera Software Integration <camswint@localhost>2016-07-01 06:40:35 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2016-07-01 06:40:35 -0700
commit18f2b24bb53fbe1d35514a014a8d3bb4b03b2702 (patch)
tree5525dc2b3621ed66993193da4b5e67dedeaab72c
parenteaf94151b9fadb6dd18f87c2b7c38bdcfbd7be7c (diff)
parentede09e254df3a4eb60797edb22a48623bdb9fd28 (diff)
downloadandroid_packages_apps_Snap-18f2b24bb53fbe1d35514a014a8d3bb4b03b2702.tar.gz
android_packages_apps_Snap-18f2b24bb53fbe1d35514a014a8d3bb4b03b2702.tar.bz2
android_packages_apps_Snap-18f2b24bb53fbe1d35514a014a8d3bb4b03b2702.zip
Merge changes I07ef3392,Ie0b04a07 into camera.lnx.1.0-dev.1.0
* changes: SnapdragonCamera: Fix the crash caused by Ubifocus help menu SnapdragonCamera: Adjust the low memory device threshold
-rw-r--r--src/com/android/camera/PhotoModule.java10
-rw-r--r--src/com/android/camera/PhotoUI.java14
-rw-r--r--src/com/android/camera/app/CameraApp.java2
3 files changed, 13 insertions, 13 deletions
diff --git a/src/com/android/camera/PhotoModule.java b/src/com/android/camera/PhotoModule.java
index 6941b67b0..6f116ab24 100644
--- a/src/com/android/camera/PhotoModule.java
+++ b/src/com/android/camera/PhotoModule.java
@@ -3795,14 +3795,18 @@ public class PhotoModule
if (refocusOn.equals(mSceneMode)) {
try {
mSceneMode = Parameters.SCENE_MODE_AUTO;
- mUI.setPreference(CameraSettings.KEY_ADVANCED_FEATURES, refocusOn);
- mUI.showRefocusDialog();
+ if (mHandler.getLooper() == Looper.myLooper()) {
+ mUI.setPreference(CameraSettings.KEY_ADVANCED_FEATURES, refocusOn);
+ mUI.showRefocusDialog();
+ }
} catch (NullPointerException e) {
}
} else if (optizoomOn.equals(mSceneMode)) {
try {
mSceneMode = Parameters.SCENE_MODE_AUTO;
- mUI.setPreference(CameraSettings.KEY_ADVANCED_FEATURES, optizoomOn);
+ if (mHandler.getLooper() == Looper.myLooper()) {
+ mUI.setPreference(CameraSettings.KEY_ADVANCED_FEATURES, optizoomOn);
+ }
} catch (NullPointerException e) {
}
} else if (mSceneMode == null) {
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();
+
}
}
diff --git a/src/com/android/camera/app/CameraApp.java b/src/com/android/camera/app/CameraApp.java
index 831ed974c..b46d615b0 100644
--- a/src/com/android/camera/app/CameraApp.java
+++ b/src/com/android/camera/app/CameraApp.java
@@ -26,7 +26,7 @@ import com.android.camera.util.UsageStatistics;
public class CameraApp extends Application {
private static long mMaxSystemMemory;
public static boolean mIsLowMemoryDevice = false;
- private static final int LOW_MEMORY_DEVICE_THRESHOLD = 1024*1024*1024;
+ private static final long LOW_MEMORY_DEVICE_THRESHOLD = 2L*1024*1024*1024;
@Override
public void onCreate() {
super.onCreate();