Bug 1061430 - Change SharedPreferences.Editor commit() to apply() where appropriate (GeckoProfile.java) r=rnewman
authorMark Finkle <mfinkle@mozilla.com>
Wed, 03 Sep 2014 02:00:42 -0400
changeset 203230 14f25bd4fc2b633cc38bf10a7d2e2ed482d377b1
parent 203229 65787da02f1905fa516ab21065094d12fda491e0
child 203231 886529efa472a06a663a9fbf025cd8fed29e6511
push id27424
push userryanvm@gmail.com
push dateWed, 03 Sep 2014 19:35:53 +0000
treeherdermozilla-central@bfef88becbba [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrnewman
bugs1061430
milestone35.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1061430 - Change SharedPreferences.Editor commit() to apply() where appropriate (GeckoProfile.java) r=rnewman
mobile/android/base/GeckoProfile.java
--- a/mobile/android/base/GeckoProfile.java
+++ b/mobile/android/base/GeckoProfile.java
@@ -181,17 +181,17 @@ public final class GeckoProfile {
         if (profile == null) {
             return false;
         }
         final boolean success = profile.remove();
 
         if (success) {
             // Clear all shared prefs for the given profile.
             GeckoSharedPrefs.forProfileName(context, profileName)
-                            .edit().clear().commit();
+                            .edit().clear().apply();
         }
 
         return success;
     }
 
     public static GeckoProfile createGuestProfile(Context context) {
         try {
             removeGuestProfile(context);
@@ -265,17 +265,17 @@ public final class GeckoProfile {
             }
         } catch (Exception ex) {
             Log.e(LOGTAG, "Error removing guest profile", ex);
         }
 
         if (success) {
             // Clear all shared prefs for the guest profile.
             GeckoSharedPrefs.forProfileName(context, GUEST_PROFILE)
-                            .edit().clear().commit();
+                            .edit().clear().apply();
         }
     }
 
     public static boolean delete(File file) throws IOException {
         // Try to do a quick initial delete
         if (file.delete())
             return true;