forked from github/cordova-android
Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
355aae7b4b | ||
![]() |
5b4524ae12 | ||
![]() |
33ac5c20b5 | ||
![]() |
3ac3688d8c |
@ -20,7 +20,7 @@
|
||||
*/
|
||||
|
||||
// Coho updates this line:
|
||||
var VERSION = "5.3.0-dev";
|
||||
var VERSION = "6.0.0";
|
||||
|
||||
module.exports.version = VERSION;
|
||||
|
||||
|
82
bin/templates/project/assets/www/cordova.js
vendored
82
bin/templates/project/assets/www/cordova.js
vendored
@ -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]);
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
|
||||
|
96
package.json
96
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"
|
||||
}
|
||||
}
|
@ -45,7 +45,7 @@
|
||||
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
|
||||
<uses-permission android:name="android.permission.BROADCAST_STICKY" />
|
||||
|
||||
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="19"/>
|
||||
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="24"/>
|
||||
|
||||
<instrumentation
|
||||
android:name="android.test.InstrumentationTestRunner"
|
||||
|
@ -35,7 +35,7 @@
|
||||
<preference name="useBrowserHistory" value="true" />
|
||||
<preference name="exit-on-suspend" value="false" />
|
||||
<preference name="showTitle" value="true" />
|
||||
<preference name="BackgroundColor" value="" />
|
||||
<preference name="BackgroundColor" value="#000000" />
|
||||
<feature name="Activity">
|
||||
<param name="android-package" value="org.apache.cordova.test.ActivityPlugin" />
|
||||
</feature>
|
||||
|
Loading…
Reference in New Issue
Block a user