无痛单词 v1.8.1版本的 MD5 值为:7ae56c6858542fe70230b6be4f1a4b5a
以下内容为反编译后的 AnalyticsUtilsKt$sendAnalyticsEvent$2.java 源代码,内容仅作参考
package tech.xiangzi.painless.data;
import android.net.wifi.LogLevel;
import android.net.wifi.LoggerKt;
import androidx.recyclerview.widget.a;
import kotlin.Metadata;
import kotlin.ResultKt;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.intrinsics.IntrinsicsKt;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.io.CloseableKt;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
import kotlinx.coroutines.CoroutineScope;
import okhttp3.MediaType;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.RequestBody;
import okhttp3.Response;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.json.JSONObject;
import tech.xiangzi.painless.data.remote.MyHeadInterceptor;
import tech.xiangzi.painless.utils.CacheUtil;
@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, 8, 0})
@DebugMetadata(c = "tech.xiangzi.painless.data.AnalyticsUtilsKt$sendAnalyticsEvent$2", f = "AnalyticsUtils.kt", i = {}, l = {}, m = "invokeSuspend", n = {}, s = {})
@SourceDebugExtension({"SMAP\nAnalyticsUtils.kt\nKotlin\n*S Kotlin\n*F\n+ 1 AnalyticsUtils.kt\ntech/xiangzi/painless/data/AnalyticsUtilsKt$sendAnalyticsEvent$2\n+ 2 Logger.kt\ncom/dylanc/longan/LoggerKt\n+ 3 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,73:1\n92#2,2:74\n57#2,2:76\n92#2,2:79\n57#2,2:81\n98#2,2:84\n57#2,2:86\n1#3:78\n1#3:83\n1#3:88\n*S KotlinDebug\n*F\n+ 1 AnalyticsUtils.kt\ntech/xiangzi/painless/data/AnalyticsUtilsKt$sendAnalyticsEvent$2\n*L\n57#1:74,2\n57#1:76,2\n62#1:79,2\n62#1:81,2\n65#1:84,2\n65#1:86,2\n57#1:78\n62#1:83\n65#1:88\n*E\n"})
public final class AnalyticsUtilsKt$sendAnalyticsEvent$2 extends SuspendLambda implements Function2<CoroutineScope, Continuation<? super Unit>, Object> {
final String $eventDate;
final String $eventType;
final String $eventValue;
int label;
public AnalyticsUtilsKt$sendAnalyticsEvent$2(String str, String str2, String str3, Continuation<? super AnalyticsUtilsKt$sendAnalyticsEvent$2> continuation) {
super(2, continuation);
this.$eventType = str;
this.$eventValue = str2;
this.$eventDate = str3;
}
@Override
@NotNull
public final Continuation<Unit> create(@Nullable Object obj, @NotNull Continuation<?> continuation) {
return new AnalyticsUtilsKt$sendAnalyticsEvent$2(this.$eventType, this.$eventValue, this.$eventDate, continuation);
}
@Override
@Nullable
public final Object mo1invoke(@NotNull CoroutineScope coroutineScope, @Nullable Continuation<? super Unit> continuation) {
return ((AnalyticsUtilsKt$sendAnalyticsEvent$2) create(coroutineScope, continuation)).invokeSuspend(Unit.INSTANCE);
}
@Override
@Nullable
public final Object invokeSuspend(@NotNull Object obj) {
StackTraceElement it;
String simpleClassName;
StackTraceElement it2;
String simpleClassName2;
StackTraceElement it3;
String simpleClassName3;
String str = "";
IntrinsicsKt.getCOROUTINE_SUSPENDED();
if (this.label == 0) {
ResultKt.throwOnFailure(obj);
int i = 0;
try {
OkHttpClient build = new OkHttpClient.Builder().addInterceptor(new MyHeadInterceptor()).build();
JSONObject jSONObject = new JSONObject();
String str2 = this.$eventType;
String str3 = this.$eventValue;
String str4 = this.$eventDate;
CacheUtil cacheUtil = CacheUtil.INSTANCE;
jSONObject.put("oaid", cacheUtil.getOaid());
jSONObject.put("uid", cacheUtil.getUser().getUid());
jSONObject.put("channel", cacheUtil.getChannel());
jSONObject.put("eventType", str2);
jSONObject.put("eventValue", str3);
jSONObject.put("eventDate", str4);
jSONObject.put("deviceName", cacheUtil.getDeviceName());
MediaType parse = MediaType.INSTANCE.parse("application/json; charset=utf-8");
RequestBody.Companion companion = RequestBody.INSTANCE;
String jSONObject2 = jSONObject.toString();
Intrinsics.checkNotNullExpressionValue(jSONObject2, "json.toString()");
Request build2 = new Request.Builder().url("https://app.xiangzi.tech/app/events").post(companion.create(jSONObject2, parse)).build();
String str5 = "sendAnalyticsEvent url : " + build2.url();
int m48getINFOKfHOVCA = LogLevel.INSTANCE.m48getINFOKfHOVCA();
StackTraceElement[] stackTrace = Thread.currentThread().getStackTrace();
Intrinsics.checkNotNullExpressionValue(stackTrace, "currentThread().stackTrace");
int length = stackTrace.length;
int i2 = 0;
while (true) {
if (i2 < length) {
it2 = stackTrace[i2];
Intrinsics.checkNotNullExpressionValue(it2, "it");
if (!LoggerKt.isIgnorable(it2)) {
break;
}
i2++;
} else {
it2 = null;
break;
}
}
if (it2 == null) {
simpleClassName2 = null;
} else {
simpleClassName2 = LoggerKt.getSimpleClassName(it2);
}
if (simpleClassName2 == null) {
simpleClassName2 = "";
}
LoggerKt.m51logIBjOjVg(m48getINFOKfHOVCA, simpleClassName2, str5, null);
Response execute = build.newCall(build2).execute();
try {
String str6 = "sendAnalyticsEvent " + this.$eventType + " success";
int m48getINFOKfHOVCA2 = LogLevel.INSTANCE.m48getINFOKfHOVCA();
StackTraceElement[] stackTrace2 = Thread.currentThread().getStackTrace();
Intrinsics.checkNotNullExpressionValue(stackTrace2, "currentThread().stackTrace");
int length2 = stackTrace2.length;
int i3 = 0;
while (true) {
if (i3 < length2) {
it3 = stackTrace2[i3];
Intrinsics.checkNotNullExpressionValue(it3, "it");
if (!LoggerKt.isIgnorable(it3)) {
break;
}
i3++;
} else {
it3 = null;
break;
}
}
if (it3 == null) {
simpleClassName3 = null;
} else {
simpleClassName3 = LoggerKt.getSimpleClassName(it3);
}
if (simpleClassName3 == null) {
simpleClassName3 = "";
}
LoggerKt.m51logIBjOjVg(m48getINFOKfHOVCA2, simpleClassName3, str6, null);
Unit unit = Unit.INSTANCE;
CloseableKt.closeFinally(execute, null);
} finally {
}
} catch (Exception e2) {
String str7 = "sendAnalyticsEvent Exception: " + e2.getMessage();
int m47getERRORKfHOVCA = LogLevel.INSTANCE.m47getERRORKfHOVCA();
StackTraceElement[] D = a.D("currentThread().stackTrace");
int length3 = D.length;
while (true) {
if (i < length3) {
it = D[i];
Intrinsics.checkNotNullExpressionValue(it, "it");
if (!LoggerKt.isIgnorable(it)) {
break;
}
i++;
} else {
it = null;
break;
}
}
if (it == null) {
simpleClassName = null;
} else {
simpleClassName = LoggerKt.getSimpleClassName(it);
}
if (simpleClassName != null) {
str = simpleClassName;
}
LoggerKt.m51logIBjOjVg(m47getERRORKfHOVCA, str, str7, null);
}
return Unit.INSTANCE;
}
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
}