summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/com/android/camera/Camera.java2
-rw-r--r--src/com/android/camera/CameraSettings.java8
-rw-r--r--src/com/android/camera/ComboPreferences.java3
-rw-r--r--src/com/android/camera/ListPreference.java2
-rw-r--r--src/com/android/camera/ui/HeadUpDisplay.java2
5 files changed, 9 insertions, 8 deletions
diff --git a/src/com/android/camera/Camera.java b/src/com/android/camera/Camera.java
index 565b537..61c66d1 100644
--- a/src/com/android/camera/Camera.java
+++ b/src/com/android/camera/Camera.java
@@ -278,7 +278,7 @@ public class Camera extends NoSearchActivity implements View.OnClickListener,
if (!CameraSettings.EXPOSURE_DEFAULT_VALUE.equals(value)) {
Editor editor = mPreferences.edit();
editor.putString(CameraSettings.KEY_EXPOSURE, "0");
- editor.commit();
+ editor.apply();
if (mHeadUpDisplay != null) {
mHeadUpDisplay.reloadPreferences();
}
diff --git a/src/com/android/camera/CameraSettings.java b/src/com/android/camera/CameraSettings.java
index 3bebb93..29eb187 100644
--- a/src/com/android/camera/CameraSettings.java
+++ b/src/com/android/camera/CameraSettings.java
@@ -100,7 +100,7 @@ public class CameraSettings {
SharedPreferences.Editor editor = ComboPreferences
.get(context).edit();
editor.putString(KEY_PICTURE_SIZE, candidate);
- editor.commit();
+ editor.apply();
return;
}
}
@@ -272,7 +272,7 @@ public class CameraSettings {
if (version == CURRENT_LOCAL_VERSION) return;
SharedPreferences.Editor editor = pref.edit();
editor.putInt(KEY_LOCAL_VERSION, CURRENT_LOCAL_VERSION);
- editor.commit();
+ editor.apply();
}
public static void upgradeGlobalPreferences(SharedPreferences pref) {
@@ -317,7 +317,7 @@ public class CameraSettings {
editor.remove("pref_camera_video_duration_key");
}
editor.putInt(KEY_VERSION, CURRENT_VERSION);
- editor.commit();
+ editor.apply();
}
public static void upgradeAllPreferences(ComboPreferences pref) {
@@ -347,6 +347,6 @@ public class CameraSettings {
int cameraId) {
Editor editor = pref.edit();
editor.putInt(KEY_CAMERA_ID, cameraId);
- editor.commit();
+ editor.apply();
}
}
diff --git a/src/com/android/camera/ComboPreferences.java b/src/com/android/camera/ComboPreferences.java
index 5b7a47c..1fbfdaa 100644
--- a/src/com/android/camera/ComboPreferences.java
+++ b/src/com/android/camera/ComboPreferences.java
@@ -143,7 +143,8 @@ public class ComboPreferences implements SharedPreferences, OnSharedPreferenceCh
}
public void apply() {
- commit();
+ mEditorGlobal.apply();
+ mEditorLocal.apply();
}
// Note: clear() and remove() affects both local and global preferences.
diff --git a/src/com/android/camera/ListPreference.java b/src/com/android/camera/ListPreference.java
index d84cc61..6b1bffa 100644
--- a/src/com/android/camera/ListPreference.java
+++ b/src/com/android/camera/ListPreference.java
@@ -108,7 +108,7 @@ public class ListPreference extends CameraPreference {
protected void persistStringValue(String value) {
SharedPreferences.Editor editor = getSharedPreferences().edit();
editor.putString(mKey, value);
- editor.commit();
+ editor.apply();
}
@Override
diff --git a/src/com/android/camera/ui/HeadUpDisplay.java b/src/com/android/camera/ui/HeadUpDisplay.java
index 98e885e..05d575d 100644
--- a/src/com/android/camera/ui/HeadUpDisplay.java
+++ b/src/com/android/camera/ui/HeadUpDisplay.java
@@ -405,7 +405,7 @@ public class HeadUpDisplay extends GLView {
Context context = getGLRootView().getContext();
Editor editor = mSharedPrefs.edit();
editor.clear();
- editor.commit();
+ editor.apply();
CameraSettings.upgradeAllPreferences(mSharedPrefs);
CameraSettings.initialCameraPictureSize(context, param);
reloadPreferences();