incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bows...@apache.org
Subject android commit: Tagged 1.6rc1
Date Fri, 23 Mar 2012 21:30:54 GMT
Updated Branches:
  refs/heads/master 9d2659833 -> 9d0e8fa43
Updated Tags:  refs/tags/1.6.0rc1 [created] 9d0e8fa43


Tagged 1.6rc1


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

Branch: refs/heads/master
Commit: 9d0e8fa4362a0a0f39ab5eff727f7c5aa8c82fe6
Parents: 9d26598
Author: Joe Bowser <bowserj@apache.org>
Authored: Fri Mar 23 14:30:18 2012 -0700
Committer: Joe Bowser <bowserj@apache.org>
Committed: Fri Mar 23 14:30:18 2012 -0700

----------------------------------------------------------------------
 VERSION                                      |    2 +-
 framework/src/org/apache/cordova/Device.java |  216 ++++++++++----------
 2 files changed, 109 insertions(+), 109 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/9d0e8fa4/VERSION
----------------------------------------------------------------------
diff --git a/VERSION b/VERSION
index bc80560..40ab7ec 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-1.5.0
+1.6.0rc1

http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/9d0e8fa4/framework/src/org/apache/cordova/Device.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/Device.java b/framework/src/org/apache/cordova/Device.java
index 9b3057c..da1e61e 100644
--- a/framework/src/org/apache/cordova/Device.java
+++ b/framework/src/org/apache/cordova/Device.java
@@ -38,73 +38,73 @@ import android.telephony.TelephonyManager;
 public class Device extends Plugin {
     public static final String TAG = "Device";
 
-    public static String cordovaVersion = "1.5.0";              // Cordova version
-	public static String platform = "Android";					// Device OS
-	public static String uuid;									// Device UUID
+    public static String cordovaVersion = "1.6.0rc1";              // Cordova version
+    public static String platform = "Android";                  // Device OS
+    public static String uuid;                                  // Device UUID
     
     BroadcastReceiver telephonyReceiver = null;
 
     /**
      * Constructor.
      */
-	public Device() {
+    public Device() {
     }
-	
-	/**
-	 * Sets the context of the Command. This can then be used to do things like
-	 * get file paths associated with the Activity.
-	 * 
-	 * @param ctx The context of the main Activity.
-	 */
-	public void setContext(CordovaInterface ctx) {
-		super.setContext(ctx);
+    
+    /**
+     * Sets the context of the Command. This can then be used to do things like
+     * get file paths associated with the Activity.
+     * 
+     * @param ctx The context of the main Activity.
+     */
+    public void setContext(CordovaInterface ctx) {
+        super.setContext(ctx);
         Device.uuid = getUuid();
         this.initTelephonyReceiver();
-	}
+    }
 
-	/**
-	 * Executes the request and returns PluginResult.
-	 * 
-	 * @param action 		The action to execute.
-	 * @param args 			JSONArry of arguments for the plugin.
-	 * @param callbackId	The callback id used when calling back into JavaScript.
-	 * @return 				A PluginResult object with a status and message.
-	 */
-	public PluginResult execute(String action, JSONArray args, String callbackId) {
-		PluginResult.Status status = PluginResult.Status.OK;
-		String result = "";		
-	
-		try {
-			if (action.equals("getDeviceInfo")) {
-				JSONObject r = new JSONObject();
-				r.put("uuid", Device.uuid);
-				r.put("version", this.getOSVersion());
-				r.put("platform", Device.platform);
-				r.put("name", this.getProductName());
-				r.put("cordova", Device.cordovaVersion);
-				//JSONObject pg = new JSONObject();
-				//pg.put("version", Device.CordovaVersion);
-				//r.put("cordova", pg);
-				return new PluginResult(status, r);
-			}
-			return new PluginResult(status, result);
-		} catch (JSONException e) {
-			return new PluginResult(PluginResult.Status.JSON_EXCEPTION);
-		}
-	}
+    /**
+     * Executes the request and returns PluginResult.
+     * 
+     * @param action        The action to execute.
+     * @param args          JSONArry of arguments for the plugin.
+     * @param callbackId    The callback id used when calling back into JavaScript.
+     * @return              A PluginResult object with a status and message.
+     */
+    public PluginResult execute(String action, JSONArray args, String callbackId) {
+        PluginResult.Status status = PluginResult.Status.OK;
+        String result = "";     
+    
+        try {
+            if (action.equals("getDeviceInfo")) {
+                JSONObject r = new JSONObject();
+                r.put("uuid", Device.uuid);
+                r.put("version", this.getOSVersion());
+                r.put("platform", Device.platform);
+                r.put("name", this.getProductName());
+                r.put("cordova", Device.cordovaVersion);
+                //JSONObject pg = new JSONObject();
+                //pg.put("version", Device.CordovaVersion);
+                //r.put("cordova", pg);
+                return new PluginResult(status, r);
+            }
+            return new PluginResult(status, result);
+        } catch (JSONException e) {
+            return new PluginResult(PluginResult.Status.JSON_EXCEPTION);
+        }
+    }
 
-	/**
-	 * Identifies if action to be executed returns a value and should be run synchronously.
-	 * 
-	 * @param action	The action to execute
-	 * @return			T=returns value
-	 */
-	public boolean isSynch(String action) {
-		if (action.equals("getDeviceInfo")) {
-			return true;
-		}
-		return false;
-	}
+    /**
+     * Identifies if action to be executed returns a value and should be run synchronously.
+     * 
+     * @param action    The action to execute
+     * @return          T=returns value
+     */
+    public boolean isSynch(String action) {
+        if (action.equals("getDeviceInfo")) {
+            return true;
+        }
+        return false;
+    }
     
     /**
      * Unregister receiver.
@@ -156,59 +156,59 @@ public class Device extends Plugin {
         this.ctx.registerReceiver(this.telephonyReceiver, intentFilter);
     }
 
-	/**
-	 * Get the OS name.
-	 * 
-	 * @return
-	 */
-	public String getPlatform()	{
-		return Device.platform;
-	}
-	
-	/**
-	 * Get the device's Universally Unique Identifier (UUID).
-	 * 
-	 * @return
-	 */
-	public String getUuid()	{		
-		String uuid = Settings.Secure.getString(this.ctx.getContentResolver(), android.provider.Settings.Secure.ANDROID_ID);
-		return uuid;
-	}
+    /**
+     * Get the OS name.
+     * 
+     * @return
+     */
+    public String getPlatform() {
+        return Device.platform;
+    }
+    
+    /**
+     * Get the device's Universally Unique Identifier (UUID).
+     * 
+     * @return
+     */
+    public String getUuid() {       
+        String uuid = Settings.Secure.getString(this.ctx.getContentResolver(), android.provider.Settings.Secure.ANDROID_ID);
+        return uuid;
+    }
 
-	/**
-	 * Get the Cordova version.
-	 * 
-	 * @return
-	 */
-	public String getCordovaVersion() {
-		return Device.cordovaVersion;
-	}	
-	
-	public String getModel() {
-		String model = android.os.Build.MODEL;
-		return model;
-	}
-	
-	public String getProductName() {
-		String productname = android.os.Build.PRODUCT;
-		return productname;
-	}
-	
-	/**
-	 * Get the OS version.
-	 * 
-	 * @return
-	 */
-	public String getOSVersion() {
-		String osversion = android.os.Build.VERSION.RELEASE;
-		return osversion;
-	}
-	
-	public String getSDKVersion() {
-		String sdkversion = android.os.Build.VERSION.SDK;
-		return sdkversion;
-	}
-	
+    /**
+     * Get the Cordova version.
+     * 
+     * @return
+     */
+    public String getCordovaVersion() {
+        return Device.cordovaVersion;
+    }   
+    
+    public String getModel() {
+        String model = android.os.Build.MODEL;
+        return model;
+    }
+    
+    public String getProductName() {
+        String productname = android.os.Build.PRODUCT;
+        return productname;
+    }
+    
+    /**
+     * Get the OS version.
+     * 
+     * @return
+     */
+    public String getOSVersion() {
+        String osversion = android.os.Build.VERSION.RELEASE;
+        return osversion;
+    }
+    
+    public String getSDKVersion() {
+        String sdkversion = android.os.Build.VERSION.SDK;
+        return sdkversion;
+    }
+    
     
     public String getTimeZoneID() {
        TimeZone tz = TimeZone.getDefault();


Mime
View raw message