From 6aafd6dc3aec1ed1fe1d7a3e08d73deedddbc3a3 Mon Sep 17 00:00:00 2001 From: Joe Bowser Date: Thu, 25 Oct 2012 12:11:09 -0700 Subject: [PATCH] Moved the initialization of the IceCreamWebViewClient to CordovaWebView, we weren't loading the fix in properly after the refactor - CB-1742 --- framework/src/org/apache/cordova/CordovaWebView.java | 4 ++-- framework/src/org/apache/cordova/DroidGap.java | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/framework/src/org/apache/cordova/CordovaWebView.java b/framework/src/org/apache/cordova/CordovaWebView.java index 3f64d536..90968ae6 100755 --- a/framework/src/org/apache/cordova/CordovaWebView.java +++ b/framework/src/org/apache/cordova/CordovaWebView.java @@ -122,6 +122,7 @@ public class CordovaWebView extends WebView { { Log.d(TAG, "Your activity must implement CordovaInterface to work"); } + this.initWebViewClient(this.cordova); this.loadConfiguration(); this.setup(); } @@ -167,7 +168,6 @@ public class CordovaWebView extends WebView { Log.d(TAG, "Your activity must implement CordovaInterface to work"); } this.setWebChromeClient(new CordovaChromeClient(this.cordova, this)); - this.initWebViewClient(this.cordova); this.loadConfiguration(); this.setup(); } @@ -199,7 +199,7 @@ public class CordovaWebView extends WebView { private void initWebViewClient(CordovaInterface cordova) { - if(android.os.Build.VERSION.SDK_INT > android.os.Build.VERSION_CODES.HONEYCOMB) + if(android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.HONEYCOMB) { this.setWebViewClient(new CordovaWebViewClient(this.cordova, this)); } diff --git a/framework/src/org/apache/cordova/DroidGap.java b/framework/src/org/apache/cordova/DroidGap.java index 1176f693..3e207c6f 100755 --- a/framework/src/org/apache/cordova/DroidGap.java +++ b/framework/src/org/apache/cordova/DroidGap.java @@ -301,7 +301,7 @@ public class DroidGap extends Activity implements CordovaInterface { */ public void init() { CordovaWebView webView = new CordovaWebView(DroidGap.this); - this.init(webView, new CordovaWebViewClient(this, webView), new CordovaChromeClient(this, webView)); + this.init(webView, new CordovaChromeClient(this, webView)); } /** @@ -311,16 +311,14 @@ public class DroidGap extends Activity implements CordovaInterface { * @param webViewClient * @param webChromeClient */ - public void init(CordovaWebView webView, CordovaWebViewClient webViewClient, CordovaChromeClient webChromeClient) { + public void init(CordovaWebView webView, CordovaChromeClient webChromeClient) { LOG.d(TAG, "DroidGap.init()"); // Set up web container this.appView = webView; this.appView.setId(100); - this.appView.setWebViewClient(webViewClient); this.appView.setWebChromeClient(webChromeClient); - webViewClient.setWebView(this.appView); webChromeClient.setWebView(this.appView); this.appView.setLayoutParams(new LinearLayout.LayoutParams(