导航菜单

页面标题

页面副标题

FanCode v7.24.0 - e.java 源代码

正在查看: FanCode v7.24.0 应用的 e.java JAVA 源代码文件

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


package s8;

import android.app.Application;
import com.connectsdk.service.webos.lgcast.common.utils.StringUtil;
import com.newrelic.agent.android.instrumentation.Instrumented;
import com.newrelic.agent.android.instrumentation.LogInstrumentation;
import java.lang.Thread;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import kotlin.Metadata;
import kotlin.Unit;
import kotlin.collections.CollectionsKt;
import kotlin.collections.j0;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.Lambda;
import mn.w;
import org.jetbrains.annotations.NotNull;
import org.json.JSONArray;
import org.json.JSONObject;
import rl.q;

@Metadata
public final class e implements Thread.UncaughtExceptionHandler {

    private static e f15808j;

    private t8.c f15810a;

    private final s8.b f15811b;

    private final Thread.UncaughtExceptionHandler f15812c;

    private int f15813d;

    private boolean f15814e;

    private final HashMap<String, String> f15815f;

    private final Application f15816g;

    private String f15817h;

    public static final b f15809k = new b(null);

    private static String f15807i = StringUtil.EMPTY;

    @Metadata
    public static final class a extends s8.a {
        a() {
        }

        @Override
        public int a() {
            return e.this.j();
        }

        @Override
        public void b() {
            if (u8.a.j(e.this.f15816g)) {
                e.this.f15811b.j();
            } else {
                e.this.f15811b.n();
            }
        }

        @Override
        public void c() {
            e.this.f15811b.o();
        }

        @Override
        public void d(int i9) {
            e.this.l(i9);
        }
    }

    @Metadata
    public static final class b {

        @Metadata
        @Instrumented
        public static final class a implements mn.d<Void> {

            final e f15819a;

            final Collection f15820b;

            a(e eVar, Collection collection) {
                this.f15819a = eVar;
                this.f15820b = collection;
            }

            public void a(@NotNull mn.b<Void> bVar, @NotNull Throwable th) {
                Intrinsics.checkParameterIsNotNull(bVar, "call");
                Intrinsics.checkParameterIsNotNull(th, "t");
                if (this.f15819a.k()) {
                    LogInstrumentation.d("InHouseEventTracker", "event batch of size " + this.f15820b.size() + " send failed");
                }
            }

            public void b(@NotNull mn.b<Void> bVar, @NotNull w<Void> wVar) {
                Intrinsics.checkParameterIsNotNull(bVar, "call");
                Intrinsics.checkParameterIsNotNull(wVar, "response");
                if (this.f15819a.k()) {
                    LogInstrumentation.d("InHouseEventTracker", "event batch of size " + this.f15820b.size() + " send success");
                }
            }
        }

        private b() {
        }

        public b(DefaultConstructorMarker defaultConstructorMarker) {
            this();
        }

        private final void a() {
            if (e.f15808j == null) {
                throw new Exception("Tracker not initialised");
            }
        }

        public final void b(@NotNull Application application, @NotNull s8.c cVar) {
            Intrinsics.checkParameterIsNotNull(application, "applicationContext");
            Intrinsics.checkParameterIsNotNull(cVar, "crashReportImpl");
            if (e.f15808j == null) {
                e.f15808j = new e(application, cVar, null, 4, null);
            }
        }

        public final void c(@NotNull Application application, @NotNull s8.c cVar, @NotNull String str) {
            Intrinsics.checkParameterIsNotNull(application, "applicationContext");
            Intrinsics.checkParameterIsNotNull(cVar, "crashReportImpl");
            Intrinsics.checkParameterIsNotNull(str, "baseUrl");
            if (e.f15808j == null) {
                e.f15808j = new e(application, cVar, str);
            }
        }

        public final void d(@NotNull Collection<String> collection) {
            Intrinsics.checkParameterIsNotNull(collection, "params");
            a();
            e eVar = e.f15808j;
            if (eVar != null) {
                t8.d c9 = eVar.f15810a.c();
                Collection<String> collection2 = collection;
                ArrayList arrayList = new ArrayList(CollectionsKt.v(collection2, 10));
                Iterator<T> it = collection2.iterator();
                while (it.hasNext()) {
                    arrayList.add(new JSONObject((String) it.next()));
                }
                c9.a(new t8.a(new JSONArray((Collection) arrayList))).D(new a(eVar, collection));
            }
        }

        public final synchronized void e(boolean z9) {
            e eVar = e.f15808j;
            if (eVar != null) {
                eVar.m(z9);
                eVar.f15817h = (z9 && Intrinsics.areEqual(eVar.f15817h, "https://d11-events-framework.dream11.com/")) ? "https://event-framework-load.dream11.com/" : eVar.f15817h;
                eVar.f15810a = new t8.c(eVar.f15816g, eVar.f15817h);
            }
        }

        public final void f(@NotNull String str, @NotNull Map<String, ? extends Object> map) {
            Intrinsics.checkParameterIsNotNull(str, "name");
            Intrinsics.checkParameterIsNotNull(map, "params");
            e eVar = e.f15808j;
            if (eVar != null) {
                eVar.f15811b.i(str, j0.p(j0.o(eVar.f15815f, map), q.a("eventTime", String.valueOf(System.currentTimeMillis()))));
            }
        }
    }

    @Metadata
    static final class c extends Lambda implements Function1<Collection<? extends String>, Unit> {

        public static final c f15821a = new c();

        c() {
            super(1);
        }

        public final void a(@NotNull Collection<String> collection) {
            Intrinsics.checkParameterIsNotNull(collection, "it");
            e.f15809k.d(collection);
        }

        public Object invoke(Object obj) {
            a((Collection) obj);
            return Unit.a;
        }
    }

    public e(@NotNull Application application, @NotNull s8.c cVar, @NotNull String str) {
        Intrinsics.checkParameterIsNotNull(application, "applicationContext");
        Intrinsics.checkParameterIsNotNull(cVar, "crashReportImpl");
        Intrinsics.checkParameterIsNotNull(str, "baseUrl");
        this.f15816g = application;
        this.f15817h = str;
        this.f15810a = new t8.c(application, str);
        s8.b bVar = new s8.b(application, cVar, c.f15821a);
        this.f15811b = bVar;
        Thread.UncaughtExceptionHandler defaultUncaughtExceptionHandler = Thread.getDefaultUncaughtExceptionHandler();
        Intrinsics.checkExpressionValueIsNotNull(defaultUncaughtExceptionHandler, "Thread.getDefaultUncaughtExceptionHandler()");
        this.f15812c = defaultUncaughtExceptionHandler;
        this.f15813d = 1;
        bVar.o();
        application.registerActivityLifecycleCallbacks(new a());
        HashMap<String, String> hashMap = new HashMap<>();
        hashMap.put("app_name", u8.a.h(application));
        hashMap.put("app_version", u8.a.a(application));
        hashMap.put("os", u8.a.e());
        hashMap.put("mobile", u8.a.c());
        hashMap.put("model", u8.a.b());
        hashMap.put("os_version", u8.a.f());
        hashMap.put("screen_resolution", u8.a.i(application));
        hashMap.put("network_provider", u8.a.d(application));
        hashMap.put("device_name", u8.a.b());
        if (f15807i.length() > 0) {
            hashMap.put("_sn", f15807i);
        }
        this.f15815f = hashMap;
    }

    public final int j() {
        return this.f15813d;
    }

    public final boolean k() {
        return this.f15814e;
    }

    public final void l(int i9) {
        this.f15813d = i9;
    }

    public final void m(boolean z9) {
        this.f15814e = z9;
    }

    @Override
    public void uncaughtException(Thread thread, Throwable th) {
        try {
            this.f15811b.n();
        } finally {
            this.f15812c.uncaughtException(thread, th);
        }
    }

    public e(Application application, s8.c cVar, String str, int i9, DefaultConstructorMarker defaultConstructorMarker) {
        this(application, cVar, (i9 & 4) != 0 ? "https://d11-events-framework.dream11.com/" : str);
    }
}