mirror of
https://github.com/apache/cordova-android.git
synced 2025-02-07 23:03:11 +08:00
Use correct client object in recent versions of android again
This commit is contained in:
parent
955da2e360
commit
e595c313a1
@ -219,13 +219,13 @@ public class AndroidWebView extends WebView implements CordovaWebView {
|
|||||||
* Create a default WebViewClient object for this webview. This can be overridden by the
|
* Create a default WebViewClient object for this webview. This can be overridden by the
|
||||||
* main application's CordovaActivity subclass.
|
* main application's CordovaActivity subclass.
|
||||||
*
|
*
|
||||||
* By default, it creates an AndroidWebViewClient, but we provide special case handling for
|
* There are two possible client objects that can be returned:
|
||||||
* IceCreamSandwich.
|
* AndroidWebViewClient for android < 3.0
|
||||||
|
* IceCreamCordovaWebViewClient for Android >= 3.0 (Supports shouldInterceptRequest)
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public CordovaWebViewClient makeWebViewClient() {
|
public CordovaWebViewClient makeWebViewClient() {
|
||||||
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)
|
||||||
android.os.Build.VERSION.SDK_INT > android.os.Build.VERSION_CODES.JELLY_BEAN_MR1)
|
|
||||||
{
|
{
|
||||||
return (CordovaWebViewClient) new AndroidWebViewClient(this.cordova, this);
|
return (CordovaWebViewClient) new AndroidWebViewClient(this.cordova, this);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user