Update to new android cordova build
Signed-off-by: Chris Cromer <chris@cromer.cl>
This commit is contained in:
27
node_modules/cordova-android/framework/build.gradle
generated
vendored
27
node_modules/cordova-android/framework/build.gradle
generated
vendored
@@ -24,15 +24,15 @@ ext {
|
||||
|
||||
buildscript {
|
||||
repositories {
|
||||
maven {
|
||||
url "https://maven.google.com"
|
||||
}
|
||||
google()
|
||||
jcenter()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:3.0.1'
|
||||
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
|
||||
// The gradle plugin and the maven plugin have to be updated after each version of Android
|
||||
// studio comes out
|
||||
classpath 'com.android.tools.build:gradle:3.3.0'
|
||||
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
|
||||
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
|
||||
}
|
||||
}
|
||||
@@ -42,12 +42,11 @@ apply plugin: 'com.github.dcendents.android-maven'
|
||||
apply plugin: 'com.jfrog.bintray'
|
||||
|
||||
group = 'org.apache.cordova'
|
||||
version = '7.1.4'
|
||||
version = '8.0.0'
|
||||
|
||||
android {
|
||||
compileSdkVersion cdvCompileSdkVersion
|
||||
buildToolsVersion cdvBuildToolsVersion
|
||||
publishNonDefault true
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
@@ -94,9 +93,9 @@ install {
|
||||
}
|
||||
}
|
||||
scm {
|
||||
connection 'https://git-wip-us.apache.org/repos/asf?p=cordova-android.git'
|
||||
developerConnection 'https://git-wip-us.apache.org/repos/asf?p=cordova-android.git'
|
||||
url 'https://git-wip-us.apache.org/repos/asf?p=cordova-android'
|
||||
connection 'scm:git:https://github.com/apache/cordova-android.git'
|
||||
developerConnection 'scm:git:git@github.com:apache/cordova-android.git'
|
||||
url 'https://github.com/apache/cordova-android'
|
||||
|
||||
}
|
||||
}
|
||||
@@ -122,16 +121,16 @@ bintray {
|
||||
name = 'cordova-android'
|
||||
userOrg = 'cordova'
|
||||
licenses = ['Apache-2.0']
|
||||
vcsUrl = 'https://git-wip-us.apache.org/repos/asf?p=cordova-android.git'
|
||||
vcsUrl = 'https://github.com/apache/cordova-android'
|
||||
websiteUrl = 'https://cordova.apache.org'
|
||||
issueTrackerUrl = 'https://issues.apache.org/jira/browse/CB'
|
||||
issueTrackerUrl = 'https://github.com/apache/cordova-android/issues'
|
||||
publicDownloadNumbers = true
|
||||
licenses = ['Apache-2.0']
|
||||
labels = ['android', 'cordova', 'phonegap']
|
||||
version {
|
||||
name = '7.1.4'
|
||||
name = '8.0.0'
|
||||
released = new Date()
|
||||
vcsTag = '7.1.4'
|
||||
vcsTag = '8.0.0'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
2
node_modules/cordova-android/framework/gradle/wrapper/gradle-wrapper.properties
generated
vendored
2
node_modules/cordova-android/framework/gradle/wrapper/gradle-wrapper.properties
generated
vendored
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip
|
||||
|
13
node_modules/cordova-android/framework/project.properties
generated
vendored
13
node_modules/cordova-android/framework/project.properties
generated
vendored
@@ -1,16 +1,11 @@
|
||||
# This file is automatically generated by Android Tools.
|
||||
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
|
||||
#
|
||||
# This file must be checked in Version Control Systems.
|
||||
#
|
||||
# To customize properties used by the Ant build system use,
|
||||
# "ant.properties", and override values to adapt the script to your
|
||||
# project structure.
|
||||
# This file was originally created by the Android Tools, but is now
|
||||
# used by cordova-android to manage the project configuration.
|
||||
|
||||
# Indicates whether an apk should be generated for each density.
|
||||
split.density=false
|
||||
|
||||
# Project target.
|
||||
target=android-27
|
||||
target=android-28
|
||||
apk-configurations=
|
||||
renderscript.opt.level=O0
|
||||
android.library=true
|
||||
|
2
node_modules/cordova-android/framework/src/org/apache/cordova/CordovaWebView.java
generated
vendored
2
node_modules/cordova-android/framework/src/org/apache/cordova/CordovaWebView.java
generated
vendored
@@ -31,7 +31,7 @@ import android.webkit.WebChromeClient.CustomViewCallback;
|
||||
* are not expected to implement it.
|
||||
*/
|
||||
public interface CordovaWebView {
|
||||
public static final String CORDOVA_VERSION = "7.1.4";
|
||||
public static final String CORDOVA_VERSION = "8.0.0";
|
||||
|
||||
void init(CordovaInterface cordova, List<PluginEntry> pluginEntries, CordovaPreferences preferences);
|
||||
|
||||
|
@@ -216,8 +216,10 @@ public class CordovaWebViewImpl implements CordovaWebView {
|
||||
// TODO: What about params?
|
||||
// Load new URL
|
||||
loadUrlIntoView(url, true);
|
||||
return;
|
||||
} else {
|
||||
LOG.w(TAG, "showWebPage: Refusing to load URL into webview since it is not in the <allow-navigation> whitelist. URL=" + url);
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (!pluginManager.shouldOpenExternalUrl(url)) {
|
||||
|
21
node_modules/cordova-android/framework/src/org/apache/cordova/CoreAndroid.java
generated
vendored
21
node_modules/cordova-android/framework/src/org/apache/cordova/CoreAndroid.java
generated
vendored
@@ -43,6 +43,7 @@ public class CoreAndroid extends CordovaPlugin {
|
||||
private BroadcastReceiver telephonyReceiver;
|
||||
private CallbackContext messageChannel;
|
||||
private PluginResult pendingResume;
|
||||
private PluginResult pendingPause;
|
||||
private final Object messageChannelLock = new Object();
|
||||
|
||||
/**
|
||||
@@ -113,6 +114,10 @@ public class CoreAndroid extends CordovaPlugin {
|
||||
else if (action.equals("messageChannel")) {
|
||||
synchronized(messageChannelLock) {
|
||||
messageChannel = callbackContext;
|
||||
if (pendingPause != null) {
|
||||
sendEventMessage(pendingPause);
|
||||
pendingPause = null;
|
||||
}
|
||||
if (pendingResume != null) {
|
||||
sendEventMessage(pendingResume);
|
||||
pendingResume = null;
|
||||
@@ -139,7 +144,7 @@ public class CoreAndroid extends CordovaPlugin {
|
||||
public void clearCache() {
|
||||
cordova.getActivity().runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
webView.clearCache(true);
|
||||
webView.clearCache();
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -321,7 +326,19 @@ public class CoreAndroid extends CordovaPlugin {
|
||||
} catch (JSONException e) {
|
||||
LOG.e(TAG, "Failed to create event message", e);
|
||||
}
|
||||
sendEventMessage(new PluginResult(PluginResult.Status.OK, obj));
|
||||
PluginResult result = new PluginResult(PluginResult.Status.OK, obj);
|
||||
|
||||
if (messageChannel == null) {
|
||||
LOG.i(TAG, "Request to send event before messageChannel initialised: " + action);
|
||||
if ("pause".equals(action)) {
|
||||
pendingPause = result;
|
||||
} else if ("resume".equals(action)) {
|
||||
// When starting normally onPause then onResume is called
|
||||
pendingPause = null;
|
||||
}
|
||||
} else {
|
||||
sendEventMessage(result);
|
||||
}
|
||||
}
|
||||
|
||||
private void sendEventMessage(PluginResult payload) {
|
||||
|
@@ -58,7 +58,11 @@ class SystemCookieManager implements ICordovaCookieManager {
|
||||
}
|
||||
|
||||
public void clearCookies() {
|
||||
cookieManager.removeAllCookie();
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
cookieManager.removeAllCookies(null);
|
||||
} else {
|
||||
cookieManager.removeAllCookie();
|
||||
}
|
||||
}
|
||||
|
||||
public void flush() {
|
||||
|
@@ -142,6 +142,7 @@ public class SystemWebChromeClient extends WebChromeClient {
|
||||
* Handle database quota exceeded notification.
|
||||
*/
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public void onExceededDatabaseQuota(String url, String databaseIdentifier, long currentQuota, long estimatedSize,
|
||||
long totalUsedQuota, WebStorage.QuotaUpdater quotaUpdater)
|
||||
{
|
||||
@@ -180,11 +181,13 @@ public class SystemWebChromeClient extends WebChromeClient {
|
||||
|
||||
// API level 7 is required for this, see if we could lower this using something else
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public void onShowCustomView(View view, WebChromeClient.CustomViewCallback callback) {
|
||||
parentEngine.getCordovaWebView().showCustomView(view, callback);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public void onHideCustomView() {
|
||||
parentEngine.getCordovaWebView().hideCustomView();
|
||||
}
|
||||
|
@@ -74,7 +74,8 @@ public class SystemWebViewClient extends WebViewClient {
|
||||
* @param url The url to be loaded.
|
||||
* @return true to override, false for default behavior
|
||||
*/
|
||||
@Override
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public boolean shouldOverrideUrlLoading(WebView view, String url) {
|
||||
return parentEngine.client.onNavigationAttempt(url);
|
||||
}
|
||||
@@ -186,6 +187,7 @@ public class SystemWebViewClient extends WebViewClient {
|
||||
* @param failingUrl The url that failed to load.
|
||||
*/
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) {
|
||||
// Ignore error due to stopLoading().
|
||||
if (!isCurrentlyLoading) {
|
||||
@@ -316,6 +318,7 @@ public class SystemWebViewClient extends WebViewClient {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public WebResourceResponse shouldInterceptRequest(WebView view, String url) {
|
||||
try {
|
||||
// Check the against the whitelist and lock out access to the WebView directory
|
||||
|
Reference in New Issue
Block a user