导航菜单

页面标题

页面副标题

Empower MX v1.29.4.340 - a.java 源代码

正在查看: Empower MX v1.29.4.340 应用的 a.java JAVA 源代码文件

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


package Q9;

import Gf.s;
import Rf.N;
import Rf.O;
import Rf.i;
import T9.E;
import android.content.Context;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageInfo;
import android.os.Build;
import com.google.android.gms.internal.common.zgyE.ScvWBticsRgdcT;
import com.google.firebase.perf.network.FirebasePerfUrlConnection;
import f0.Bz.vMPrSZAj;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.net.URL;
import java.net.URLConnection;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.util.Map;
import javax.net.ssl.HttpsURLConnection;
import kotlin.Pair;
import kotlin.Unit;
import kotlin.collections.CollectionsKt;
import kotlin.collections.P;
import kotlin.collections.n;
import kotlin.coroutines.CoroutineContext;
import kotlin.coroutines.jvm.internal.m;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import org.json.JSONArray;
import org.json.JSONObject;
import sf.s;
import sf.t;
import sf.x;
import v9.ywYG.NaodVZqMgoc;

public final class a implements Q9.c {
    private static final C0147a I = new C0147a(null);
    private static final String J = StandardCharsets.UTF_8.name();
    private final String F;
    private final String G;
    private final int H;
    private final Context d;
    private final b e;
    private final CoroutineContext i;
    private final E v;
    private final Q9.d w;

    private static final class C0147a {
        public C0147a(DefaultConstructorMarker defaultConstructorMarker) {
            this();
        }

        private C0147a() {
        }
    }

    public interface b {
        Map a();
    }

    public static final class c implements b {
        public static final c d = new c();
        private static final Map e = P.i();

        private c() {
        }

        @Override
        public Map a() {
            return e;
        }
    }

    static final class d extends s implements Function1 {
        public static final d d = new d();

        d() {
            super(1);
        }

        public final CharSequence invoke(Pair pair) {
            Intrinsics.checkNotNullParameter(pair, "<name for destructuring parameter 0>");
            return ((String) pair.a()) + "=" + ((String) pair.b());
        }
    }

    static final class e extends m implements Function2 {
        int d;
        private Object e;
        final Throwable v;

        e(Throwable th, vf.b bVar) {
            super(2, bVar);
            this.v = th;
        }

        public final vf.b create(Object obj, vf.b bVar) {
            e eVar = a.this.new e(this.v, bVar);
            eVar.e = obj;
            return eVar;
        }

        public final Object invoke(N n, vf.b bVar) {
            return create(n, bVar).invokeSuspend(Unit.a);
        }

        public final Object invokeSuspend(Object obj) {
            Object b;
            wf.b.f();
            if (this.d != 0) {
                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
            }
            t.b(obj);
            a aVar = a.this;
            Throwable th = this.v;
            try {
                s.a aVar2 = sf.s.e;
                aVar.k(aVar.d(th));
                b = sf.s.b(Unit.a);
            } catch (Throwable th2) {
                s.a aVar3 = sf.s.e;
                b = sf.s.b(t.a(th2));
            }
            a aVar4 = a.this;
            Throwable e = sf.s.e(b);
            if (e != null) {
                aVar4.i(e);
            }
            return Unit.a;
        }
    }

    public a(Context context, b bVar, CoroutineContext coroutineContext, E e2, Q9.d dVar, String str, String str2, int i) {
        Intrinsics.checkNotNullParameter(context, "context");
        Intrinsics.checkNotNullParameter(bVar, "config");
        Intrinsics.checkNotNullParameter(coroutineContext, "workContext");
        Intrinsics.checkNotNullParameter(e2, "logger");
        Intrinsics.checkNotNullParameter(dVar, "sentryConfig");
        Intrinsics.checkNotNullParameter(str, "environment");
        Intrinsics.checkNotNullParameter(str2, "localeCountry");
        this.d = context;
        this.e = bVar;
        this.i = coroutineContext;
        this.v = e2;
        this.w = dVar;
        this.F = str;
        this.G = str2;
        this.H = i;
    }

    private final void h(HttpsURLConnection httpsURLConnection, int i) {
    }

    public final void i(Throwable th) {
        this.v.a("Failed to send error report.", th);
    }

    private final HttpsURLConnection j() {
        URLConnection uRLConnection = (URLConnection) FirebasePerfUrlConnection.instrument(new URL("https://errors.stripe.com/api/" + this.w.b() + "/store/").openConnection());
        Intrinsics.g(uRLConnection, "null cannot be cast to non-null type javax.net.ssl.HttpsURLConnection");
        return (HttpsURLConnection) uRLConnection;
    }

    public final void k(JSONObject jSONObject) {
        HttpsURLConnection c2 = c();
        OutputStream outputStream = c2.getOutputStream();
        try {
            Intrinsics.f(outputStream);
            Charset charset = StandardCharsets.UTF_8;
            Intrinsics.checkNotNullExpressionValue(charset, "UTF_8");
            OutputStreamWriter outputStreamWriter = new OutputStreamWriter(outputStream, charset);
            try {
                outputStreamWriter.write(jSONObject.toString());
                outputStreamWriter.flush();
                Unit unit = Unit.a;
                Bf.b.a(outputStreamWriter, (Throwable) null);
                Bf.b.a(outputStream, (Throwable) null);
                c2.connect();
                h(c2, c2.getResponseCode());
                c2.disconnect();
            } finally {
            }
        } finally {
        }
    }

    @Override
    public void I(Throwable th) {
        Intrinsics.checkNotNullParameter(th, "t");
        i.d(O.a(this.i), (CoroutineContext) null, (Rf.P) null, new e(th, null), 3, (Object) null);
    }

    public final JSONObject e() {
        Object b2;
        ApplicationInfo applicationInfo;
        try {
            s.a aVar = sf.s.e;
            b2 = sf.s.b(this.d.getPackageManager().getPackageInfo(this.d.getPackageName(), 0));
        } catch (Throwable th) {
            s.a aVar2 = sf.s.e;
            b2 = sf.s.b(t.a(th));
        }
        if (sf.s.g(b2)) {
            b2 = null;
        }
        PackageInfo packageInfo = (PackageInfo) b2;
        CharSequence loadLabel = (packageInfo == null || (applicationInfo = packageInfo.applicationInfo) == null) ? null : applicationInfo.loadLabel(this.d.getPackageManager());
        JSONObject jSONObject = new JSONObject();
        JSONObject put = new JSONObject().put("app_identifier", this.d.getPackageName()).put("app_name", loadLabel);
        String str = packageInfo != null ? packageInfo.versionName : null;
        if (str == null) {
            str = "";
        }
        JSONObject put2 = jSONObject.put("app", put.put("app_version", str));
        JSONObject put3 = new JSONObject().put("name", "Android").put("version", Build.VERSION.RELEASE);
        String str2 = Build.TYPE;
        JSONObject put4 = put2.put("os", put3.put("type", str2).put("build", Build.DISPLAY));
        JSONObject put5 = new JSONObject().put("model_id", Build.ID).put("model", Build.MODEL).put("manufacturer", Build.MANUFACTURER).put("type", str2);
        JSONArray jSONArray = new JSONArray();
        String[] strArr = Build.SUPPORTED_ABIS;
        Intrinsics.checkNotNullExpressionValue(strArr, "SUPPORTED_ABIS");
        for (String str3 : strArr) {
            jSONArray.put(str3);
        }
        Unit unit = Unit.a;
        JSONObject put6 = put4.put("device", put5.put("archs", jSONArray));
        Intrinsics.checkNotNullExpressionValue(put6, "put(...)");
        return put6;
    }

    public final JSONObject f(Throwable th) {
        Intrinsics.checkNotNullParameter(th, "t");
        JSONObject jSONObject = new JSONObject();
        JSONArray jSONArray = new JSONArray();
        StackTraceElement[] stackTrace = th.getStackTrace();
        Intrinsics.checkNotNullExpressionValue(stackTrace, "getStackTrace(...)");
        for (StackTraceElement stackTraceElement : n.v0(stackTrace)) {
            jSONArray.put(new JSONObject().put("lineno", stackTraceElement.getLineNumber()).put("filename", stackTraceElement.getClassName()).put("function", stackTraceElement.getMethodName()));
        }
        Unit unit = Unit.a;
        JSONObject put = jSONObject.put("frames", jSONArray);
        Intrinsics.checkNotNullExpressionValue(put, "put(...)");
        return put;
    }

    public final String g() {
        return CollectionsKt.q0(CollectionsKt.p(new String[]{"Sentry", CollectionsKt.q0(CollectionsKt.p(new Pair[]{x.a("sentry_key", this.w.getKey()), x.a("sentry_version", this.w.d()), x.a("sentry_timestamp", this.w.a()), x.a("sentry_client", "Android3ds2Sdk 6.1.8"), x.a("sentry_secret", this.w.c())}), ", ", (CharSequence) null, (CharSequence) null, 0, (CharSequence) null, d.d, 30, (Object) null)}), " ", (CharSequence) null, (CharSequence) null, 0, (CharSequence) null, (Function1) null, 62, (Object) null);
    }

    public final JSONObject d(Throwable th) {
        Intrinsics.checkNotNullParameter(th, vMPrSZAj.OwEms);
        JSONObject put = new JSONObject().put("release", "[email protected]+25");
        JSONObject jSONObject = new JSONObject();
        JSONArray jSONArray = new JSONArray();
        JSONObject put2 = new JSONObject().put("type", th.getClass().getCanonicalName());
        String message = th.getMessage();
        if (message == null) {
            message = "";
        }
        JSONObject put3 = put.put("exception", jSONObject.put("values", jSONArray.put(put2.put("value", message).put("stacktrace", f(th)))));
        JSONObject put4 = new JSONObject().put("locale", this.G).put("environment", this.F).put("android_os_version", this.H);
        for (Map.Entry entry : this.e.a().entrySet()) {
            put4.put((String) entry.getKey(), (String) entry.getValue());
        }
        Unit unit = Unit.a;
        JSONObject put5 = put3.put("tags", put4).put("contexts", e());
        Intrinsics.checkNotNullExpressionValue(put5, "put(...)");
        return put5;
    }

    private final HttpsURLConnection c() {
        HttpsURLConnection j = j();
        j.setRequestMethod("POST");
        j.setDoOutput(true);
        for (Map.Entry entry : P.l(new Pair[]{x.a(ScvWBticsRgdcT.yyoXeztobFwLaTU, "application/json; charset=utf-8"), x.a("User-Agent", NaodVZqMgoc.MCMomsb), x.a("X-Sentry-Auth", g())}).entrySet()) {
            j.setRequestProperty((String) entry.getKey(), (String) entry.getValue());
        }
        return j;
    }

    public a(android.content.Context r9, Q9.a.b r10, kotlin.coroutines.CoroutineContext r11, T9.E r12, Q9.d r13, java.lang.String r14, java.lang.String r15, int r16, int r17, kotlin.jvm.internal.DefaultConstructorMarker r18) {
        throw new UnsupportedOperationException("Method not decompiled: Q9.a.<init>(android.content.Context, Q9.a$b, kotlin.coroutines.CoroutineContext, T9.E, Q9.d, java.lang.String, java.lang.String, int, int, kotlin.jvm.internal.DefaultConstructorMarker):void");
    }
}