forked from github/cordova-android
Compare commits
7 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
909e6645e7 | ||
|
a308100288 | ||
|
fea8c5d204 | ||
|
a890c8156e | ||
|
665c1bd8bb | ||
|
b22990ca78 | ||
|
832998b67f |
@ -33,7 +33,7 @@
|
|||||||
<p class="event received">Device is Ready</p>
|
<p class="event received">Device is Ready</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script type="text/javascript" src="cordova-2.6.0.js"></script>
|
<script type="text/javascript" src="cordova-2.7.0.js"></script>
|
||||||
<script type="text/javascript" src="js/index.js"></script>
|
<script type="text/javascript" src="js/index.js"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
app.initialize();
|
app.initialize();
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
// Platform: android
|
// Platform: android
|
||||||
|
|
||||||
// commit d0ffb852378ff018bac2f3b12c38098a19b8ce00
|
// commit cd29cf0f224ccf25e9d422a33fd02ef67d3a78f4
|
||||||
|
|
||||||
// File generated at :: Thu Apr 18 2013 15:10:54 GMT-0400 (EDT)
|
// File generated at :: Thu Apr 25 2013 14:53:10 GMT-0700 (PDT)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Licensed to the Apache Software Foundation (ASF) under one
|
Licensed to the Apache Software Foundation (ASF) under one
|
||||||
@ -6813,7 +6813,7 @@ require('cordova/channel').onNativeReady.fire();
|
|||||||
xhr.onload = function() {
|
xhr.onload = function() {
|
||||||
// If the response is a JSON string which composes an array, call handlePluginsObject.
|
// If the response is a JSON string which composes an array, call handlePluginsObject.
|
||||||
// If the request fails, or the response is not a JSON array, just call finishPluginLoading.
|
// If the request fails, or the response is not a JSON array, just call finishPluginLoading.
|
||||||
var obj = JSON.parse(this.responseText);
|
var obj = this.responseText && JSON.parse(this.responseText);
|
||||||
if (obj && obj instanceof Array && obj.length > 0) {
|
if (obj && obj instanceof Array && obj.length > 0) {
|
||||||
handlePluginsObject(obj);
|
handlePluginsObject(obj);
|
||||||
} else {
|
} else {
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title></title>
|
<title></title>
|
||||||
<script src="cordova-2.6.0.js"></script>
|
<script src="cordova-2.7.0.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ import android.telephony.TelephonyManager;
|
|||||||
public class Device extends CordovaPlugin {
|
public class Device extends CordovaPlugin {
|
||||||
public static final String TAG = "Device";
|
public static final String TAG = "Device";
|
||||||
|
|
||||||
public static String cordovaVersion = "2.6.0"; // Cordova version
|
public static String cordovaVersion = "2.7.0"; // Cordova version
|
||||||
public static String platform = "Android"; // Device OS
|
public static String platform = "Android"; // Device OS
|
||||||
public static String uuid; // Device UUID
|
public static String uuid; // Device UUID
|
||||||
|
|
||||||
|
@ -43,13 +43,12 @@ public class IceCreamCordovaWebViewClient extends CordovaWebViewClient {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public WebResourceResponse shouldInterceptRequest(WebView view, String url) {
|
public WebResourceResponse shouldInterceptRequest(WebView view, String url) {
|
||||||
if(url.contains("?") || url.contains("#") || needsIceCreamSpaceInAssetUrlFix(url)){
|
//Check if plugins intercept the request
|
||||||
WebResourceResponse ret = generateWebResourceResponse(url);
|
WebResourceResponse ret = super.shouldInterceptRequest(view, url);
|
||||||
if (ret != null) {
|
if(ret == null && (url.contains("?") || url.contains("#") || needsIceCreamSpaceInAssetUrlFix(url))){
|
||||||
return ret;
|
ret = generateWebResourceResponse(url);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return super.shouldInterceptRequest(view, url);
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
private WebResourceResponse generateWebResourceResponse(String url) {
|
private WebResourceResponse generateWebResourceResponse(String url) {
|
||||||
|
Loading…
Reference in New Issue
Block a user