光速虚拟机 v3.8.2版本的 MD5 值为:e0eecbee2ded4bfb58a5ca72845ca90b
以下内容为反编译后的 ae.java 源代码,内容仅作参考
package com.applovin.impl.sdk;
import android.webkit.RenderProcessGoneDetail;
import android.webkit.WebResourceRequest;
import android.webkit.WebResourceResponse;
import android.webkit.WebView;
import com.applovin.impl.sdk.utils.StringUtils;
import com.applovin.sdk.AppLovinPostbackListener;
import com.applovin.sdk.AppLovinSdkUtils;
import com.safedk.android.analytics.brandsafety.creatives.CreativeInfoManager;
import com.safedk.android.internal.SafeDKWebAppInterface;
import com.safedk.android.internal.partials.AppLovinNetworkBridge;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
public class ae extends ab {
private final o a;
private final y b;
private WebView c;
private final Set<WebView> d = Collections.synchronizedSet(new HashSet());
public ae(o oVar) {
this.a = oVar;
this.b = oVar.F();
}
public void a(final WebView webView) {
if (webView == null || !this.d.remove(webView)) {
return;
}
AppLovinSdkUtils.runOnUiThread(new Runnable() {
@Override
public void run() {
webView.destroy();
}
});
}
public WebView b(String str) {
com.applovin.impl.sdk.utils.w.j();
WebView a = com.applovin.impl.sdk.utils.w.a(o.au(), "web tracker");
if (a == null) {
return null;
}
a.getSettings().setJavaScriptEnabled(true);
a.setWebViewClient(this);
AppLovinNetworkBridge.webviewLoadData(a, "<html><head><link rel=\"icon\" href=\"data:,\">" + str + "</head><body></body></html>", "text/html", "UTF-8");
return a;
}
public void a(final com.applovin.impl.sdk.network.l lVar, final AppLovinPostbackListener appLovinPostbackListener) {
AppLovinSdkUtils.runOnUiThread(new Runnable() {
@Override
public void run() {
String appendQueryParameters = StringUtils.appendQueryParameters(lVar.a(), lVar.c(), ((Boolean) ae.this.a.a(com.applovin.impl.sdk.c.b.dM)).booleanValue());
if (ae.this.c == null) {
ae aeVar = ae.this;
aeVar.c = aeVar.b("<script>window.al_firePostback = function(url) {\n setTimeout(function() {\n var img = new Image();\n img.src = url;\n }, 100);\n}\n</script>");
if (ae.this.c == null) {
y unused = ae.this.b;
if (y.a()) {
ae.this.b.e("WebTrackerManager", "Failed to fire postback since web view could not be created");
}
appLovinPostbackListener.onPostbackFailure(appendQueryParameters, -1);
return;
}
}
String str = "al_firePostback('" + appendQueryParameters + "')";
if (com.applovin.impl.sdk.utils.h.c()) {
ae.this.c.evaluateJavascript(str, null);
} else {
AppLovinNetworkBridge.webviewLoadUrl(ae.this.c, SafeDKWebAppInterface.f + str);
}
appLovinPostbackListener.onPostbackSuccess(appendQueryParameters);
}
});
}
public void a(final String str) {
if (!AppLovinSdkUtils.isValidString(str)) {
if (y.a()) {
this.b.e("WebTrackerManager", "Failed to fire tracker due to empty script string");
}
} else if (str.startsWith("<script")) {
AppLovinSdkUtils.runOnUiThread(new Runnable() {
@Override
public void run() {
final WebView b = ae.this.b(str);
if (b != null) {
ae.this.d.add(b);
AppLovinSdkUtils.runOnUiThreadDelayed(new Runnable() {
@Override
public void run() {
ae.this.a(b);
}
}, ((Integer) ae.this.a.a(com.applovin.impl.sdk.c.b.dp)).intValue());
return;
}
y unused = ae.this.b;
if (y.a()) {
ae.this.b.e("WebTrackerManager", "Failed to fire tracker since web view could not be created");
}
}
});
} else if (y.a()) {
this.b.e("WebTrackerManager", "Failed to fire tracker due to improperly formatted script tag");
}
}
@Override
public void onLoadResource(WebView webView, String str) {
super.onLoadResource(webView, str);
CreativeInfoManager.onResourceLoaded(com.safedk.android.utils.h.a, webView, str);
}
@Override
public void onPageFinished(WebView webView, String str) {
super.onPageFinished(webView, str);
CreativeInfoManager.onWebViewPageFinished(com.safedk.android.utils.h.a, webView, str);
}
@Override
public boolean onRenderProcessGone(WebView webView, RenderProcessGoneDetail renderProcessGoneDetail) {
if (webView == this.c) {
AppLovinSdkUtils.runOnUiThread(new Runnable() {
@Override
public void run() {
ae.this.c.destroy();
ae.this.c = null;
}
});
} else {
a(webView);
}
return super.onRenderProcessGone(webView, renderProcessGoneDetail);
}
@Override
public WebResourceResponse shouldInterceptRequest(WebView webView, WebResourceRequest webResourceRequest) {
return CreativeInfoManager.onWebViewResponseWithHeaders(com.safedk.android.utils.h.a, webView, webResourceRequest, super.shouldInterceptRequest(webView, webResourceRequest));
}
@Override
public WebResourceResponse shouldInterceptRequest(WebView webView, String str) {
return CreativeInfoManager.onWebViewResponse(com.safedk.android.utils.h.a, webView, str, super.shouldInterceptRequest(webView, str));
}
}