diff --git a/framework/src/org/apache/cordova/AndroidChromeClient.java b/framework/src/org/apache/cordova/AndroidChromeClient.java index edf94b95..1297a6c7 100755 --- a/framework/src/org/apache/cordova/AndroidChromeClient.java +++ b/framework/src/org/apache/cordova/AndroidChromeClient.java @@ -139,7 +139,6 @@ public class AndroidChromeClient extends WebChromeClient implements CordovaChrom return true; } }); - dlg.create(); dlg.show(); return true; } @@ -188,7 +187,6 @@ public class AndroidChromeClient extends WebChromeClient implements CordovaChrom return true; } }); - dlg.create(); dlg.show(); return true; } @@ -284,7 +282,6 @@ public class AndroidChromeClient extends WebChromeClient implements CordovaChrom res.cancel(); } }); - dlg.create(); dlg.show(); } return true; diff --git a/framework/src/org/apache/cordova/AndroidWebView.java b/framework/src/org/apache/cordova/AndroidWebView.java index 90331623..6a0ac30c 100755 --- a/framework/src/org/apache/cordova/AndroidWebView.java +++ b/framework/src/org/apache/cordova/AndroidWebView.java @@ -166,7 +166,6 @@ public class AndroidWebView extends WebView implements CordovaWebView { { Log.d(TAG, "Your activity must implement CordovaInterface to work"); } - this.setWebChromeClient(this.makeWebChromeClient()); this.loadConfiguration(); this.setup(); } @@ -189,7 +188,6 @@ public class AndroidWebView extends WebView implements CordovaWebView { { Log.d(TAG, "Your activity must implement CordovaInterface to work"); } - this.setWebChromeClient(this.makeWebChromeClient()); this.loadConfiguration(); this.setup(); } @@ -213,7 +211,6 @@ public class AndroidWebView extends WebView implements CordovaWebView { { Log.d(TAG, "Your activity must implement CordovaInterface to work"); } - this.setWebChromeClient(this.makeWebChromeClient()); this.loadConfiguration(); this.setup(); } diff --git a/framework/src/org/apache/cordova/CordovaActivity.java b/framework/src/org/apache/cordova/CordovaActivity.java index eccb0948..22788002 100755 --- a/framework/src/org/apache/cordova/CordovaActivity.java +++ b/framework/src/org/apache/cordova/CordovaActivity.java @@ -219,6 +219,7 @@ public class CordovaActivity extends Activity implements CordovaInterface { try { Class webViewClass = Class.forName(r); Constructor [] webViewConstructors = webViewClass.getConstructors(); + if(CordovaWebView.class.isAssignableFrom(webViewClass)) { for (Constructor constructor : webViewConstructors) { try { @@ -269,7 +270,7 @@ public class CordovaActivity extends Activity implements CordovaInterface { * @param webView the default constructed web view object */ protected CordovaChromeClient makeChromeClient(CordovaWebView webView) { - return webView.makeWebChromeClient(); + return webView.makeWebChromeClient(); } /** diff --git a/framework/src/org/apache/cordova/CordovaChromeClient.java b/framework/src/org/apache/cordova/CordovaChromeClient.java index c8f38c17..847a4665 100644 --- a/framework/src/org/apache/cordova/CordovaChromeClient.java +++ b/framework/src/org/apache/cordova/CordovaChromeClient.java @@ -1,3 +1,21 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you 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 org.apache.cordova; import android.net.Uri;