cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agri...@apache.org
Subject [07/11] android commit: Add non-String overloades for CordovaPreferences.set()
Date Thu, 10 Jul 2014 14:30:41 GMT
Add non-String overloades for CordovaPreferences.set()


Project: http://git-wip-us.apache.org/repos/asf/cordova-android/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-android/commit/1c5b5e2c
Tree: http://git-wip-us.apache.org/repos/asf/cordova-android/tree/1c5b5e2c
Diff: http://git-wip-us.apache.org/repos/asf/cordova-android/diff/1c5b5e2c

Branch: refs/heads/4.0.x
Commit: 1c5b5e2ce644a4313624f540dad9abf4665cb870
Parents: 2f24e42
Author: Andrew Grieve <agrieve@chromium.org>
Authored: Thu Jul 10 10:23:26 2014 -0400
Committer: Andrew Grieve <agrieve@chromium.org>
Committed: Thu Jul 10 10:23:26 2014 -0400

----------------------------------------------------------------------
 .../src/org/apache/cordova/CordovaPreferences.java      | 12 ++++++++++++
 1 file changed, 12 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-android/blob/1c5b5e2c/framework/src/org/apache/cordova/CordovaPreferences.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/CordovaPreferences.java b/framework/src/org/apache/cordova/CordovaPreferences.java
index 4b9eb37..536f25a 100644
--- a/framework/src/org/apache/cordova/CordovaPreferences.java
+++ b/framework/src/org/apache/cordova/CordovaPreferences.java
@@ -40,6 +40,18 @@ public class CordovaPreferences {
         prefs.put(name.toLowerCase(Locale.ENGLISH), value);
     }
 
+    public void set(String name, boolean value) {
+        set(name, "" + value);
+    }
+
+    public void set(String name, int value) {
+        set(name, "" + value);
+    }
+    
+    public void set(String name, double value) {
+        set(name, "" + value);
+    }
+    
     public Map<String, String> getAll() {
         return prefs;
     }


Mime
View raw message