mirror of
https://github.com/apache/cordova-android.git
synced 2026-05-11 00:00:05 +08:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4fc26fb686 | |||
| 731ae51a00 | |||
| d0b3f419ef | |||
| d91ac45d88 | |||
| 488492813d | |||
| 0b6e90b82a |
@@ -16,4 +16,4 @@
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
echo "3.0.0rc1"
|
||||
echo "3.0.0"
|
||||
|
||||
Vendored
+3
-3
@@ -1,5 +1,5 @@
|
||||
// Platform: android
|
||||
// 3.0.0rc1-0-g1965a39
|
||||
// 3.0.0-0-ge670de9
|
||||
/*
|
||||
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 CORDOVA_JS_BUILD_LABEL = '3.0.0rc1-0-g1965a39';
|
||||
var CORDOVA_JS_BUILD_LABEL = '3.0.0-0-ge670de9';
|
||||
// file: lib/scripts/require.js
|
||||
|
||||
var require,
|
||||
@@ -1786,7 +1786,7 @@ function handlePluginsObject(path, moduleList) {
|
||||
var scriptCounter = moduleList.length;
|
||||
|
||||
if (!scriptCounter) {
|
||||
onScriptLoadingComplete();
|
||||
finishPluginLoading();
|
||||
return;
|
||||
}
|
||||
function scriptLoadedCallback() {
|
||||
|
||||
@@ -47,8 +47,4 @@
|
||||
<feature name="App">
|
||||
<param name="android-package" value="org.apache.cordova.App" />
|
||||
</feature>
|
||||
|
||||
<!-- Deprecated plugins element. Remove in 3.0 -->
|
||||
<plugins>
|
||||
</plugins>
|
||||
</widget>
|
||||
|
||||
@@ -156,9 +156,24 @@ public class CordovaResourceApi {
|
||||
* @throws Throws an InvalidArgumentException for relative URIs. Relative URIs should be
|
||||
* resolved before being passed into this function.
|
||||
* @throws Throws an IOException if the URI cannot be opened.
|
||||
* @throws Throws an IllegalStateException if called on a foreground thread.
|
||||
*/
|
||||
public OpenForReadResult openForRead(Uri uri) throws IOException {
|
||||
assertBackgroundThread();
|
||||
return openForRead(uri, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Opens a stream to the givne URI, also providing the MIME type & length.
|
||||
* @return Never returns null.
|
||||
* @throws Throws an InvalidArgumentException for relative URIs. Relative URIs should be
|
||||
* resolved before being passed into this function.
|
||||
* @throws Throws an IOException if the URI cannot be opened.
|
||||
* @throws Throws an IllegalStateException if called on a foreground thread and skipThreadCheck is false.
|
||||
*/
|
||||
public OpenForReadResult openForRead(Uri uri, boolean skipThreadCheck) throws IOException {
|
||||
if (!skipThreadCheck) {
|
||||
assertBackgroundThread();
|
||||
}
|
||||
switch (getUriType(uri)) {
|
||||
case URI_TYPE_FILE: {
|
||||
FileInputStream inputStream = new FileInputStream(uri.getPath());
|
||||
|
||||
@@ -23,6 +23,7 @@ import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Locale;
|
||||
|
||||
import org.apache.cordova.Config;
|
||||
import org.apache.cordova.CordovaInterface;
|
||||
@@ -425,7 +426,7 @@ public class CordovaWebView extends WebView {
|
||||
// Create a timeout timer for loadUrl
|
||||
final CordovaWebView me = this;
|
||||
final int currentLoadUrlTimeout = me.loadUrlTimeout;
|
||||
final int loadUrlTimeoutValue = Integer.parseInt(this.getProperty("loadUrlTimeoutValue", "20000"));
|
||||
final int loadUrlTimeoutValue = Integer.parseInt(this.getProperty("LoadUrlTimeoutValue", "20000"));
|
||||
|
||||
// Timeout error method
|
||||
final Runnable loadError = new Runnable() {
|
||||
@@ -620,7 +621,7 @@ public class CordovaWebView extends WebView {
|
||||
*/
|
||||
private void loadConfiguration() {
|
||||
|
||||
if ("true".equals(this.getProperty("fullscreen", "false"))) {
|
||||
if ("true".equals(this.getProperty("Fullscreen", "false"))) {
|
||||
this.cordova.getActivity().getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);
|
||||
this.cordova.getActivity().getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
|
||||
}
|
||||
@@ -638,6 +639,7 @@ public class CordovaWebView extends WebView {
|
||||
if (bundle == null) {
|
||||
return defaultValue;
|
||||
}
|
||||
name = name.toLowerCase(Locale.getDefault());
|
||||
Object p = bundle.get(name);
|
||||
if (p == null) {
|
||||
return defaultValue;
|
||||
|
||||
@@ -59,7 +59,7 @@ public class IceCreamCordovaWebViewClient extends CordovaWebViewClient {
|
||||
Uri remappedUri = resourceApi.remapUri(origUri);
|
||||
|
||||
if (!origUri.equals(remappedUri) || needsSpecialsInAssetUrlFix(origUri)) {
|
||||
OpenForReadResult result = resourceApi.openForRead(remappedUri);
|
||||
OpenForReadResult result = resourceApi.openForRead(remappedUri, true);
|
||||
return new WebResourceResponse(result.mimeType, "UTF-8", result.inputStream);
|
||||
}
|
||||
// If we don't need to special-case the request, let the browser load it.
|
||||
|
||||
@@ -225,7 +225,12 @@ public class PluginManager {
|
||||
}
|
||||
try {
|
||||
CallbackContext callbackContext = new CallbackContext(callbackId, app);
|
||||
long pluginStartTime = System.currentTimeMillis();
|
||||
boolean wasValidAction = plugin.execute(action, rawArgs, callbackContext);
|
||||
long duration = System.currentTimeMillis() - pluginStartTime;
|
||||
if (duration > 16) {
|
||||
Log.w(TAG, "THREAD WARNING: exec() call to " + service + "." + action + " blocked the main thread for " + duration + "ms. Plugin should use CordovaInterface.getThreadPool().");
|
||||
}
|
||||
if (!wasValidAction) {
|
||||
PluginResult cr = new PluginResult(PluginResult.Status.INVALID_ACTION);
|
||||
app.sendPluginResult(cr, callbackId);
|
||||
|
||||
Vendored
+8
-3
@@ -1,5 +1,5 @@
|
||||
// Platform: android
|
||||
// 2.7.0rc1-169-g87cc336
|
||||
// 3.0.0-0-ge670de9
|
||||
/*
|
||||
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 CORDOVA_JS_BUILD_LABEL = '2.7.0rc1-169-g87cc336';
|
||||
var CORDOVA_JS_BUILD_LABEL = '3.0.0-0-ge670de9';
|
||||
// file: lib/scripts/require.js
|
||||
|
||||
var require,
|
||||
@@ -900,7 +900,7 @@ function androidExec(success, fail, service, action, args) {
|
||||
// Process any ArrayBuffers in the args into a string.
|
||||
for (var i = 0; i < args.length; i++) {
|
||||
if (utils.typeName(args[i]) == 'ArrayBuffer') {
|
||||
args[i] = utils.encodeBase64(args[i]);
|
||||
args[i] = base64.fromArrayBuffer(args[i]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1784,6 +1784,11 @@ function finishPluginLoading() {
|
||||
function handlePluginsObject(path, moduleList) {
|
||||
// Now inject the scripts.
|
||||
var scriptCounter = moduleList.length;
|
||||
|
||||
if (!scriptCounter) {
|
||||
finishPluginLoading();
|
||||
return;
|
||||
}
|
||||
function scriptLoadedCallback() {
|
||||
if (!--scriptCounter) {
|
||||
onScriptLoadingComplete(moduleList);
|
||||
|
||||
Reference in New Issue
Block a user