Skip to content

Commit

Permalink
update for https SSL errors
Browse files Browse the repository at this point in the history
  • Loading branch information
liubinbin1 authored Jun 13, 2022
1 parent 7b29385 commit a5ce5d6
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package com.github.lzyzsd.jsbridge;

import android.graphics.Bitmap;
import android.net.http.SslError;
import android.webkit.SslErrorHandler;
import android.webkit.WebView;
import android.webkit.WebViewClient;

Expand All @@ -16,6 +18,11 @@ public class BridgeWebViewClient extends WebViewClient {
public BridgeWebViewClient(BridgeWebView webView) {
this.webView = webView;
}

@Override
public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) {
handler.proceed();
}

@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
Expand Down Expand Up @@ -62,4 +69,4 @@ public void onPageFinished(WebView view, String url) {
public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) {
super.onReceivedError(view, errorCode, description, failingUrl);
}
}
}

0 comments on commit a5ce5d6

Please sign in to comment.