mirror of
https://github.com/apache/cordova-android.git
synced 2025-02-01 02:12:58 +08:00
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:
parent
0eee2293dc
commit
6aafd6dc3a
@ -122,6 +122,7 @@ public class CordovaWebView extends WebView {
|
|||||||
{
|
{
|
||||||
Log.d(TAG, "Your activity must implement CordovaInterface to work");
|
Log.d(TAG, "Your activity must implement CordovaInterface to work");
|
||||||
}
|
}
|
||||||
|
this.initWebViewClient(this.cordova);
|
||||||
this.loadConfiguration();
|
this.loadConfiguration();
|
||||||
this.setup();
|
this.setup();
|
||||||
}
|
}
|
||||||
@ -167,7 +168,6 @@ public class CordovaWebView extends WebView {
|
|||||||
Log.d(TAG, "Your activity must implement CordovaInterface to work");
|
Log.d(TAG, "Your activity must implement CordovaInterface to work");
|
||||||
}
|
}
|
||||||
this.setWebChromeClient(new CordovaChromeClient(this.cordova, this));
|
this.setWebChromeClient(new CordovaChromeClient(this.cordova, this));
|
||||||
this.initWebViewClient(this.cordova);
|
|
||||||
this.loadConfiguration();
|
this.loadConfiguration();
|
||||||
this.setup();
|
this.setup();
|
||||||
}
|
}
|
||||||
@ -199,7 +199,7 @@ public class CordovaWebView extends WebView {
|
|||||||
|
|
||||||
|
|
||||||
private void initWebViewClient(CordovaInterface cordova) {
|
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));
|
this.setWebViewClient(new CordovaWebViewClient(this.cordova, this));
|
||||||
}
|
}
|
||||||
|
@ -301,7 +301,7 @@ public class DroidGap extends Activity implements CordovaInterface {
|
|||||||
*/
|
*/
|
||||||
public void init() {
|
public void init() {
|
||||||
CordovaWebView webView = new CordovaWebView(DroidGap.this);
|
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 webViewClient
|
||||||
* @param webChromeClient
|
* @param webChromeClient
|
||||||
*/
|
*/
|
||||||
public void init(CordovaWebView webView, CordovaWebViewClient webViewClient, CordovaChromeClient webChromeClient) {
|
public void init(CordovaWebView webView, CordovaChromeClient webChromeClient) {
|
||||||
LOG.d(TAG, "DroidGap.init()");
|
LOG.d(TAG, "DroidGap.init()");
|
||||||
|
|
||||||
// Set up web container
|
// Set up web container
|
||||||
this.appView = webView;
|
this.appView = webView;
|
||||||
this.appView.setId(100);
|
this.appView.setId(100);
|
||||||
|
|
||||||
this.appView.setWebViewClient(webViewClient);
|
|
||||||
this.appView.setWebChromeClient(webChromeClient);
|
this.appView.setWebChromeClient(webChromeClient);
|
||||||
webViewClient.setWebView(this.appView);
|
|
||||||
webChromeClient.setWebView(this.appView);
|
webChromeClient.setWebView(this.appView);
|
||||||
|
|
||||||
this.appView.setLayoutParams(new LinearLayout.LayoutParams(
|
this.appView.setLayoutParams(new LinearLayout.LayoutParams(
|
||||||
|
Loading…
Reference in New Issue
Block a user