Moved the initialization of the IceCreamWebViewClient to CordovaWebView, we weren't loading the fix in properly after the refactor - CB-1742

This commit is contained in:
Joe Bowser 2012-10-25 12:11:09 -07:00
parent 0eee2293dc
commit 6aafd6dc3a
2 changed files with 4 additions and 6 deletions

View File

@ -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));
}

View File

@ -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(