From 4233edb84da78eeee98e1956886e0e34a5991b7f Mon Sep 17 00:00:00 2001 From: Clark Scheff Date: Mon, 18 Aug 2014 17:02:52 -0700 Subject: Use asynchronous apply() instead of synchronous commit() Change-Id: Iffcd4409242fd0c6ecc022578f633394650a88c0 --- src/com/cyngn/theme/util/PreferenceUtils.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') 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(); } } } -- cgit v1.1