Currency Plus v2.10.8版本的 MD5 值为:8586f74edd9ace5aa261a19c9da51484
以下内容为反编译后的 ae.java 源代码,内容仅作参考
package com.applovin.impl.sdk;
import android.webkit.RenderProcessGoneDetail;
import android.webkit.WebView;
import com.applovin.impl.sdk.utils.StringUtils;
import com.applovin.sdk.AppLovinPostbackListener;
import com.applovin.sdk.AppLovinSdkUtils;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
public class ae extends ab {
private WebView aFW;
private final Set<WebView> aFX = Collections.synchronizedSet(new HashSet());
private final x logger;
private final n sdk;
public ae(n nVar) {
this.sdk = nVar;
this.logger = nVar.BN();
}
public void Fx() {
this.aFW.destroy();
this.aFW = null;
}
public void b(com.applovin.impl.sdk.network.i iVar, AppLovinPostbackListener appLovinPostbackListener) {
String appendQueryParameters = StringUtils.appendQueryParameters(iVar.zL(), iVar.HR(), ((Boolean) this.sdk.a(com.applovin.impl.sdk.c.b.aOb)).booleanValue());
if (this.aFW == null) {
WebView cN = cN("<script>window.al_firePostback = function(url) {\n setTimeout(function() {\n var img = new Image();\n img.src = url;\n }, 100);\n}\n</script>");
this.aFW = cN;
if (cN == null) {
if (x.Fn()) {
this.logger.i("WebTrackerManager", "Failed to fire postback since web view could not be created");
}
appLovinPostbackListener.onPostbackFailure(appendQueryParameters, -1);
return;
}
}
String j10 = ag.g.j("al_firePostback('", appendQueryParameters, "')");
if (com.applovin.impl.sdk.utils.h.KW()) {
this.aFW.evaluateJavascript(j10, null);
} else {
WebView webView = this.aFW;
webView.loadUrl("javascript:" + j10);
}
appLovinPostbackListener.onPostbackSuccess(appendQueryParameters);
}
private WebView cN(String str) {
com.applovin.impl.sdk.utils.u.LF();
WebView b10 = com.applovin.impl.sdk.utils.u.b(n.getApplicationContext(), "web tracker");
if (b10 == null) {
return null;
}
b10.getSettings().setJavaScriptEnabled(true);
b10.setWebViewClient(this);
b10.loadData("<html><head><link rel=\"icon\" href=\"data:,\">" + str + "</head><body></body></html>", "text/html", "UTF-8");
return b10;
}
public void cO(String str) {
WebView cN = cN(str);
if (cN != null) {
this.aFX.add(cN);
AppLovinSdkUtils.runOnUiThreadDelayed(new com.applovin.exoplayer2.m.t(19, this, cN), ((Integer) this.sdk.a(com.applovin.impl.sdk.c.b.aNG)).intValue());
} else if (x.Fn()) {
this.logger.i("WebTrackerManager", "Failed to fire tracker since web view could not be created");
}
}
public void g(WebView webView) {
if (webView == null || !this.aFX.remove(webView)) {
return;
}
AppLovinSdkUtils.runOnUiThread(new b0(webView, 2));
}
public void a(com.applovin.impl.sdk.network.i iVar, AppLovinPostbackListener appLovinPostbackListener) {
AppLovinSdkUtils.runOnUiThread(new a0(this, 2, iVar, appLovinPostbackListener));
}
public void cM(String str) {
if (!AppLovinSdkUtils.isValidString(str)) {
if (x.Fn()) {
this.logger.i("WebTrackerManager", "Failed to fire tracker due to empty script string");
}
} else if (str.startsWith("<script")) {
AppLovinSdkUtils.runOnUiThread(new com.applovin.exoplayer2.m.t(18, this, str));
} else if (x.Fn()) {
this.logger.i("WebTrackerManager", "Failed to fire tracker due to improperly formatted script tag");
}
}
@Override
public boolean onRenderProcessGone(WebView webView, RenderProcessGoneDetail renderProcessGoneDetail) {
if (webView == this.aFW) {
AppLovinSdkUtils.runOnUiThread(new b0(this, 1));
} else {
g(webView);
}
return super.onRenderProcessGone(webView, renderProcessGoneDetail);
}
}