Bug 1061430 - Change SharedPreferences.Editor commit() to apply() where appropriate (Preference Helpers) r=rnewman

This commit is contained in:
Mark Finkle 2014-09-03 02:00:40 -04:00
parent 13495ae1fb
commit 52088696e2
2 changed files with 4 additions and 4 deletions

View File

@ -204,10 +204,10 @@ public final class GeckoSharedPrefs {
// Update prefs version accordingly.
appEditor.putInt(PREFS_VERSION_KEY, PREFS_VERSION);
appEditor.commit();
profileEditor.commit();
appEditor.apply();
profileEditor.apply();
if (pmEditor != null) {
pmEditor.commit();
pmEditor.apply();
}
Log.d(LOGTAG, "All keys have been migrated");

View File

@ -151,7 +151,7 @@ public final class SharedPreferencesHelper
} else {
Log.w(LOGTAG, "Unknown pref value type [" + type + "] for pref [" + name + "]");
}
editor.commit();
editor.apply();
}
}