incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bows...@apache.org
Subject android commit: Upping the version to 2.0.0
Date Wed, 18 Jul 2012 23:58:28 GMT
Updated Branches:
  refs/heads/master b9f6a59a2 -> 29ae49298
Updated Tags:  refs/tags/2.0.0 [created] 29ae49298


Upping the version to 2.0.0


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/29ae4929
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/tree/29ae4929
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/diff/29ae4929

Branch: refs/heads/master
Commit: 29ae49298354e4f8afa96254a467718f78925b8a
Parents: b9f6a59
Author: Joe Bowser <bowserj@apache.org>
Authored: Wed Jul 18 16:58:03 2012 -0700
Committer: Joe Bowser <bowserj@apache.org>
Committed: Wed Jul 18 16:58:03 2012 -0700

----------------------------------------------------------------------
 VERSION                                      |    2 +-
 bin/templates/project/assets/www/index.html  |    2 +-
 framework/assets/js/cordova.android.js       |   71 +++------------------
 framework/assets/www/index.html              |    2 +-
 framework/src/org/apache/cordova/Device.java |    2 +-
 5 files changed, 13 insertions(+), 66 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/29ae4929/VERSION
----------------------------------------------------------------------
diff --git a/VERSION b/VERSION
index 4111d13..227cea2 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-2.0.0rc1
+2.0.0

http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/29ae4929/bin/templates/project/assets/www/index.html
----------------------------------------------------------------------
diff --git a/bin/templates/project/assets/www/index.html b/bin/templates/project/assets/www/index.html
index de219c6..de69cb1 100644
--- a/bin/templates/project/assets/www/index.html
+++ b/bin/templates/project/assets/www/index.html
@@ -23,7 +23,7 @@
     <meta http-equiv="Content-type" content="text/html; charset=utf-8">
     <title>PhoneGap</title>
       <link rel="stylesheet" href="master.css" type="text/css" media="screen" title="no
title">
-      <script type="text/javascript" charset="utf-8" src="cordova-2.0.0rc1.js"></script>
+      <script type="text/javascript" charset="utf-8" src="cordova-2.0.0.js"></script>
       <script type="text/javascript" charset="utf-8" src="main.js"></script>
 
   </head>

http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/29ae4929/framework/assets/js/cordova.android.js
----------------------------------------------------------------------
diff --git a/framework/assets/js/cordova.android.js b/framework/assets/js/cordova.android.js
index 6020e01..ba9e6a9 100644
--- a/framework/assets/js/cordova.android.js
+++ b/framework/assets/js/cordova.android.js
@@ -1,6 +1,6 @@
-// commit fd00bff18daf29606d88263f7586f20cf9421861
+// commit 114cf5304a74ff8f7c9ff1d21cf5652298af04b0
 
-// File generated at :: Fri Jul 13 2012 15:09:46 GMT-0700 (PDT)
+// File generated at :: Wed Jul 18 2012 14:44:33 GMT-0700 (PDT)
 
 /*
  Licensed to the Apache Software Foundation (ASF) under one
@@ -289,17 +289,6 @@ var cordova = {
             }
         }
     },
-    // TODO: remove in 2.0.
-    addPlugin: function(name, obj) {
-        console.log("[DEPRECATION NOTICE] window.addPlugin and window.plugins will be removed
in version 2.0.");
-        if (!window.plugins[name]) {
-            window.plugins[name] = obj;
-        }
-        else {
-            console.log("Error: Plugin "+name+" already exists.");
-        }
-    },
-
     addConstructor: function(func) {
         channel.onCordovaReady.subscribeOnce(function() {
             try {
@@ -316,51 +305,6 @@ channel.onPause = cordova.addDocumentEventHandler('pause');
 channel.onResume = cordova.addDocumentEventHandler('resume');
 channel.onDeviceReady = cordova.addDocumentEventHandler('deviceready');
 
-// Adds deprecation warnings to functions of an object (but only logs a message once)
-function deprecateFunctions(obj, objLabel) {
-    var newObj = {};
-    var logHash = {};
-    for (var i in obj) {
-        if (obj.hasOwnProperty(i)) {
-            if (typeof obj[i] == 'function') {
-                newObj[i] = (function(prop){
-                    var oldFunk = obj[prop];
-                    var funkId = objLabel + '_' + prop;
-                    return function() {
-                        if (!logHash[funkId]) {
-                            console.log('[DEPRECATION NOTICE] The "' + objLabel + '" global
will be removed in version 2.0, please use lowercase "cordova".');
-                            logHash[funkId] = true;
-                        }
-                        oldFunk.apply(obj, arguments);
-                    };
-                })(i);
-            } else {
-                newObj[i] = (function(prop) { return obj[prop]; })(i);
-            }
-        }
-    }
-    return newObj;
-}
-
-/**
- * Legacy variable for plugin support
- * TODO: remove in 2.0.
- */
-if (!window.PhoneGap) {
-    window.PhoneGap = deprecateFunctions(cordova, 'PhoneGap');
-}
-if (!window.Cordova) {
-    window.Cordova = deprecateFunctions(cordova, 'Cordova');
-}
-
-/**
- * Plugins object
- * TODO: remove in 2.0.
- */
-if (!window.plugins) {
-    window.plugins = {};
-}
-
 module.exports = cordova;
 
 });
@@ -3524,12 +3468,12 @@ var accelerometer = {
 
         var p;
         var win = function(a) {
-            successCallback(a);
             removeListeners(p);
+            successCallback(a);
         };
         var fail = function(e) {
-            errorCallback(e);
             removeListeners(p);
+            errorCallback(e);
         };
 
         p = createCallbackPair(win, fail);
@@ -3561,8 +3505,8 @@ var accelerometer = {
         var id = utils.createUUID();
 
         var p = createCallbackPair(function(){}, function(e) {
-            errorCallback(e);
             removeListeners(p);
+            errorCallback(e);
         });
         listeners.push(p);
 
@@ -3577,7 +3521,10 @@ var accelerometer = {
 
         if (running) {
             // If we're already running then immediately invoke the success callback
-            successCallback(accel);
+            // but only if we have retreived a value, sample code does not check for null
...
+            if(accel) {
+                successCallback(accel);
+            }
         } else {
             start();
         }

http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/29ae4929/framework/assets/www/index.html
----------------------------------------------------------------------
diff --git a/framework/assets/www/index.html b/framework/assets/www/index.html
index 9fbce68..8ee9aa7 100644
--- a/framework/assets/www/index.html
+++ b/framework/assets/www/index.html
@@ -19,7 +19,7 @@
 <html>
   <head>
     <title></title>
-    <script src="cordova-2.0.0rc1.js"></script>
+    <script src="cordova-2.0.0.js"></script>
   </head>
   <body>
 

http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/29ae4929/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 3ac219e..9f6312c 100644
--- a/framework/src/org/apache/cordova/Device.java
+++ b/framework/src/org/apache/cordova/Device.java
@@ -38,7 +38,7 @@ import android.telephony.TelephonyManager;
 public class Device extends Plugin {
     public static final String TAG = "Device";
 
-    public static String cordovaVersion = "2.0.0rc1";              // Cordova version
+    public static String cordovaVersion = "2.0.0";              // Cordova version
     public static String platform = "Android";                  // Device OS
     public static String uuid;                                  // Device UUID
 


Mime
View raw message