360 Wi-Fi v1.0.1版本的 MD5 值为:53dc85b63eb655b13344ce30ddaccae2
以下内容为反编译后的 a.java 源代码,内容仅作参考
package com.mbridge.msdk.advanced.view;
import android.graphics.Bitmap;
import android.net.Uri;
import android.text.TextUtils;
import android.webkit.ValueCallback;
import android.webkit.WebResourceRequest;
import android.webkit.WebResourceResponse;
import android.webkit.WebView;
import com.mbridge.msdk.advanced.b.c;
import com.mbridge.msdk.foundation.tools.ae;
import com.mbridge.msdk.foundation.tools.y;
import com.mbridge.msdk.mbsignalcommon.base.b;
import com.mbridge.msdk.mbsignalcommon.windvane.WindVaneWebView;
import java.io.FileInputStream;
import java.net.URLDecoder;
import java.util.HashMap;
public final class a extends b {
String a;
com.mbridge.msdk.advanced.b.a b;
private final String c = "NativeAdvancedWebViewClient";
private final String d = y.a("YkRXhr5AWBPfNgzuH7JQ+2Ha");
private final String e = y.a("Y+xgWkl2");
private c f;
public a(String str, com.mbridge.msdk.advanced.b.a aVar, c cVar) {
this.a = str;
this.b = aVar;
this.f = cVar;
}
private WebResourceResponse a(WebView webView, String str) {
Uri parse;
String scheme;
if (!TextUtils.isEmpty(str) && this.f != null) {
try {
String str2 = "";
if (str.startsWith("file") && str.contains(this.d)) {
str2 = str.replace("file://", "");
}
boolean z = false;
if (!TextUtils.isEmpty(str) && (parse = Uri.parse(str)) != null && (scheme = parse.getScheme()) != null && !TextUtils.isEmpty(scheme) && (scheme.equals(this.e) || scheme.equals("mb-h5"))) {
z = true;
}
if (z) {
str2 = this.f.d(URLDecoder.decode(Uri.parse(str).getQueryParameter("uri")));
}
if (!TextUtils.isEmpty(str2)) {
ae.a("NativeAdvancedWebViewClient", "replace url : " + str2);
if (!str2.contains("127.0.0.1") && !str2.startsWith("http")) {
HashMap hashMap = new HashMap();
hashMap.put("Access-Control-Allow-Origin", "*");
WebResourceResponse webResourceResponse = new WebResourceResponse("video/mp4", com.anythink.expressad.foundation.g.a.bR, new FileInputStream(str2));
webResourceResponse.setResponseHeaders(hashMap);
return webResourceResponse;
}
return null;
}
} catch (Throwable th) {
ae.b("NativeAdvancedWebViewClient", th.getMessage());
}
}
return null;
}
@Override
public final void onPageStarted(WebView webView, String str, Bitmap bitmap) {
super.onPageStarted(webView, str, bitmap);
try {
webView.evaluateJavascript("javascript:" + com.mbridge.msdk.c.b.a.a().b(), new ValueCallback<String>() {
@Override
public final void onReceiveValue(String str2) {
}
});
} catch (Throwable th) {
ae.a("NativeAdvancedWebViewClient", "onPageStarted", th);
}
}
@Override
public final WebResourceResponse shouldInterceptRequest(WebView webView, String str) {
return a(webView, str);
}
@Override
public final boolean shouldOverrideUrlLoading(WebView webView, String str) {
try {
try {
WindVaneWebView windVaneWebView = (WindVaneWebView) webView;
if (System.currentTimeMillis() - windVaneWebView.lastTouchTime > com.mbridge.msdk.click.b.a.c) {
if (com.mbridge.msdk.click.b.a.a(((com.mbridge.msdk.advanced.signal.b) windVaneWebView.getObject()).a().get(0), windVaneWebView.getUrl(), com.mbridge.msdk.click.b.a.b)) {
return false;
}
}
} catch (Exception e) {
ae.b("NativeAdvancedWebViewClient", e.getMessage());
}
ae.b("NativeAdvancedWebViewClient", "Use html to open url.");
com.mbridge.msdk.advanced.b.a aVar = this.b;
if (aVar != null) {
aVar.a(false, str);
return true;
}
return true;
} catch (Throwable th) {
ae.a("NativeAdvancedWebViewClient", "shouldOverrideUrlLoading", th);
return false;
}
}
@Override
public final WebResourceResponse shouldInterceptRequest(WebView webView, WebResourceRequest webResourceRequest) {
return a(webView, webResourceRequest.getUrl().toString());
}
public final void a() {
if (this.f != null) {
this.f = null;
}
}
}