MD5 校验值:290b0e4cd89c7a20355df0a13ec24559
StatisticDataHandler$uploadStartupStatistic$2.java 文件包含反编译后的源代码,请注意,该内容仅供学习和参考使用,不得用于非法用途。
package com.ideaflow.zmcy.statistic; import android.os.Build; import com.ideaflow.zmcy.BuildConfig; import com.ideaflow.zmcy.common.GlobalVar; import com.ideaflow.zmcy.entity.User; import com.ideaflow.zmcy.mmkv.UserConfigMMKV; import com.ideaflow.zmcy.network.HttpKitKt; import com.ideaflow.zmcy.tools.BuildToolKitKt; import com.jstudio.jkit.ExtensionsKt; import com.jstudio.jkit.JsonKit; import com.jstudio.jkit.LogKit; import com.jstudio.jkit.TimeKit; import com.umeng.analytics.pro.bm; import java.util.HashMap; import kotlin.Metadata; import kotlin.ResultKt; import kotlin.Unit; import kotlin.coroutines.Continuation; import kotlin.coroutines.intrinsics.IntrinsicsKt; import kotlin.coroutines.jvm.internal.Boxing; import kotlin.coroutines.jvm.internal.DebugMetadata; import kotlin.coroutines.jvm.internal.SuspendLambda; import kotlin.jvm.functions.Function2; import kotlin.jvm.internal.Intrinsics; import kotlin.text.StringsKt; import kotlinx.coroutines.CoroutineScope; @Metadata(d1 = {"\u0000\n\n\u0002\u0018\u0002\n\u0002\u0010\u0002\n\u0000\u0010\u0002\u001a\u00020\u0001*\u00020\u0000H\u008a@"}, d2 = {"Lkotlinx/coroutines/CoroutineScope;", "", "<anonymous>"}, k = 3, mv = {1, 9, 0}) @DebugMetadata(c = "com.ideaflow.zmcy.statistic.StatisticDataHandler$uploadStartupStatistic$2", f = "Statistic.kt", i = {}, l = {158}, m = "invokeSuspend", n = {}, s = {}) public final class StatisticDataHandler$uploadStartupStatistic$2 extends SuspendLambda implements Function2<CoroutineScope, Continuation<? super Unit>, Object> { final String $deviceId; int label; public StatisticDataHandler$uploadStartupStatistic$2(String str, Continuation<? super StatisticDataHandler$uploadStartupStatistic$2> continuation) { super(2, continuation); this.$deviceId = str; } @Override public final Continuation<Unit> create(Object obj, Continuation<?> continuation) { return new StatisticDataHandler$uploadStartupStatistic$2(this.$deviceId, continuation); } @Override public final Object invoke(CoroutineScope coroutineScope, Continuation<? super Unit> continuation) { return ((StatisticDataHandler$uploadStartupStatistic$2) create(coroutineScope, continuation)).invokeSuspend(Unit.INSTANCE); } @Override public final Object invokeSuspend(Object obj) { String str; String str2; String str3; Object coroutine_suspended = IntrinsicsKt.getCOROUTINE_SUSPENDED(); int i = this.label; if (i == 0) { ResultKt.throwOnFailure(obj); if (UserConfigMMKV.INSTANCE.getUser() == null) { LogKit.Companion companion = LogKit.INSTANCE; str2 = StatisticDataHandler.tag; Intrinsics.checkNotNullExpressionValue(str2, "access$getTag$p(...)"); companion.e(str2, "****** user is null, no need to upload boot statistic"); return Unit.INSTANCE; } User user = UserConfigMMKV.INSTANCE.getUser(); String id = user != null ? user.getId() : null; User user2 = UserConfigMMKV.INSTANCE.getUser(); Long boxLong = user2 != null ? Boxing.boxLong(user2.getCreatedTime()) : null; String channel = GlobalVar.INSTANCE.obtain().getChannel(); HashMap hashMap = new HashMap(); String str4 = id; if (str4 != null && str4.length() != 0) { Intrinsics.checkNotNull(id); hashMap.put("user_id", id); } if (!ExtensionsKt.isNullOrZero(boxLong)) { try { Intrinsics.checkNotNull(boxLong); hashMap.put("register_time", TimeKit.toPatternString(boxLong.longValue(), "yyyy-MM-dd HH:mm:ss")); } catch (Exception unused) { } } String str5 = this.$deviceId; if (str5 != null && str5.length() != 0) { String str6 = this.$deviceId; Intrinsics.checkNotNull(str6); hashMap.put("device_id", str6); } HashMap hashMap2 = hashMap; hashMap2.put("startup_environment_id", StatisticDataHandler.INSTANCE.getStartupEnvironmentId()); hashMap2.put("test", Boxing.boxInt(BuildToolKitKt.isTestEnvironment() ? 1 : 0)); hashMap2.put(bm.x, "Android"); hashMap2.put("app_version", BuildConfig.VERSION_NAME); String RELEASE = Build.VERSION.RELEASE; Intrinsics.checkNotNullExpressionValue(RELEASE, "RELEASE"); hashMap2.put(bm.y, RELEASE); hashMap2.put("device", Build.BRAND + ' ' + Build.MODEL); hashMap2.put("reg_source", channel); hashMap2.put("link_source", channel); if (BuildToolKitKt.isDebugBuild()) { LogKit.Companion companion2 = LogKit.INSTANCE; str = StatisticDataHandler.tag; Intrinsics.checkNotNullExpressionValue(str, "access$getTag$p(...)"); companion2.e(str, "****** debug build, no need to upload startup event statistic"); return Unit.INSTANCE; } byte[] compressJson = StatisticDataHandler.INSTANCE.compressJson(JsonKit.parseToJson(hashMap)); if (compressJson == null) { return Unit.INSTANCE; } this.label = 1; obj = HttpKitKt.postZipData("https://cystat.ideaflow.pro/push/ds_startup_app", compressJson, this); if (obj == coroutine_suspended) { return coroutine_suspended; } } else { if (i != 1) { throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine"); } ResultKt.throwOnFailure(obj); } String str7 = (String) obj; if (str7 != null && StringsKt.contains$default((CharSequence) str7, (CharSequence) "success", false, 2, (Object) null)) { LogKit.Companion companion3 = LogKit.INSTANCE; str3 = StatisticDataHandler.tag; Intrinsics.checkNotNullExpressionValue(str3, "access$getTag$p(...)"); companion3.d(str3, "###### upload boot statistic success"); System.out.println((Object) "###### upload boot statistic success"); } return Unit.INSTANCE; } }