81 lines
3.7 KiB
Java
81 lines
3.7 KiB
Java
|
package androidx.webkit;
|
||
|
|
||
|
import android.os.Build;
|
||
|
import android.webkit.SafeBrowsingResponse;
|
||
|
import android.webkit.WebResourceError;
|
||
|
import android.webkit.WebResourceRequest;
|
||
|
import android.webkit.WebResourceResponse;
|
||
|
import android.webkit.WebView;
|
||
|
import android.webkit.WebViewClient;
|
||
|
import java.lang.reflect.InvocationHandler;
|
||
|
import o.C12820fIJ;
|
||
|
import o.C16694qRm;
|
||
|
import o.OrR;
|
||
|
import o.PFg;
|
||
|
import o.qYF;
|
||
|
import org.chromium.support_lib_boundary.WebViewClientBoundaryInterface;
|
||
|
|
||
|
/* loaded from: classes.dex */
|
||
|
public class WebViewClientCompat extends WebViewClient implements WebViewClientBoundaryInterface {
|
||
|
private static final String[] sSupportedFeatures = {"VISUAL_STATE_CALLBACK", "RECEIVE_WEB_RESOURCE_ERROR", "RECEIVE_HTTP_ERROR", "SHOULD_OVERRIDE_WITH_REDIRECTS", "SAFE_BROWSING_HIT"};
|
||
|
|
||
|
@Override // android.webkit.WebViewClient, org.chromium.support_lib_boundary.WebViewClientBoundaryInterface
|
||
|
public void onPageCommitVisible(WebView webView, String str) {
|
||
|
}
|
||
|
|
||
|
@Override // android.webkit.WebViewClient, org.chromium.support_lib_boundary.WebViewClientBoundaryInterface
|
||
|
public void onReceivedHttpError(WebView webView, WebResourceRequest webResourceRequest, WebResourceResponse webResourceResponse) {
|
||
|
}
|
||
|
|
||
|
@Override // org.chromium.support_lib_boundary.WebViewClientBoundaryInterface
|
||
|
public final void onReceivedError(WebView webView, WebResourceRequest webResourceRequest, InvocationHandler invocationHandler) {
|
||
|
onReceivedError(webView, webResourceRequest, new C12820fIJ(invocationHandler));
|
||
|
}
|
||
|
|
||
|
@Override // android.webkit.WebViewClient
|
||
|
public final void onReceivedError(WebView webView, WebResourceRequest webResourceRequest, WebResourceError webResourceError) {
|
||
|
onReceivedError(webView, webResourceRequest, new C12820fIJ(webResourceError));
|
||
|
}
|
||
|
|
||
|
public void onReceivedError(WebView webView, WebResourceRequest webResourceRequest, PFg pFg) {
|
||
|
OrR a = OrR.a("WEB_RESOURCE_ERROR_GET_CODE");
|
||
|
if (Build.VERSION.SDK_INT < a.mOsVersion && !a.e()) {
|
||
|
return;
|
||
|
}
|
||
|
OrR a2 = OrR.a("WEB_RESOURCE_ERROR_GET_DESCRIPTION");
|
||
|
if ((Build.VERSION.SDK_INT < a2.mOsVersion && !a2.e()) || !webResourceRequest.isForMainFrame()) {
|
||
|
return;
|
||
|
}
|
||
|
onReceivedError(webView, pFg.c(), pFg.e().toString(), webResourceRequest.getUrl().toString());
|
||
|
}
|
||
|
|
||
|
@Override // org.chromium.support_lib_boundary.WebViewClientBoundaryInterface
|
||
|
public final void onSafeBrowsingHit(WebView webView, WebResourceRequest webResourceRequest, int i, InvocationHandler invocationHandler) {
|
||
|
onSafeBrowsingHit(webView, webResourceRequest, i, new C16694qRm(invocationHandler));
|
||
|
}
|
||
|
|
||
|
@Override // android.webkit.WebViewClient
|
||
|
public final void onSafeBrowsingHit(WebView webView, WebResourceRequest webResourceRequest, int i, SafeBrowsingResponse safeBrowsingResponse) {
|
||
|
onSafeBrowsingHit(webView, webResourceRequest, i, new C16694qRm(safeBrowsingResponse));
|
||
|
}
|
||
|
|
||
|
public void onSafeBrowsingHit(WebView webView, WebResourceRequest webResourceRequest, int i, qYF qyf) {
|
||
|
OrR a = OrR.a("SAFE_BROWSING_RESPONSE_SHOW_INTERSTITIAL");
|
||
|
if (Build.VERSION.SDK_INT >= a.mOsVersion || a.e()) {
|
||
|
qyf.c(true);
|
||
|
return;
|
||
|
}
|
||
|
throw OrR.c();
|
||
|
}
|
||
|
|
||
|
@Override // android.webkit.WebViewClient, org.chromium.support_lib_boundary.WebViewClientBoundaryInterface
|
||
|
public boolean shouldOverrideUrlLoading(WebView webView, WebResourceRequest webResourceRequest) {
|
||
|
return shouldOverrideUrlLoading(webView, webResourceRequest.getUrl().toString());
|
||
|
}
|
||
|
|
||
|
@Override // org.chromium.support_lib_boundary.FeatureFlagHolderBoundaryInterface
|
||
|
public final String[] getSupportedFeatures() {
|
||
|
return sSupportedFeatures;
|
||
|
}
|
||
|
}
|