pull/137/head
FongMi 2 years ago
parent 20f6ba962e
commit d608a66955
  1. 1
      app/build.gradle
  2. 15
      app/src/main/java/com/fongmi/android/tv/ui/custom/CustomWebView.java

@ -117,7 +117,6 @@ dependencies {
implementation 'com.google.android.material:material:1.9.0' implementation 'com.google.android.material:material:1.9.0'
implementation 'com.google.zxing:core:3.3.0' implementation 'com.google.zxing:core:3.3.0'
implementation 'com.guolindev.permissionx:permissionx:1.7.1' implementation 'com.guolindev.permissionx:permissionx:1.7.1'
implementation 'com.tencent.tbs:tbssdk:44286'
implementation 'org.greenrobot:eventbus:3.3.1' implementation 'org.greenrobot:eventbus:3.3.1'
implementation 'org.nanohttpd:nanohttpd:2.3.1' implementation 'org.nanohttpd:nanohttpd:2.3.1'
implementation('org.simpleframework:simple-xml:2.7.1') { exclude group: 'stax', module: 'stax-api' exclude group: 'xpp3', module: 'xpp3' } implementation('org.simpleframework:simple-xml:2.7.1') { exclude group: 'stax', module: 'stax-api' exclude group: 'xpp3', module: 'xpp3' }

@ -2,8 +2,15 @@ package com.fongmi.android.tv.ui.custom;
import android.annotation.SuppressLint; import android.annotation.SuppressLint;
import android.content.Context; import android.content.Context;
import android.net.http.SslError;
import android.text.TextUtils; import android.text.TextUtils;
import android.webkit.CookieManager;
import android.webkit.SslErrorHandler;
import android.webkit.WebResourceRequest;
import android.webkit.WebResourceResponse;
import android.webkit.WebSettings; import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
@ -14,13 +21,6 @@ import com.fongmi.android.tv.bean.Site;
import com.fongmi.android.tv.impl.ParseCallback; import com.fongmi.android.tv.impl.ParseCallback;
import com.fongmi.android.tv.utils.Sniffer; import com.fongmi.android.tv.utils.Sniffer;
import com.github.catvod.crawler.Spider; import com.github.catvod.crawler.Spider;
import com.tencent.smtt.export.external.interfaces.SslError;
import com.tencent.smtt.export.external.interfaces.SslErrorHandler;
import com.tencent.smtt.export.external.interfaces.WebResourceRequest;
import com.tencent.smtt.export.external.interfaces.WebResourceResponse;
import com.tencent.smtt.sdk.CookieManager;
import com.tencent.smtt.sdk.WebView;
import com.tencent.smtt.sdk.WebViewClient;
import java.io.ByteArrayInputStream; import java.io.ByteArrayInputStream;
import java.util.Map; import java.util.Map;
@ -89,6 +89,7 @@ public class CustomWebView extends WebView {
} }
@Override @Override
@SuppressLint("WebViewClientOnReceivedSslError")
public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) { public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) {
handler.proceed(); handler.proceed();
} }

Loading…
Cancel
Save