Idle Tower v2.48版本的 MD5 值为:56f20496f6a85726b376356ed2ecee23
以下内容为反编译后的 s.java 源代码,内容仅作参考
package com.applovin.impl.sdk;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.os.Build;
import androidx.browser.trusted.sharing.ShareTarget;
import com.applovin.impl.sdk.utils.Utils;
import com.applovin.sdk.AppLovinSdk;
import com.google.android.exoplayer2.source.rtsp.SessionDescription;
import com.google.android.gms.measurement.AppMeasurement;
import com.mbridge.msdk.foundation.entity.CampaignEx;
import com.yodo1.mas.debugger.main.Yodo1MasDebuggerItem;
import java.io.UnsupportedEncodingException;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLEncoder;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.concurrent.TimeUnit;
public class s {
private static final int c = (int) TimeUnit.SECONDS.toMillis(30);
protected final o f1622a;
protected final x b;
public enum a {
ANR("anr"),
BLACK_VIEW("black_view"),
CRASH(AppMeasurement.CRASH_ORIGIN),
JAVA_8_EXCEPTION("java_8_exception"),
TASK_EXCEPTION("task_exception");
private final String f;
a(String str) {
this.f = str;
}
public String a() {
return this.f;
}
}
public s(o oVar) {
this.f1622a = oVar;
this.b = oVar.M();
}
public void a(final a aVar, final Map<String, String> map) {
if (x.a()) {
this.b.b("ErrorReporter", "Reporting " + aVar.a() + " error...");
}
if (Utils.isMainThread()) {
new Thread(new Runnable() {
@Override
public void run() {
s.this.b(aVar, map);
}
}).start();
} else {
b(aVar, map);
}
}
public void b(a aVar, Map<String, String> map) {
try {
HttpURLConnection httpURLConnection = (HttpURLConnection) c(aVar, map).openConnection();
httpURLConnection.setConnectTimeout(c);
httpURLConnection.setReadTimeout(c);
httpURLConnection.setDefaultUseCaches(false);
httpURLConnection.setAllowUserInteraction(false);
httpURLConnection.setUseCaches(false);
httpURLConnection.setInstanceFollowRedirects(true);
httpURLConnection.setDoOutput(false);
httpURLConnection.setRequestMethod(ShareTarget.METHOD_POST);
int responseCode = httpURLConnection.getResponseCode();
if (x.a()) {
this.b.b("ErrorReporter", aVar.a() + " reported with code " + responseCode);
}
} catch (Throwable th) {
if (x.a()) {
this.b.a("ErrorReporter", "Failed to report " + aVar.a(), th);
}
}
}
private URL c(a aVar, Map<String, String> map) throws MalformedURLException, UnsupportedEncodingException {
StringBuilder sb = new StringBuilder("https://ms.applovin.com/1.0/sdk/error");
sb.append("?");
Iterator<Map.Entry<String, String>> it = a(aVar.a(), map).entrySet().iterator();
while (it.hasNext()) {
Map.Entry<String, String> next = it.next();
String encode = URLEncoder.encode(next.getKey(), "UTF-8");
String encode2 = URLEncoder.encode(next.getValue(), "UTF-8");
sb.append(encode);
sb.append("=");
sb.append(encode2);
if (it.hasNext()) {
sb.append("&");
}
}
return new URL(sb.toString());
}
private Map<String, String> a(String str, Map<String, String> map) {
HashMap hashMap = new HashMap();
hashMap.put(SessionDescription.ATTR_TYPE, str);
if (this.f1622a.T() != null) {
hashMap.put("platform", this.f1622a.R().v());
} else {
hashMap.put("platform", this.f1622a.S().f());
}
hashMap.put("applovin_random_token", this.f1622a.r());
hashMap.put("compass_random_token", this.f1622a.q());
hashMap.put("model", Build.MODEL);
hashMap.put("brand", Build.MANUFACTURER);
hashMap.put("brand_name", Build.BRAND);
hashMap.put("hardware", Build.HARDWARE);
hashMap.put("revision", Build.DEVICE);
hashMap.put("os", Build.VERSION.RELEASE);
hashMap.put("api_level", String.valueOf(Build.VERSION.SDK_INT));
hashMap.put("sdk_version", String.valueOf(AppLovinSdk.VERSION));
hashMap.put("aei", String.valueOf(this.f1622a.a(com.applovin.impl.sdk.c.b.av)));
hashMap.put("mei", String.valueOf(this.f1622a.a(com.applovin.impl.sdk.c.b.aw)));
a(hashMap);
b(hashMap);
if (map != null) {
hashMap.putAll(map);
}
return hashMap;
}
private void a(Map<String, String> map) {
String str;
PackageInfo packageInfo;
PackageManager packageManager;
try {
packageManager = o.z().getPackageManager();
str = o.z().getPackageName();
} catch (Throwable unused) {
str = "";
}
try {
packageInfo = packageManager.getPackageInfo(str, 0);
} catch (Throwable unused2) {
packageInfo = null;
map.put(CampaignEx.JSON_KEY_PACKAGE_NAME, str);
map.put(Yodo1MasDebuggerItem.KEY_APP_VERSION, packageInfo != null ? packageInfo.versionName : "");
map.put("app_version_code", String.valueOf(packageInfo != null ? packageInfo.versionCode : 0));
}
map.put(CampaignEx.JSON_KEY_PACKAGE_NAME, str);
map.put(Yodo1MasDebuggerItem.KEY_APP_VERSION, packageInfo != null ? packageInfo.versionName : "");
map.put("app_version_code", String.valueOf(packageInfo != null ? packageInfo.versionCode : 0));
}
private void b(Map<String, String> map) {
Object c2 = this.f1622a.aa().c();
if (c2 instanceof com.applovin.impl.sdk.ad.e) {
map.put("fs_ad_network", "AppLovin");
map.put("fs_ad_creative_id", Long.toString(((com.applovin.impl.sdk.ad.e) c2).getAdIdNumber()));
} else if (c2 instanceof com.applovin.impl.mediation.a.a) {
com.applovin.impl.mediation.a.a aVar = (com.applovin.impl.mediation.a.a) c2;
map.put("fs_ad_network", aVar.getNetworkName());
map.put("fs_ad_creative_id", aVar.getCreativeId());
} else {
map.put("fs_ad_network", "None");
map.put("fs_ad_creative_id", "None");
}
}
}