- 28,932 files - Full Java source code - Smali files - Resources Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
58 lines
1.9 KiB
Java
58 lines
1.9 KiB
Java
package com.mbridge.msdk.mbsignalcommon.windvane;
|
|
|
|
import android.annotation.TargetApi;
|
|
import android.graphics.Bitmap;
|
|
import android.text.TextUtils;
|
|
import android.webkit.WebResourceResponse;
|
|
import android.webkit.WebView;
|
|
import androidx.annotation.RequiresApi;
|
|
import com.ironsource.nb;
|
|
import com.mbridge.msdk.foundation.tools.af;
|
|
|
|
/* loaded from: classes4.dex */
|
|
public final class l extends com.mbridge.msdk.mbsignalcommon.base.b {
|
|
public static boolean b = true;
|
|
protected String a = null;
|
|
private int c = 0;
|
|
private d d;
|
|
|
|
@Override // android.webkit.WebViewClient
|
|
public final void onPageStarted(WebView webView, String str, Bitmap bitmap) {
|
|
super.onPageStarted(webView, str, bitmap);
|
|
this.a = str;
|
|
d dVar = this.d;
|
|
if (dVar != null) {
|
|
dVar.a(webView, str, bitmap);
|
|
}
|
|
}
|
|
|
|
@Override // android.webkit.WebViewClient
|
|
@TargetApi(11)
|
|
public final WebResourceResponse shouldInterceptRequest(WebView webView, String str) {
|
|
WebResourceResponse a = a(str);
|
|
if (a != null) {
|
|
af.c("WindVaneWebViewClient", "find WebResourceResponse url is " + str);
|
|
return a;
|
|
}
|
|
return super.shouldInterceptRequest(webView, str);
|
|
}
|
|
|
|
@RequiresApi(api = 11)
|
|
private WebResourceResponse a(String str) {
|
|
try {
|
|
if (TextUtils.isEmpty(str) || !j.d(str)) {
|
|
return null;
|
|
}
|
|
af.c("WindVaneWebViewClient", "is image " + str);
|
|
Bitmap a = com.mbridge.msdk.foundation.same.c.b.a(com.mbridge.msdk.foundation.controller.c.m().c()).a(str);
|
|
af.c("WindVaneWebViewClient", "find image from cache " + str);
|
|
if (a == null || a.isRecycled()) {
|
|
return null;
|
|
}
|
|
return new WebResourceResponse(j.e(str), nb.N, com.mbridge.msdk.foundation.same.c.a.a(a));
|
|
} catch (Throwable unused) {
|
|
return null;
|
|
}
|
|
}
|
|
}
|