summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad Fitzpatrick <bradfitz@android.com>2010-09-06 17:29:58 -0700
committerBrad Fitzpatrick <bradfitz@android.com>2010-09-07 12:46:54 -0700
commit4e5aa452a0e2438f9af1f08c56b1a7b414e561d9 (patch)
treeab8f7621058bf50b75e51eb801b2d8d7de2cc9d4
parent91561bdb6ab42d5a262201fb4044bdc5949ca07c (diff)
downloadLegacyCamera-4e5aa452a0e2438f9af1f08c56b1a7b414e561d9.zip
LegacyCamera-4e5aa452a0e2438f9af1f08c56b1a7b414e561d9.tar.gz
LegacyCamera-4e5aa452a0e2438f9af1f08c56b1a7b414e561d9.tar.bz2
Use new SharedPreferences$Editor.apply instead of commit.
apply is the new async version when the caller doesn't care about the return value, but is otherwise identical in observable effects. BUG=2978683 Change-Id: I82086fc4501da53266802f95bebc624a7217fd8b
-rw-r--r--src/com/android/camera/ComboPreferences.java3
-rw-r--r--src/com/android/camera/ListPreference.java2
2 files changed, 3 insertions, 2 deletions
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