Pixel Fusion v1.0.3版本的 MD5 值为:e0cc7f5615caec50798ef549b679d557
以下内容为反编译后的 e5.java 源代码,内容仅作参考
package com.json;
import android.content.Context;
import android.content.SharedPreferences;
import android.net.ConnectivityManager;
import android.net.Network;
import android.net.NetworkCapabilities;
import android.net.NetworkInfo;
import android.os.Build;
import android.text.TextUtils;
import com.google.common.net.babbDABcB;
import com.json.environment.ContextProvider;
import java.io.DataOutputStream;
import java.lang.Thread;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import org.json.JSONObject;
public class e5 {
private static final String k = "1.0.5";
public static String l = "";
private final l8 f50853a;
private JSONObject b;
private String c;
private String d;
private String e;
private String f;
private ContextProvider g;
private Thread.UncaughtExceptionHandler h;
private String i;
private String j;
public class b implements Runnable {
final Context f50855a;
final String b;
public b(Context context, String str) {
this.f50855a = context;
this.b = str;
}
@Override
public void run() {
try {
String p = e5.this.f50853a.p(this.f50855a);
if (!TextUtils.isEmpty(p)) {
e5.this.d = p;
}
String a2 = e5.this.f50853a.a(this.f50855a);
if (!TextUtils.isEmpty(a2)) {
e5.this.f = a2;
}
SharedPreferences.Editor edit = this.f50855a.getSharedPreferences("CRep", 0).edit();
edit.putString("String1", e5.this.d);
edit.putString(pi.m, this.b);
edit.apply();
} catch (Exception e) {
e.printStackTrace();
}
}
}
public class c implements Runnable {
public c() {
}
@Override
public void run() {
try {
HttpURLConnection httpURLConnection = (HttpURLConnection) new URL(e5.d().i).openConnection();
httpURLConnection.setRequestMethod("POST");
httpURLConnection.setRequestProperty("Content-Type", "application/json;charset=UTF-8");
httpURLConnection.setRequestProperty(babbDABcB.f47553BcCcABbc, r6.K);
httpURLConnection.setDoOutput(true);
httpURLConnection.setDoInput(true);
e5.this.b.toString();
DataOutputStream dataOutputStream = new DataOutputStream(httpURLConnection.getOutputStream());
dataOutputStream.writeBytes(e5.this.b.toString());
dataOutputStream.flush();
dataOutputStream.close();
String.valueOf(httpURLConnection.getResponseCode());
httpURLConnection.getResponseMessage();
httpURLConnection.disconnect();
} catch (Exception e) {
e.printStackTrace();
}
}
}
public static class d {
static volatile e5 f50857a = new e5(null);
private d() {
}
}
private e5() {
this.f50853a = ke.k().d();
this.b = new JSONObject();
Thread.UncaughtExceptionHandler defaultUncaughtExceptionHandler = Thread.getDefaultUncaughtExceptionHandler();
this.h = defaultUncaughtExceptionHandler;
this.j = " ";
this.i = "https://o-crash.mediation.unity3d.com/reporter";
Thread.setDefaultUncaughtExceptionHandler(new d5(defaultUncaughtExceptionHandler));
}
public static e5 d() {
return d.f50857a;
}
public Context a() {
return this.g.getApplicationContext();
}
public String b() {
return k;
}
public String e() {
return this.j;
}
public e5(a aVar) {
this();
}
public static List<z6> c() {
return null;
}
private String a(Context context) {
ConnectivityManager connectivityManager;
Network activeNetwork;
if (context != null && (connectivityManager = (ConnectivityManager) context.getSystemService("connectivity")) != null) {
try {
if (Build.VERSION.SDK_INT >= 23) {
activeNetwork = connectivityManager.getActiveNetwork();
NetworkCapabilities networkCapabilities = connectivityManager.getNetworkCapabilities(activeNetwork);
if (networkCapabilities == null) {
return "none";
}
if (networkCapabilities.hasTransport(1)) {
return p4.b;
}
if (networkCapabilities.hasTransport(0)) {
return p4.g;
}
} else {
NetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo();
if (activeNetworkInfo != null && activeNetworkInfo.isConnected()) {
if (activeNetworkInfo.getTypeName().equalsIgnoreCase("WIFI")) {
return p4.b;
}
if (activeNetworkInfo.getTypeName().equalsIgnoreCase("MOBILE")) {
return p4.g;
}
}
}
return "none";
} catch (Exception e) {
e.printStackTrace();
return "none";
}
}
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.d);
String string2 = sharedPreferences.getString(pi.m, this.e);
for (z6 z6Var : n5.b()) {
String b2 = z6Var.b();
String e = z6Var.e();
String d2 = z6Var.d();
String packageName = context.getPackageName();
JSONObject jSONObject = new JSONObject();
try {
jSONObject.put("crashDate", b2);
jSONObject.put("stacktraceCrash", e);
jSONObject.put("crashType", d2);
jSONObject.put("CrashReporterVersion", k);
jSONObject.put("SDKVersion", "8.0.0");
jSONObject.put("deviceLanguage", this.f50853a.b(context));
jSONObject.put("appVersion", q1.b(context, packageName));
jSONObject.put("deviceOSVersion", this.f50853a.o());
jSONObject.put("network", a2);
jSONObject.put("deviceApiLevel", this.f50853a.k());
jSONObject.put("deviceModel", this.f50853a.e());
jSONObject.put(pi.p0, this.f50853a.l());
jSONObject.put(pi.h1, string);
jSONObject.put("deviceOEM", this.f50853a.g());
jSONObject.put("systemProperties", System.getProperties());
jSONObject.put("bundleId", packageName);
jSONObject.put(pi.m, string2);
if (!TextUtils.isEmpty(this.f)) {
jSONObject.put("isLimitAdTrackingEnabled", Boolean.parseBoolean(this.f));
}
JSONObject jSONObject2 = new JSONObject();
if (hashSet != null && !hashSet.isEmpty()) {
Iterator<String> it = hashSet.iterator();
while (it.hasNext()) {
String next = it.next();
try {
if (jSONObject.has(next)) {
jSONObject2.put(next, jSONObject.opt(next));
}
} catch (Exception e2) {
e2.printStackTrace();
}
}
jSONObject = jSONObject2;
}
this.b = jSONObject;
} catch (Exception unused) {
}
if (this.b.length() != 0) {
new Thread(new c()).start();
n5.a();
}
}
}
public void a(ContextProvider contextProvider, HashSet<String> hashSet, String str, String str2, boolean z, String str3, int i, boolean z2) {
this.g = contextProvider;
Context applicationContext = contextProvider.getApplicationContext();
if (applicationContext != null) {
if (!TextUtils.isEmpty(str2)) {
this.j = str2;
}
if (!TextUtils.isEmpty(str)) {
this.i = str;
}
this.e = str3;
if (z) {
new com.json.a(i).a(z2).b(true).a(new a()).start();
}
a(applicationContext, hashSet);
new Thread(new b(applicationContext, str3)).start();
}
}
public class a implements com.json.b {
public a() {
}
@Override
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(thread.getState().toString());
sb.append(") ***\n");
for (StackTraceElement stackTraceElement : stackTrace) {
sb.append(stackTraceElement.toString());
sb.append(" ");
sb.append(thread.getState().toString());
sb.append("\n");
}
}
}
e5.l = sb.toString();
}
@Override
public void b() {
}
}
}