diff options
author | Clark Scheff <clark@cyngn.com> | 2014-08-18 17:02:52 -0700 |
---|---|---|
committer | Clark Scheff <clark@cyngn.com> | 2014-08-18 17:02:52 -0700 |
commit | 4233edb84da78eeee98e1956886e0e34a5991b7f (patch) | |
tree | 2cd06a89d6b13845afc5611b529d5af5c2d3961e | |
parent | 789467f2e7e434ce04aefa97115b57a4118f60c6 (diff) | |
download | packages_apps_ThemeChooser-4233edb84da78eeee98e1956886e0e34a5991b7f.zip packages_apps_ThemeChooser-4233edb84da78eeee98e1956886e0e34a5991b7f.tar.gz packages_apps_ThemeChooser-4233edb84da78eeee98e1956886e0e34a5991b7f.tar.bz2 |
Use asynchronous apply() instead of synchronous commit()
Change-Id: Iffcd4409242fd0c6ecc022578f633394650a88c0
-rw-r--r-- | src/com/cyngn/theme/util/PreferenceUtils.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/com/cyngn/theme/util/PreferenceUtils.java b/src/com/cyngn/theme/util/PreferenceUtils.java index 152fdd8..edbf017 100644 --- a/src/com/cyngn/theme/util/PreferenceUtils.java +++ b/src/com/cyngn/theme/util/PreferenceUtils.java @@ -30,7 +30,7 @@ public class PreferenceUtils { public static void setAppliedBaseTheme(Context context, String pkgName) { SharedPreferences prefs = getSharedPreferences(context); if (prefs != null) { - prefs.edit().putString(PREF_APPLIED_BASE_THEME, pkgName).commit(); + prefs.edit().putString(PREF_APPLIED_BASE_THEME, pkgName).apply(); } } @@ -50,7 +50,7 @@ public class PreferenceUtils { updatedThemes.addAll(current); } if (updatedThemes.add(pkgName)) { - prefs.edit().putStringSet(PREF_UPDATED_THEMES, updatedThemes).commit(); + prefs.edit().putStringSet(PREF_UPDATED_THEMES, updatedThemes).apply(); } } } @@ -64,7 +64,7 @@ public class PreferenceUtils { updatedThemes.addAll(current); } if (updatedThemes.remove(pkgName)) { - prefs.edit().putStringSet(PREF_UPDATED_THEMES, updatedThemes).commit(); + prefs.edit().putStringSet(PREF_UPDATED_THEMES, updatedThemes).apply(); } } } |