Bug 1130030 - Make EditorBranch implement apply. r=nalexander
authorRichard Newman <rnewman@mozilla.com>
Thu, 05 Feb 2015 18:12:22 -0800
changeset 227770 36284346398c55641aca8ef48863f7b86bc14219
parent 227769 0870c45ca038eb7570564e059f04ffc38d745aef
child 227771 0a92f400101e19d42eec636a099cdc0c1a27ebb9
push id28239
push userryanvm@gmail.com
push dateFri, 06 Feb 2015 13:52:40 +0000
treeherdermozilla-central@03b0004eba32 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnalexander
bugs1130030
milestone38.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 1130030 - Make EditorBranch implement apply. r=nalexander
mobile/android/base/background/common/EditorBranch.java
--- a/mobile/android/base/background/common/EditorBranch.java
+++ b/mobile/android/base/background/common/EditorBranch.java
@@ -17,19 +17,19 @@ public class EditorBranch implements Edi
   public EditorBranch(final SharedPreferences prefs, final String prefix) {
     if (!prefix.endsWith(".")) {
       throw new IllegalArgumentException("No trailing period in prefix.");
     }
     this.prefix = prefix;
     this.editor = prefs.edit();
   }
 
+  @Override
   public void apply() {
-    // Android <=r8 SharedPreferences.Editor does not contain apply() for overriding.
-    this.editor.commit();
+    this.editor.apply();
   }
 
   @Override
   public Editor clear() {
     this.editor = this.editor.clear();
     return this;
   }