mirror of
https://github.com/apache/cordova-android.git
synced 2026-05-30 00:00:04 +08:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 82bc714ed9 | |||
| 568d3b5332 | |||
| df53dbdbc4 | |||
| a70191a9a4 | |||
| 7ec8d08c58 | |||
| 6d40adfe33 |
@@ -20,6 +20,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// Coho updates this line:
|
// Coho updates this line:
|
||||||
var VERSION = "3.5.0-dev";
|
var VERSION = "3.5.0";
|
||||||
|
|
||||||
console.log(VERSION);
|
console.log(VERSION);
|
||||||
|
|||||||
Vendored
+108
-2
@@ -1,5 +1,5 @@
|
|||||||
// Platform: android
|
// Platform: android
|
||||||
// 3.5.0-dev-81f9a00
|
// 3.5.0
|
||||||
/*
|
/*
|
||||||
Licensed to the Apache Software Foundation (ASF) under one
|
Licensed to the Apache Software Foundation (ASF) under one
|
||||||
or more contributor license agreements. See the NOTICE file
|
or more contributor license agreements. See the NOTICE file
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
under the License.
|
under the License.
|
||||||
*/
|
*/
|
||||||
;(function() {
|
;(function() {
|
||||||
var CORDOVA_JS_BUILD_LABEL = '3.5.0-dev-81f9a00';
|
var CORDOVA_JS_BUILD_LABEL = '3.5.0';
|
||||||
// file: src/scripts/require.js
|
// file: src/scripts/require.js
|
||||||
|
|
||||||
/*jshint -W079 */
|
/*jshint -W079 */
|
||||||
@@ -825,6 +825,7 @@ channel.createSticky('onNativeReady');
|
|||||||
channel.createSticky('onCordovaReady');
|
channel.createSticky('onCordovaReady');
|
||||||
|
|
||||||
// Event to indicate that all automatically loaded JS plugins are loaded and ready.
|
// Event to indicate that all automatically loaded JS plugins are loaded and ready.
|
||||||
|
// FIXME remove this
|
||||||
channel.createSticky('onPluginsReady');
|
channel.createSticky('onPluginsReady');
|
||||||
|
|
||||||
// Event to indicate that Cordova is ready
|
// Event to indicate that Cordova is ready
|
||||||
@@ -1245,6 +1246,111 @@ channel.join(function() {
|
|||||||
}, platformInitChannelsArray);
|
}, platformInitChannelsArray);
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
// file: src/common/init_b.js
|
||||||
|
define("cordova/init_b", function(require, exports, module) {
|
||||||
|
|
||||||
|
var channel = require('cordova/channel');
|
||||||
|
var cordova = require('cordova');
|
||||||
|
var platform = require('cordova/platform');
|
||||||
|
|
||||||
|
var platformInitChannelsArray = [channel.onDOMContentLoaded, channel.onNativeReady];
|
||||||
|
|
||||||
|
// setting exec
|
||||||
|
cordova.exec = require('cordova/exec');
|
||||||
|
|
||||||
|
function logUnfiredChannels(arr) {
|
||||||
|
for (var i = 0; i < arr.length; ++i) {
|
||||||
|
if (arr[i].state != 2) {
|
||||||
|
console.log('Channel not fired: ' + arr[i].type);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
window.setTimeout(function() {
|
||||||
|
if (channel.onDeviceReady.state != 2) {
|
||||||
|
console.log('deviceready has not fired after 5 seconds.');
|
||||||
|
logUnfiredChannels(platformInitChannelsArray);
|
||||||
|
logUnfiredChannels(channel.deviceReadyChannelsArray);
|
||||||
|
}
|
||||||
|
}, 5000);
|
||||||
|
|
||||||
|
// Replace navigator before any modules are required(), to ensure it happens as soon as possible.
|
||||||
|
// We replace it so that properties that can't be clobbered can instead be overridden.
|
||||||
|
function replaceNavigator(origNavigator) {
|
||||||
|
var CordovaNavigator = function() {};
|
||||||
|
CordovaNavigator.prototype = origNavigator;
|
||||||
|
var newNavigator = new CordovaNavigator();
|
||||||
|
// This work-around really only applies to new APIs that are newer than Function.bind.
|
||||||
|
// Without it, APIs such as getGamepads() break.
|
||||||
|
if (CordovaNavigator.bind) {
|
||||||
|
for (var key in origNavigator) {
|
||||||
|
if (typeof origNavigator[key] == 'function') {
|
||||||
|
newNavigator[key] = origNavigator[key].bind(origNavigator);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return newNavigator;
|
||||||
|
}
|
||||||
|
if (window.navigator) {
|
||||||
|
window.navigator = replaceNavigator(window.navigator);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!window.console) {
|
||||||
|
window.console = {
|
||||||
|
log: function(){}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
if (!window.console.warn) {
|
||||||
|
window.console.warn = function(msg) {
|
||||||
|
this.log("warn: " + msg);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
// Register pause, resume and deviceready channels as events on document.
|
||||||
|
channel.onPause = cordova.addDocumentEventHandler('pause');
|
||||||
|
channel.onResume = cordova.addDocumentEventHandler('resume');
|
||||||
|
channel.onDeviceReady = cordova.addStickyDocumentEventHandler('deviceready');
|
||||||
|
|
||||||
|
// Listen for DOMContentLoaded and notify our channel subscribers.
|
||||||
|
if (document.readyState == 'complete' || document.readyState == 'interactive') {
|
||||||
|
channel.onDOMContentLoaded.fire();
|
||||||
|
} else {
|
||||||
|
document.addEventListener('DOMContentLoaded', function() {
|
||||||
|
channel.onDOMContentLoaded.fire();
|
||||||
|
}, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
// _nativeReady is global variable that the native side can set
|
||||||
|
// to signify that the native code is ready. It is a global since
|
||||||
|
// it may be called before any cordova JS is ready.
|
||||||
|
if (window._nativeReady) {
|
||||||
|
channel.onNativeReady.fire();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Call the platform-specific initialization.
|
||||||
|
platform.bootstrap && platform.bootstrap();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create all cordova objects once native side is ready.
|
||||||
|
*/
|
||||||
|
channel.join(function() {
|
||||||
|
|
||||||
|
platform.initialize && platform.initialize();
|
||||||
|
|
||||||
|
// Fire event to notify that all objects are created
|
||||||
|
channel.onCordovaReady.fire();
|
||||||
|
|
||||||
|
// Fire onDeviceReady event once page has fully loaded, all
|
||||||
|
// constructors have run and cordova info has been received from native
|
||||||
|
// side.
|
||||||
|
channel.join(function() {
|
||||||
|
require('cordova').fireDocumentEvent('deviceready');
|
||||||
|
}, channel.deviceReadyChannelsArray);
|
||||||
|
|
||||||
|
}, platformInitChannelsArray);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// file: src/common/modulemapper.js
|
// file: src/common/modulemapper.js
|
||||||
|
|||||||
@@ -1,3 +1,19 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2011 The Android Open Source Project
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
package com.squareup.okhttp.internal.spdy;
|
package com.squareup.okhttp.internal.spdy;
|
||||||
|
|
||||||
public enum ErrorCode {
|
public enum ErrorCode {
|
||||||
|
|||||||
@@ -1,3 +1,19 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2011 The Android Open Source Project
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
package com.squareup.okhttp.internal.spdy;
|
package com.squareup.okhttp.internal.spdy;
|
||||||
|
|
||||||
import java.io.DataInputStream;
|
import java.io.DataInputStream;
|
||||||
|
|||||||
@@ -1,3 +1,19 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2011 The Android Open Source Project
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
package com.squareup.okhttp.internal.spdy;
|
package com.squareup.okhttp.internal.spdy;
|
||||||
|
|
||||||
import com.squareup.okhttp.internal.Util;
|
import com.squareup.okhttp.internal.Util;
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ import android.widget.FrameLayout;
|
|||||||
public class CordovaWebView extends WebView {
|
public class CordovaWebView extends WebView {
|
||||||
|
|
||||||
public static final String TAG = "CordovaWebView";
|
public static final String TAG = "CordovaWebView";
|
||||||
public static final String CORDOVA_VERSION = "3.5.0-dev";
|
public static final String CORDOVA_VERSION = "3.5.0";
|
||||||
|
|
||||||
private ArrayList<Integer> keyDownCodes = new ArrayList<Integer>();
|
private ArrayList<Integer> keyDownCodes = new ArrayList<Integer>();
|
||||||
private ArrayList<Integer> keyUpCodes = new ArrayList<Integer>();
|
private ArrayList<Integer> keyUpCodes = new ArrayList<Integer>();
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "cordova-android",
|
"name": "cordova-android",
|
||||||
"version": "3.4.0",
|
"version": "3.5.0",
|
||||||
"description": "cordova-android release",
|
"description": "cordova-android release",
|
||||||
"main": "bin/create",
|
"main": "bin/create",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|||||||
Reference in New Issue
Block a user