导航菜单

页面标题

页面副标题

Jurassic World v1.83.4 - i9.java 源代码

正在查看: Jurassic World v1.83.4 应用的 i9.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package com.json;

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 com.json.environment.ContextProvider;
import com.json.mediationsdk.logger.IronLog;
import com.json.v8;
import java.lang.Thread;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import org.json.JSONObject;

public class i9 {
    private static final String k = "1.0.6";
    public static String l = "";

    private final ce f4773a;
    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;

    class a implements com.json.b {
        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 ").append(thread.getName()).append(" Thread ID ").append(thread.getId()).append(" ").append("(").append(thread.getState().toString()).append(")").append(" ***\n");
                    for (StackTraceElement stackTraceElement : stackTrace) {
                        sb.append(stackTraceElement.toString()).append(" ").append(thread.getState().toString()).append("\n");
                    }
                }
            }
            i9.l = sb.toString();
        }

        @Override
        public void b() {
        }
    }

    class b implements Runnable {

        final Context f4775a;
        final String b;

        b(Context context, String str) {
            this.f4775a = context;
            this.b = str;
        }

        @Override
        public void run() {
            try {
                String p = i9.this.f4773a.p(this.f4775a);
                if (!TextUtils.isEmpty(p)) {
                    i9.this.c = p;
                }
                String a2 = i9.this.f4773a.a(this.f4775a);
                if (!TextUtils.isEmpty(a2)) {
                    i9.this.e = a2;
                }
                SharedPreferences.Editor edit = this.f4775a.getSharedPreferences("CRep", 0).edit();
                edit.putString("String1", i9.this.c);
                edit.putString("sId", this.b);
                edit.apply();
            } catch (Exception e) {
                IronLog.INTERNAL.error(e.toString());
            }
        }
    }

    class c extends j9 {
        c(JSONObject jSONObject) {
            super(jSONObject);
        }
    }

    private static class d {

        static volatile i9 f4776a = new i9(null);

        private d() {
        }
    }

    private i9() {
        this.j = false;
        this.f4773a = 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));
    }

    i9(a aVar) {
        this();
    }

    private String a(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 r8.g;
                }
            } else {
                NetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo();
                if (activeNetworkInfo != null && activeNetworkInfo.isConnected()) {
                    if (activeNetworkInfo.getTypeName().equalsIgnoreCase("WIFI")) {
                        return "wifi";
                    }
                    if (activeNetworkInfo.getTypeName().equalsIgnoreCase("MOBILE")) {
                        return r8.g;
                    }
                }
            }
            return "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("sId", 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(v8.i.x, this.f4773a.b(context));
                jSONObject2.put("appVersion", v3.b(context, packageName));
                jSONObject2.put(v8.i.n, this.f4773a.o());
                jSONObject2.put("network", a2);
                jSONObject2.put(v8.i.p, this.f4773a.k());
                jSONObject2.put(v8.i.l, this.f4773a.e());
                jSONObject2.put("deviceOS", this.f4773a.l());
                jSONObject2.put("advertisingId", string);
                jSONObject2.put(v8.i.k, this.f4773a.g());
                jSONObject2.put("systemProperties", System.getProperties());
                jSONObject2.put("bundleId", packageName);
                jSONObject2.put("sId", 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) {
                Log.d("ISCrashReport", " Is Empty");
            } else {
                new Thread(new c(jSONObject)).start();
            }
        }
        s9.a();
    }

    static List<wb> c() {
        return null;
    }

    public static i9 d() {
        return d.f4776a;
    }

    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 CrashReportWrapper(th).getStackTrace(), "" + 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) {
            Log.d("automation_log", "init ISCrashReporter");
            if (!TextUtils.isEmpty(str2)) {
                this.i = str2;
            }
            if (!TextUtils.isEmpty(str)) {
                this.h = str;
            }
            this.d = 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();
        }
        this.j = true;
        IronLog.INTERNAL.verbose("initialized");
    }

    public String b() {
        return k;
    }

    String e() {
        return this.i;
    }
}