- Added realracing3-community.apk (71.57 MB) - Removed 32-bit support (armeabi-v7a) - Only includes arm64-v8a libraries - Decompiled source code included - Added README-community.md with analysis
254 lines
8.7 KiB
Java
254 lines
8.7 KiB
Java
package com.ironsource;
|
|
|
|
import android.annotation.SuppressLint;
|
|
import android.content.Context;
|
|
import android.content.SharedPreferences;
|
|
import android.net.ConnectivityManager;
|
|
import android.net.NetworkCapabilities;
|
|
import android.text.TextUtils;
|
|
import com.ironsource.environment.ContextProvider;
|
|
import com.ironsource.mediationsdk.logger.IronLog;
|
|
import com.ironsource.v8;
|
|
import csdk.gluads.Consts;
|
|
import java.lang.Thread;
|
|
import java.util.HashSet;
|
|
import java.util.Iterator;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
import org.json.JSONObject;
|
|
|
|
/* loaded from: classes2.dex */
|
|
public class i9 {
|
|
private static final String k = "1.0.6";
|
|
public static String l = "";
|
|
private final ce a;
|
|
private String b;
|
|
private String c;
|
|
private String d;
|
|
private String e;
|
|
private ContextProvider f;
|
|
public Thread.UncaughtExceptionHandler g;
|
|
public String h;
|
|
private String i;
|
|
private boolean j;
|
|
|
|
public class a implements com.ironsource.b {
|
|
public a() {
|
|
}
|
|
|
|
@Override // com.ironsource.b
|
|
public void a() {
|
|
Map<Thread, StackTraceElement[]> allStackTraces = Thread.getAllStackTraces();
|
|
StringBuilder sb = new StringBuilder(128);
|
|
for (Thread thread : allStackTraces.keySet()) {
|
|
StackTraceElement[] stackTrace = thread.getStackTrace();
|
|
if (stackTrace != null && stackTrace.length > 0) {
|
|
sb.append("*** Thread Name ");
|
|
sb.append(thread.getName());
|
|
sb.append(" Thread ID ");
|
|
sb.append(thread.getId());
|
|
sb.append(" ");
|
|
sb.append("(");
|
|
sb.append(thread.getState().toString());
|
|
sb.append(")");
|
|
sb.append(" ***\n");
|
|
for (StackTraceElement stackTraceElement : stackTrace) {
|
|
sb.append(stackTraceElement.toString());
|
|
sb.append(" ");
|
|
sb.append(thread.getState().toString());
|
|
sb.append("\n");
|
|
}
|
|
}
|
|
}
|
|
i9.l = sb.toString();
|
|
}
|
|
|
|
@Override // com.ironsource.b
|
|
public void b() {
|
|
}
|
|
}
|
|
|
|
public class b implements Runnable {
|
|
final /* synthetic */ Context a;
|
|
final /* synthetic */ String b;
|
|
|
|
public b(Context context, String str) {
|
|
this.a = context;
|
|
this.b = str;
|
|
}
|
|
|
|
@Override // java.lang.Runnable
|
|
public void run() {
|
|
try {
|
|
String p = i9.this.a.p(this.a);
|
|
if (!TextUtils.isEmpty(p)) {
|
|
i9.this.c = p;
|
|
}
|
|
String a = i9.this.a.a(this.a);
|
|
if (!TextUtils.isEmpty(a)) {
|
|
i9.this.e = a;
|
|
}
|
|
SharedPreferences.Editor edit = this.a.getSharedPreferences("CRep", 0).edit();
|
|
edit.putString("String1", i9.this.c);
|
|
edit.putString(Consts.KEY_TAPJOY_SESSION_ID, this.b);
|
|
edit.apply();
|
|
} catch (Exception e) {
|
|
IronLog.INTERNAL.error(e.toString());
|
|
}
|
|
}
|
|
}
|
|
|
|
public class c extends j9 {
|
|
public c(JSONObject jSONObject) {
|
|
super(jSONObject);
|
|
}
|
|
}
|
|
|
|
@SuppressLint({"StaticFieldLeak"})
|
|
public static class d {
|
|
static volatile i9 a = new i9(null);
|
|
|
|
private d() {
|
|
}
|
|
}
|
|
|
|
private i9() {
|
|
this.j = false;
|
|
this.a = el.N().f();
|
|
this.f = ContextProvider.getInstance();
|
|
Thread.UncaughtExceptionHandler defaultUncaughtExceptionHandler = Thread.getDefaultUncaughtExceptionHandler();
|
|
this.g = defaultUncaughtExceptionHandler;
|
|
this.i = " ";
|
|
this.h = "https://o-crash.mediation.unity3d.com/reporter";
|
|
Thread.setDefaultUncaughtExceptionHandler(new g9(defaultUncaughtExceptionHandler));
|
|
}
|
|
|
|
public /* synthetic */ i9(a aVar) {
|
|
this();
|
|
}
|
|
|
|
private String a(Context context) {
|
|
ConnectivityManager connectivityManager;
|
|
if (context == null || (connectivityManager = (ConnectivityManager) context.getSystemService("connectivity")) == null) {
|
|
return "none";
|
|
}
|
|
try {
|
|
NetworkCapabilities networkCapabilities = connectivityManager.getNetworkCapabilities(connectivityManager.getActiveNetwork());
|
|
return networkCapabilities == null ? "none" : networkCapabilities.hasTransport(1) ? "wifi" : networkCapabilities.hasTransport(0) ? r8.g : "none";
|
|
} catch (Exception e) {
|
|
IronLog.INTERNAL.error(e.toString());
|
|
return "none";
|
|
}
|
|
}
|
|
|
|
private void a(Context context, HashSet<String> hashSet) {
|
|
String a2 = a(a());
|
|
if (a2.equals("none")) {
|
|
return;
|
|
}
|
|
SharedPreferences sharedPreferences = context.getSharedPreferences("CRep", 0);
|
|
String string = sharedPreferences.getString("String1", this.c);
|
|
String string2 = sharedPreferences.getString(Consts.KEY_TAPJOY_SESSION_ID, this.d);
|
|
List<wb> b2 = s9.b();
|
|
IronLog.INTERNAL.verbose("reportList size " + b2.size());
|
|
for (wb wbVar : b2) {
|
|
JSONObject jSONObject = new JSONObject();
|
|
String b3 = wbVar.b();
|
|
String e = wbVar.e();
|
|
String d2 = wbVar.d();
|
|
String packageName = context.getPackageName();
|
|
JSONObject jSONObject2 = new JSONObject();
|
|
try {
|
|
jSONObject2.put("crashDate", b3);
|
|
jSONObject2.put("stacktraceCrash", e);
|
|
jSONObject2.put("crashType", d2);
|
|
jSONObject2.put("CrashReporterVersion", k);
|
|
jSONObject2.put(v8.i.q, "8.4.0");
|
|
jSONObject2.put("deviceLanguage", this.a.b(context));
|
|
jSONObject2.put(v8.i.W, v3.b(context, packageName));
|
|
jSONObject2.put(v8.i.n, this.a.o());
|
|
jSONObject2.put("network", a2);
|
|
jSONObject2.put(v8.i.p, this.a.k());
|
|
jSONObject2.put("deviceModel", this.a.e());
|
|
jSONObject2.put("deviceOS", this.a.l());
|
|
jSONObject2.put("advertisingId", string);
|
|
jSONObject2.put(v8.i.k, this.a.g());
|
|
jSONObject2.put("systemProperties", System.getProperties());
|
|
jSONObject2.put("bundleId", packageName);
|
|
jSONObject2.put(Consts.KEY_TAPJOY_SESSION_ID, string2);
|
|
if (!TextUtils.isEmpty(this.e)) {
|
|
jSONObject2.put(v8.i.M, Boolean.parseBoolean(this.e));
|
|
}
|
|
if (hashSet == null || hashSet.isEmpty()) {
|
|
jSONObject = jSONObject2;
|
|
} else {
|
|
Iterator<String> it = hashSet.iterator();
|
|
while (it.hasNext()) {
|
|
String next = it.next();
|
|
try {
|
|
if (jSONObject2.has(next)) {
|
|
jSONObject.put(next, jSONObject2.opt(next));
|
|
}
|
|
} catch (Exception e2) {
|
|
IronLog.INTERNAL.error(e2.toString());
|
|
}
|
|
}
|
|
}
|
|
} catch (Exception unused) {
|
|
}
|
|
if (jSONObject.length() != 0) {
|
|
new Thread(new c(jSONObject)).start();
|
|
}
|
|
}
|
|
s9.a();
|
|
}
|
|
|
|
public static List<wb> c() {
|
|
return null;
|
|
}
|
|
|
|
public static i9 d() {
|
|
return d.a;
|
|
}
|
|
|
|
public Context a() {
|
|
return this.f.getApplicationContext();
|
|
}
|
|
|
|
public void a(Throwable th) {
|
|
IronLog.INTERNAL.verbose("isInitialized=" + this.j);
|
|
if (!this.j || th == null) {
|
|
return;
|
|
}
|
|
new wb(new h9(th).b(), "" + System.currentTimeMillis(), "Caught_IS_Crash").a();
|
|
}
|
|
|
|
public void a(HashSet<String> hashSet, String str, String str2, boolean z, String str3, int i, boolean z2) {
|
|
Context applicationContext = this.f.getApplicationContext();
|
|
if (applicationContext != null) {
|
|
if (!TextUtils.isEmpty(str2)) {
|
|
this.i = str2;
|
|
}
|
|
if (!TextUtils.isEmpty(str)) {
|
|
this.h = str;
|
|
}
|
|
this.d = str3;
|
|
if (z) {
|
|
new com.ironsource.a(i).a(z2).b(true).a(new a()).start();
|
|
}
|
|
a(applicationContext, hashSet);
|
|
new Thread(new b(applicationContext, str3)).start();
|
|
}
|
|
this.j = true;
|
|
IronLog.INTERNAL.verbose("initialized");
|
|
}
|
|
|
|
public String b() {
|
|
return k;
|
|
}
|
|
|
|
public String e() {
|
|
return this.i;
|
|
}
|
|
}
|