Weather Tracker v1.0.0版本的 MD5 值为:3edef27647e42a8ea0e7c0d2dbf56f97
以下内容为反编译后的 e.java 源代码,内容仅作参考
package com.ironsource.environment;
import android.content.Context;
import android.content.SharedPreferences;
import android.net.ConnectivityManager;
import android.net.NetworkCapabilities;
import android.net.NetworkInfo;
import android.os.Build;
import android.text.TextUtils;
import android.util.Log;
import androidx.browser.trusted.sharing.ShareTarget;
import com.safe.guard.sdk.BuildConfig;
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.Map;
import org.json.JSONObject;
public final class e {
public static String c = "";
Context AhRu0ksV;
private String Bcny5qC1;
String EAU;
private String O2WW392N;
private Thread.UncaughtExceptionHandler VJ;
private String g8;
private JSONObject gt65QHUX;
private String jB;
public static class Bcny5qC1 {
static volatile e gt65QHUX = new e((byte) 0);
}
final class g8 implements Runnable {
g8() {
}
@Override
public final void run() {
try {
HttpURLConnection httpURLConnection = (HttpURLConnection) new URL(e.a().O2WW392N).openConnection();
httpURLConnection.setRequestMethod(ShareTarget.METHOD_POST);
httpURLConnection.setRequestProperty("Content-Type", "application/json;charset=UTF-8");
httpURLConnection.setRequestProperty("Accept", "application/json");
httpURLConnection.setDoOutput(true);
httpURLConnection.setDoInput(true);
Log.i("JSON", e.this.gt65QHUX.toString());
DataOutputStream dataOutputStream = new DataOutputStream(httpURLConnection.getOutputStream());
dataOutputStream.writeBytes(e.this.gt65QHUX.toString());
dataOutputStream.flush();
dataOutputStream.close();
Log.i("STATUS", String.valueOf(httpURLConnection.getResponseCode()));
Log.i("MSG", httpURLConnection.getResponseMessage());
httpURLConnection.disconnect();
} catch (Exception e) {
e.printStackTrace();
}
}
}
final class gt65QHUX implements com.ironsource.environment.gt65QHUX {
gt65QHUX() {
}
@Override
public final 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");
}
}
}
e.c = sb.toString();
}
@Override
public final void b() {
}
}
final class jB implements Runnable {
private String O2WW392N;
private Context VJ;
jB(Context context, String str) {
this.VJ = context;
this.O2WW392N = str;
}
@Override
public final void run() {
try {
String C = h.C(this.VJ);
if (!TextUtils.isEmpty(C)) {
e.this.jB = C;
}
String D = h.D(this.VJ);
if (!TextUtils.isEmpty(D)) {
e.this.Bcny5qC1 = D;
}
SharedPreferences.Editor edit = this.VJ.getSharedPreferences("CRep", 0).edit();
edit.putString("String1", e.this.jB);
edit.putString("sId", this.O2WW392N);
edit.apply();
} catch (Exception e) {
e.printStackTrace();
}
}
}
private e() {
this.gt65QHUX = new JSONObject();
Thread.UncaughtExceptionHandler defaultUncaughtExceptionHandler = Thread.getDefaultUncaughtExceptionHandler();
this.VJ = defaultUncaughtExceptionHandler;
this.EAU = " ";
this.O2WW392N = "https://outcome-crash-report.supersonicads.com/reporter";
Thread.setDefaultUncaughtExceptionHandler(new d(defaultUncaughtExceptionHandler));
}
e(byte b2) {
this();
}
public static e a() {
return Bcny5qC1.gt65QHUX;
}
private static String gt65QHUX(Context context) {
ConnectivityManager connectivityManager;
if (context == null || (connectivityManager = (ConnectivityManager) context.getSystemService("connectivity")) == null) {
return "none";
}
try {
if (Build.VERSION.SDK_INT >= 23) {
NetworkCapabilities networkCapabilities = connectivityManager.getNetworkCapabilities(connectivityManager.getActiveNetwork());
if (networkCapabilities == null) {
return "none";
}
if (networkCapabilities.hasTransport(1)) {
return "wifi";
}
if (networkCapabilities.hasTransport(0)) {
return "cellular";
}
} else {
NetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo();
if (activeNetworkInfo != null && activeNetworkInfo.isConnected()) {
if (activeNetworkInfo.getTypeName().equalsIgnoreCase("WIFI")) {
return "wifi";
}
if (activeNetworkInfo.getTypeName().equalsIgnoreCase("MOBILE")) {
return "cellular";
}
}
}
return "none";
} catch (Exception e) {
e.printStackTrace();
return "none";
}
}
public final void a(Context context, HashSet<String> hashSet, String str, String str2, boolean z, String str3, int i, boolean z2) {
if (context != null) {
Log.d("automation_log", "init ISCrashReporter");
this.AhRu0ksV = context;
if (!TextUtils.isEmpty(str2)) {
this.EAU = str2;
}
if (!TextUtils.isEmpty(str)) {
this.O2WW392N = str;
}
this.g8 = str3;
if (z) {
a aVar = new a(i);
aVar.Ozp48 = z2;
aVar.l7i = true;
aVar.EAU = new gt65QHUX();
aVar.start();
}
String gt65QHUX2 = gt65QHUX(this.AhRu0ksV);
if (!gt65QHUX2.equals("none")) {
SharedPreferences sharedPreferences = context.getSharedPreferences("CRep", 0);
String string = sharedPreferences.getString("String1", this.jB);
String string2 = sharedPreferences.getString("sId", this.g8);
for (c cVar : f.a()) {
String b2 = cVar.b();
String a = cVar.a();
String c2 = cVar.c();
String packageName = context.getPackageName();
JSONObject jSONObject = new JSONObject();
try {
jSONObject.put("crashDate", b2);
jSONObject.put("stacktraceCrash", a);
jSONObject.put("crashType", c2);
jSONObject.put("CrashReporterVersion", BuildConfig.NETWORK_VERSION);
jSONObject.put("SDKVersion", "7.5.1");
jSONObject.put("deviceLanguage", h.a(context));
jSONObject.put("appVersion", c.c(context, packageName));
jSONObject.put("deviceOSVersion", h.e());
jSONObject.put("network", gt65QHUX2);
jSONObject.put("deviceApiLevel", h.f());
jSONObject.put("deviceModel", h.g());
jSONObject.put("deviceOS", h.i());
jSONObject.put("advertisingId", string);
jSONObject.put("deviceOEM", h.h());
jSONObject.put("systemProperties", System.getProperties());
jSONObject.put("bundleId", packageName);
jSONObject.put("sId", string2);
if (!TextUtils.isEmpty(this.Bcny5qC1)) {
jSONObject.put("isLimitAdTrackingEnabled", Boolean.parseBoolean(this.Bcny5qC1));
}
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 e) {
e.printStackTrace();
}
}
jSONObject = jSONObject2;
}
this.gt65QHUX = jSONObject;
} catch (Exception unused) {
}
if (this.gt65QHUX.length() == 0) {
Log.d("ISCrashReport", " Is Empty");
} else {
new Thread(new g8()).start();
f.c();
}
}
}
new Thread(new jB(context, str3)).start();
}
}
}