You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by bo...@apache.org on 2016/10/20 18:50:50 UTC

[1/2] android commit: Set VERSION to 6.0.0 (via coho)

Repository: cordova-android
Updated Branches:
  refs/heads/6.0.x [created] 33ac5c20b


Set VERSION to 6.0.0 (via coho)


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

Branch: refs/heads/6.0.x
Commit: 33ac5c20b5a7711cb8052b9a53aefa62016ec696
Parents: 3ac3688
Author: Joe Bowser <bo...@apache.org>
Authored: Thu Oct 20 11:49:03 2016 -0700
Committer: Joe Bowser <bo...@apache.org>
Committed: Thu Oct 20 11:49:03 2016 -0700

----------------------------------------------------------------------
 VERSION                                         |  2 +-
 bin/templates/cordova/version                   |  2 +-
 .../src/org/apache/cordova/CordovaWebView.java  |  2 +-
 package.json                                    | 96 ++++++++++----------
 4 files changed, 51 insertions(+), 51 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-android/blob/33ac5c20/VERSION
----------------------------------------------------------------------
diff --git a/VERSION b/VERSION
index 41d1aa2..09b254e 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-5.3.0-dev
+6.0.0

http://git-wip-us.apache.org/repos/asf/cordova-android/blob/33ac5c20/bin/templates/cordova/version
----------------------------------------------------------------------
diff --git a/bin/templates/cordova/version b/bin/templates/cordova/version
index 7384537..11dce1f 100755
--- a/bin/templates/cordova/version
+++ b/bin/templates/cordova/version
@@ -20,7 +20,7 @@
 */
 
 // Coho updates this line:
-var VERSION = "5.3.0-dev";
+var VERSION = "6.0.0";
 
 module.exports.version = VERSION;
 

http://git-wip-us.apache.org/repos/asf/cordova-android/blob/33ac5c20/framework/src/org/apache/cordova/CordovaWebView.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/CordovaWebView.java b/framework/src/org/apache/cordova/CordovaWebView.java
index b3e26c0..3565e17 100644
--- a/framework/src/org/apache/cordova/CordovaWebView.java
+++ b/framework/src/org/apache/cordova/CordovaWebView.java
@@ -31,7 +31,7 @@ import android.webkit.WebChromeClient.CustomViewCallback;
  * are not expected to implement it.
  */
 public interface CordovaWebView {
-    public static final String CORDOVA_VERSION = "5.3.0-dev";
+    public static final String CORDOVA_VERSION = "6.0.0";
 
     void init(CordovaInterface cordova, List<PluginEntry> pluginEntries, CordovaPreferences preferences);
 

http://git-wip-us.apache.org/repos/asf/cordova-android/blob/33ac5c20/package.json
----------------------------------------------------------------------
diff --git a/package.json b/package.json
index f87ce8c..e43a382 100644
--- a/package.json
+++ b/package.json
@@ -1,49 +1,49 @@
 {
-  "name": "cordova-android",
-  "version": "6.0.0",
-  "description": "cordova-android release",
-  "bin": {
-    "create": "bin/create"
-  },
-  "main": "bin/templates/cordova/Api.js",
-  "repository": {
-    "type": "git",
-    "url": "https://git-wip-us.apache.org/repos/asf/cordova-android.git"
-  },
-  "keywords": [
-    "android",
-    "cordova",
-    "apache"
-  ],
-  "scripts": {
-    "test": "npm run jshint && jasmine-node --color spec/unit",
-    "cover": "istanbul cover --root bin/templates/cordova --print detail node_modules/jasmine-node/bin/jasmine-node -- spec/unit",
-    "test-build": "jasmine-node --captureExceptions --color spec/e2e",
-    "jshint": "node node_modules/jshint/bin/jshint bin && node node_modules/jshint/bin/jshint spec"
-  },
-  "author": "Apache Software Foundation",
-  "license": "Apache-2.0",
-  "dependencies": {
-    "cordova-common": "^1.5.0",
-    "elementtree": "^0.1.6",
-    "nopt": "^3.0.1",
-    "properties-parser": "^0.2.3",
-    "q": "^1.4.1",
-    "shelljs": "^0.5.3"
-  },
-  "bundledDependencies": [
-    "cordova-common",
-    "elementtree",
-    "nopt",
-    "properties-parser",
-    "q",
-    "shelljs"
-  ],
-  "devDependencies": {
-    "istanbul": "^0.4.2",
-    "jasmine-node": "^1.14.5",
-    "jshint": "^2.6.0",
-    "promise-matchers": "~0",
-    "rewire": "^2.1.3"
-  }
-}
+    "name": "cordova-android",
+    "version": "6.0.0",
+    "description": "cordova-android release",
+    "bin": {
+        "create": "bin/create"
+    },
+    "main": "bin/templates/cordova/Api.js",
+    "repository": {
+        "type": "git",
+        "url": "https://git-wip-us.apache.org/repos/asf/cordova-android.git"
+    },
+    "keywords": [
+        "android",
+        "cordova",
+        "apache"
+    ],
+    "scripts": {
+        "test": "npm run jshint && jasmine-node --color spec/unit",
+        "cover": "istanbul cover --root bin/templates/cordova --print detail node_modules/jasmine-node/bin/jasmine-node -- spec/unit",
+        "test-build": "jasmine-node --captureExceptions --color spec/e2e",
+        "jshint": "node node_modules/jshint/bin/jshint bin && node node_modules/jshint/bin/jshint spec"
+    },
+    "author": "Apache Software Foundation",
+    "license": "Apache-2.0",
+    "dependencies": {
+        "cordova-common": "^1.5.0",
+        "elementtree": "^0.1.6",
+        "nopt": "^3.0.1",
+        "properties-parser": "^0.2.3",
+        "q": "^1.4.1",
+        "shelljs": "^0.5.3"
+    },
+    "bundledDependencies": [
+        "cordova-common",
+        "elementtree",
+        "nopt",
+        "properties-parser",
+        "q",
+        "shelljs"
+    ],
+    "devDependencies": {
+        "istanbul": "^0.4.2",
+        "jasmine-node": "^1.14.5",
+        "jshint": "^2.6.0",
+        "promise-matchers": "~0",
+        "rewire": "^2.1.3"
+    }
+}
\ No newline at end of file


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[2/2] android commit: Update JS snapshot to version 6.0.0 (via coho)

Posted by bo...@apache.org.
Update JS snapshot to version 6.0.0 (via coho)


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

Branch: refs/heads/6.0.x
Commit: 3ac3688d8cbf861e1de3452e4b13aa920d7327ad
Parents: 81dfe96
Author: Joe Bowser <bo...@apache.org>
Authored: Thu Oct 20 11:49:03 2016 -0700
Committer: Joe Bowser <bo...@apache.org>
Committed: Thu Oct 20 11:49:03 2016 -0700

----------------------------------------------------------------------
 bin/templates/project/assets/www/cordova.js | 82 ++++++++++++++++--------
 1 file changed, 56 insertions(+), 26 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-android/blob/3ac3688d/bin/templates/project/assets/www/cordova.js
----------------------------------------------------------------------
diff --git a/bin/templates/project/assets/www/cordova.js b/bin/templates/project/assets/www/cordova.js
index f5e1fe5..cbd9c6f 100644
--- a/bin/templates/project/assets/www/cordova.js
+++ b/bin/templates/project/assets/www/cordova.js
@@ -1,5 +1,5 @@
 // Platform: android
-// 0030f1d859d2a8360b621b0d48072f3f08eb6925
+// 53ea1913735222d326e65326e03391405df3cd4e
 /*
  Licensed to the Apache Software Foundation (ASF) under one
  or more contributor license agreements.  See the NOTICE file
@@ -19,7 +19,7 @@
  under the License.
 */
 ;(function() {
-var PLATFORM_VERSION_BUILD_LABEL = '5.3.0-dev';
+var PLATFORM_VERSION_BUILD_LABEL = '6.0.0';
 // file: src/scripts/require.js
 
 /*jshint -W079 */
@@ -330,7 +330,7 @@ module.exports = cordova;
 
 });
 
-// file: F:/coho/cordova-android/cordova-js-src/android/nativeapiprovider.js
+// file: /Users/jbowser/cordova/cordova-android/cordova-js-src/android/nativeapiprovider.js
 define("cordova/android/nativeapiprovider", function(require, exports, module) {
 
 /**
@@ -353,7 +353,7 @@ module.exports = {
 
 });
 
-// file: F:/coho/cordova-android/cordova-js-src/android/promptbasednativeapi.js
+// file: /Users/jbowser/cordova/cordova-android/cordova-js-src/android/promptbasednativeapi.js
 define("cordova/android/promptbasednativeapi", function(require, exports, module) {
 
 /**
@@ -742,8 +742,13 @@ var Channel = function(type, sticky) {
         }
     };
 
-function forceFunction(f) {
-    if (typeof f != 'function') throw "Function required as first argument!";
+function checkSubscriptionArgument(argument) {
+    if (typeof argument !== "function" && typeof argument.handleEvent !== "function") {
+        throw new Error(
+                "Must provide a function or an EventListener object " +
+                "implementing the handleEvent interface."
+        );
+    }
 }
 
 /**
@@ -753,28 +758,39 @@ function forceFunction(f) {
  * and a guid that can be used to stop subscribing to the channel.
  * Returns the guid.
  */
-Channel.prototype.subscribe = function(f, c) {
-    // need a function to call
-    forceFunction(f);
+Channel.prototype.subscribe = function(eventListenerOrFunction, eventListener) {
+    checkSubscriptionArgument(eventListenerOrFunction);
+    var handleEvent, guid;
+
+    if (eventListenerOrFunction && typeof eventListenerOrFunction === "object") {
+        // Received an EventListener object implementing the handleEvent interface
+        handleEvent = eventListenerOrFunction.handleEvent;
+        eventListener = eventListenerOrFunction;
+    } else {
+        // Received a function to handle event
+        handleEvent = eventListenerOrFunction;
+    }
+
     if (this.state == 2) {
-        f.apply(c || this, this.fireArgs);
+        handleEvent.apply(eventListener || this, this.fireArgs);
         return;
     }
 
-    var func = f,
-        guid = f.observer_guid;
-    if (typeof c == "object") { func = utils.close(c, f); }
+    guid = eventListenerOrFunction.observer_guid;
+    if (typeof eventListener === "object") {
+        handleEvent = utils.close(eventListener, handleEvent);
+    }
 
     if (!guid) {
-        // first time any channel has seen this subscriber
+        // First time any channel has seen this subscriber
         guid = '' + nextGuid++;
     }
-    func.observer_guid = guid;
-    f.observer_guid = guid;
+    handleEvent.observer_guid = guid;
+    eventListenerOrFunction.observer_guid = guid;
 
     // Don't add the same handler more than once.
     if (!this.handlers[guid]) {
-        this.handlers[guid] = func;
+        this.handlers[guid] = handleEvent;
         this.numHandlers++;
         if (this.numHandlers == 1) {
             this.onHasSubscribersChange && this.onHasSubscribersChange();
@@ -785,12 +801,20 @@ Channel.prototype.subscribe = function(f, c) {
 /**
  * Unsubscribes the function with the given guid from the channel.
  */
-Channel.prototype.unsubscribe = function(f) {
-    // need a function to unsubscribe
-    forceFunction(f);
+Channel.prototype.unsubscribe = function(eventListenerOrFunction) {
+    checkSubscriptionArgument(eventListenerOrFunction);
+    var handleEvent, guid, handler;
 
-    var guid = f.observer_guid,
-        handler = this.handlers[guid];
+    if (eventListenerOrFunction && typeof eventListenerOrFunction === "object") {
+        // Received an EventListener object implementing the handleEvent interface
+        handleEvent = eventListenerOrFunction.handleEvent;
+    } else {
+        // Received a function to handle event
+        handleEvent = eventListenerOrFunction;
+    }
+
+    guid = handleEvent.observer_guid;
+    handler = this.handlers[guid];
     if (handler) {
         delete this.handlers[guid];
         this.numHandlers--;
@@ -862,7 +886,7 @@ module.exports = channel;
 
 });
 
-// file: F:/coho/cordova-android/cordova-js-src/exec.js
+// file: /Users/jbowser/cordova/cordova-android/cordova-js-src/exec.js
 define("cordova/exec", function(require, exports, module) {
 
 /**
@@ -924,6 +948,9 @@ function androidExec(success, fail, service, action, args) {
         androidExec.setJsToNativeBridgeMode(jsToNativeModes.JS_OBJECT);
     }
 
+    // If args is not provided, default to an empty array
+    args = args || [];
+
     // Process any ArrayBuffers in the args into a string.
     for (var i = 0; i < args.length; i++) {
         if (utils.typeName(args[i]) == 'ArrayBuffer') {
@@ -1622,7 +1649,7 @@ exports.reset();
 
 });
 
-// file: F:/coho/cordova-android/cordova-js-src/platform.js
+// file: /Users/jbowser/cordova/cordova-android/cordova-js-src/platform.js
 define("cordova/platform", function(require, exports, module) {
 
 // The last resume event that was received that had the result of a plugin call.
@@ -1732,7 +1759,7 @@ function onMessageFromNative(msg) {
 
 });
 
-// file: F:/coho/cordova-android/cordova-js-src/plugin/android/app.js
+// file: /Users/jbowser/cordova/cordova-android/cordova-js-src/plugin/android/app.js
 define("cordova/plugin/android/app", function(require, exports, module) {
 
 var exec = require('cordova/exec');
@@ -2094,7 +2121,10 @@ utils.clone = function(obj) {
 
     retVal = {};
     for(i in obj){
-        if((!(i in retVal) || retVal[i] != obj[i]) && typeof obj[i] != 'undefined') {
+        // https://issues.apache.org/jira/browse/CB-11522 'unknown' type may be returned in
+        // custom protocol activation case on Windows Phone 8.1 causing "No such interface supported" exception
+        // on cloning.
+        if((!(i in retVal) || retVal[i] != obj[i]) && typeof obj[i] != 'undefined' && typeof obj[i] != 'unknown') {
             retVal[i] = utils.clone(obj[i]);
         }
     }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org