红果免费短剧 v6.2.3.32版本的 MD5 值为:a6b05492607eab2c8a25f26d2f238ae0

以下内容为反编译后的 a.java 源代码,内容仅作参考


package com.bytedance.user.engagement.common.ability;

import android.os.Build;
import com.bytedance.common.f.c;
import com.bytedance.framwork.core.sdkmonitor.SDKMonitor;
import com.bytedance.framwork.core.sdkmonitor.SDKMonitorUtils;
import com.bytedance.push.z.r;
import java.util.Locale;
import java.util.Map;
import kotlin.Lazy;
import kotlin.LazyKt;
import kotlin.TuplesKt;
import kotlin.collections.CollectionsKt;
import kotlin.collections.MapsKt;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.internal.Intrinsics;
import org.json.JSONObject;

public final class a extends c implements com.bytedance.user.engagement.common.ability.a.b {

    public static final a f34039a = new a();

    private static final Lazy f34040c = LazyKt.lazy(new Function0<SDKMonitor>() {

        public static final class AnonymousClass1 implements SDKMonitor.IGetExtendParams, SDKMonitor.b {
            @Override
            public String getSessionId() {
                return null;
            }

            AnonymousClass1() {
            }

            @Override
            public Map<String, String> getCommonParams() {
                return MapsKt.mutableMapOf(TuplesKt.to("host_aid", String.valueOf(com.bytedance.user.engagement.common.b.f34049a.f().f34026a)));
            }
        }

        @Override
        public final SDKMonitor invoke() {
            String str;
            JSONObject jSONObject = new JSONObject();
            a.f34039a.add(jSONObject, "host_aid", String.valueOf(com.bytedance.user.engagement.common.b.f34049a.f().f34026a));
            a.f34039a.add(jSONObject, "channel", com.bytedance.user.engagement.common.b.f34049a.f().e);
            a.f34039a.add(jSONObject, "app_version", com.bytedance.user.engagement.common.b.f34049a.f().f34028c);
            a aVar = a.f34039a;
            StringBuilder sb = new StringBuilder();
            sb.append(' ');
            sb.append(com.bytedance.user.engagement.common.b.f34049a.f().d);
            aVar.add(jSONObject, "update_version_code", sb.toString());
            a.f34039a.add(jSONObject, "package_name", com.bytedance.user.engagement.common.b.f34049a.getContext().getPackageName());
            a aVar2 = a.f34039a;
            com.bytedance.user.engagement.common.a.b e = com.bytedance.user.engagement.common.b.f34049a.e();
            if (e == null || (str = e.f34029a) == null) {
                str = "";
            }
            aVar2.add(jSONObject, "device_id", str);
            a.f34039a.add(jSONObject, "sdk_version", com.bytedance.user.engagement.common.a.f34025b);
            SDKMonitorUtils.setDefaultReportUrl("507780", CollectionsKt.listOf("https://mon.snssdk.com/monitor/collect/"));
            SDKMonitorUtils.setConfigUrl("507780", CollectionsKt.listOf("https://mon.snssdk.com/monitor/appmonitor/v2/settings"));
            SDKMonitorUtils.initMonitor(com.bytedance.user.engagement.common.b.f34049a.getContext(), "507780", jSONObject, new AnonymousClass1());
            return SDKMonitorUtils.getInstance("507780");
        }
    });

    private final SDKMonitor a() {
        return (SDKMonitor) f34040c.getValue();
    }

    private a() {
    }

    @Override
    public void a(String serviceName, JSONObject jSONObject, JSONObject jSONObject2, JSONObject jSONObject3) {
        JSONObject jSONObject4;
        String str;
        Intrinsics.checkNotNullParameter(serviceName, "serviceName");
        if (jSONObject != null) {
            jSONObject4 = jSONObject;
        } else {
            try {
                jSONObject4 = new JSONObject();
            } catch (Throwable th) {
                com.bytedance.user.engagement.common.c.c.b("MonitorAbility", "error when monitorEvent:{\"serviceName\":\"" + serviceName + "\",\"category\":" + jSONObject + ",\"metric\":" + jSONObject2 + ",\"extra\":" + jSONObject3 + "},e:" + th.getLocalizedMessage());
                return;
            }
        }
        String str2 = Build.BRAND;
        Intrinsics.checkNotNullExpressionValue(str2, "Build.BRAND");
        Locale locale = Locale.ROOT;
        Intrinsics.checkNotNullExpressionValue(locale, "Locale.ROOT");
        if (str2 != null) {
            String lowerCase = str2.toLowerCase(locale);
            Intrinsics.checkNotNullExpressionValue(lowerCase, "(this as java.lang.String).toLowerCase(locale)");
            add(jSONObject4, "device_brand", lowerCase);
            if (r.e()) {
                str = "harmony";
            } else {
                str = "android";
            }
            add(jSONObject4, "os_detail_type", str);
            com.bytedance.user.engagement.common.c.c.a("MonitorAbility", "monitorEvent:{\"serviceName\":\"" + serviceName + "\",\"category\":" + jSONObject + ",\"metric\":" + jSONObject2 + ",\"extra\":" + jSONObject3 + '}');
            a().monitorEvent(serviceName, jSONObject4, jSONObject2, jSONObject3);
            return;
        }
        throw new NullPointerException("null cannot be cast to non-null type java.lang.String");
    }
}