Warkop v5.73.0版本的 MD5 值为:a4330ec2d6f5e146f59fc7622f3cdb45
以下内容为反编译后的 c0.java 源代码,内容仅作参考
package com.sumsub.sentry;
import android.content.Context;
import com.sumsub.log.logger.Logger;
import java.lang.Thread;
import java.util.List;
import java.util.concurrent.Executors;
import kotlin.Metadata;
import kr.o1;
import org.jetbrains.annotations.NotNull;
@Metadata(d1 = {"\u0000N\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u0003\n\u0000\n\u0002\u0010\u000b\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u000e\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0006\u0018\u0000 \"2\u00020\u0001:\u0001\u0005B)\u0012\u0006\u0010\u0010\u001a\u00020\u000e\u0012\u000e\u0010\u0015\u001a\n\u0012\u0006\u0012\u0004\u0018\u00010\u00120\u0011\u0012\b\u0010\u0018\u001a\u0004\u0018\u00010\u0001¢\u0006\u0004\b \u0010!J\u0012\u0010\u0005\u001a\u00020\u00042\b\u0010\u0003\u001a\u0004\u0018\u00010\u0002H\u0002J\u0018\u0010\n\u001a\u00020\t2\u0006\u0010\u0007\u001a\u00020\u00062\u0006\u0010\b\u001a\u00020\u0002H\u0016J!\u0010\u0005\u001a\u0004\u0018\u00010\f2\u0006\u0010\u000b\u001a\u00020\u00062\u0006\u0010\b\u001a\u00020\u0002H\u0000¢\u0006\u0004\b\u0005\u0010\rR\u0014\u0010\u0010\u001a\u00020\u000e8\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b\u0005\u0010\u000fR\u001c\u0010\u0015\u001a\n\u0012\u0006\u0012\u0004\u0018\u00010\u00120\u00118\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b\u0013\u0010\u0014R\u0016\u0010\u0018\u001a\u0004\u0018\u00010\u00018\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b\u0016\u0010\u0017R\u0014\u0010\u001c\u001a\u00020\u00198\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b\u001a\u0010\u001bR\u001a\u0010\u001f\u001a\b\u0012\u0004\u0012\u00020\f0\u001d8\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b\b\u0010\u001e¨\u0006#"}, d2 = {"Lcom/sumsub/sentry/c0;", "Ljava/lang/Thread$UncaughtExceptionHandler;", "", "ex", "", "a", "Ljava/lang/Thread;", "t", "e", "Lco/g0;", "uncaughtException", "thread", "Lcom/sumsub/sentry/v;", "(Ljava/lang/Thread;Ljava/lang/Throwable;)Lcom/sumsub/sentry/v;", "Landroid/content/Context;", "Landroid/content/Context;", "context", "Lkotlin/Function0;", "", "b", "Lqo/a;", "getApplicantId", "c", "Ljava/lang/Thread$UncaughtExceptionHandler;", "previousHandler", "Lkr/k0;", "d", "Lkr/k0;", "scope", "Lcom/sumsub/log/cacher/e;", "Lcom/sumsub/log/cacher/e;", "sink", "<init>", "(Landroid/content/Context;Lqo/a;Ljava/lang/Thread$UncaughtExceptionHandler;)V", "f", "idensic-mobile-sdk-internal-core_release"}, k = 1, mv = {1, 7, 1})
public final class c0 implements Thread.UncaughtExceptionHandler {
@NotNull
public static final Companion INSTANCE = new Companion(null);
@NotNull
private static final String f36341g = "SentryExceptionHandler";
@NotNull
private final Context context;
@NotNull
private final qo.a<String> getApplicantId;
private final Thread.UncaughtExceptionHandler previousHandler;
@NotNull
private final kr.k0 scope = kr.l0.a(o1.b(Executors.newSingleThreadExecutor()));
@NotNull
private final com.sumsub.log.cacher.e<v> sink;
@Metadata(d1 = {"\u0000\u001e\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0003\n\u0002\b\u0003\n\u0002\u0010\u000e\n\u0002\b\u0005\b\u0086\u0003\u0018\u00002\u00020\u0001B\t\b\u0002¢\u0006\u0004\b\u000b\u0010\fJ\u001f\u0010\u0006\u001a\u00020\u00042\u0006\u0010\u0003\u001a\u00020\u00022\u0006\u0010\u0005\u001a\u00020\u0004H\u0000¢\u0006\u0004\b\u0006\u0010\u0007R\u0014\u0010\t\u001a\u00020\b8\u0002X\u0082T¢\u0006\u0006\n\u0004\b\t\u0010\n¨\u0006\r"}, d2 = {"Lcom/sumsub/sentry/c0$a;", "", "Ljava/lang/Thread;", "thread", "", "e", "a", "(Ljava/lang/Thread;Ljava/lang/Throwable;)Ljava/lang/Throwable;", "", "TAG", "Ljava/lang/String;", "<init>", "()V", "idensic-mobile-sdk-internal-core_release"}, k = 1, mv = {1, 7, 1})
public static final class Companion {
public Companion(kotlin.jvm.internal.k kVar) {
this();
}
@NotNull
public final Throwable a(@NotNull Thread thread, @NotNull Throwable e15) {
return new i(new o(null, "UncaughtExceptionHandler", null, null, Boolean.FALSE, null, null, null, 237, null), e15, thread, false, 8, null);
}
private Companion() {
}
}
@kotlin.coroutines.jvm.internal.f(c = "com.sumsub.sentry.SentryExceptionHandler$uncaughtException$1", f = "SentryExceptionHandler.kt", l = {38}, m = "invokeSuspend")
@Metadata(d1 = {"\u0000\n\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\u0010\u0002\u001a\u00020\u0001*\u00020\u0000H\u008a@"}, d2 = {"Lkr/k0;", "Lco/g0;", "<anonymous>"}, k = 3, mv = {1, 7, 1})
static final class b extends kotlin.coroutines.jvm.internal.l implements qo.p<kr.k0, ho.d<? super co.g0>, Object> {
int f36347a;
final v f36349c;
b(v vVar, ho.d<? super b> dVar) {
super(2, dVar);
this.f36349c = vVar;
}
@Override
public final Object invoke(@NotNull kr.k0 k0Var, ho.d<? super co.g0> dVar) {
return ((b) create(k0Var, dVar)).invokeSuspend(co.g0.f25238a);
}
@Override
@NotNull
public final ho.d<co.g0> create(Object obj, @NotNull ho.d<?> dVar) {
return new b(this.f36349c, dVar);
}
@Override
public final Object invokeSuspend(@NotNull Object obj) {
Object d15;
d15 = io.d.d();
int i15 = this.f36347a;
try {
if (i15 != 0) {
if (i15 == 1) {
co.s.b(obj);
} else {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
} else {
co.s.b(obj);
com.sumsub.log.cacher.e eVar = c0.this.sink;
v vVar = this.f36349c;
this.f36347a = 1;
if (eVar.send(vVar, this) == d15) {
return d15;
}
}
} catch (Exception e15) {
Logger.e$default(com.sumsub.log.a.f35976a, c0.f36341g, "Error while sending uncaught exception: " + e15, null, 4, null);
}
return co.g0.f25238a;
}
}
public c0(@NotNull Context context, @NotNull qo.a<String> aVar, Thread.UncaughtExceptionHandler uncaughtExceptionHandler) {
this.context = context;
this.getApplicantId = aVar;
this.previousHandler = uncaughtExceptionHandler;
com.sumsub.log.cacher.e<v> eVar = new com.sumsub.log.cacher.e<>(new g0("https://sentry.sumsub.com/"), context.getCacheDir());
eVar.a("_SentrySink");
com.sumsub.log.cacher.d.f35984a.a(eVar);
this.sink = eVar;
}
@Override
public void uncaughtException(@NotNull Thread thread, @NotNull Throwable th4) {
Thread.UncaughtExceptionHandler uncaughtExceptionHandler;
try {
try {
v a15 = a(thread, th4);
if (a15 != null) {
kr.k.d(this.scope, null, null, new b(a15, null), 3, null);
} else {
Logger.i$default(com.sumsub.log.a.f35976a, f36341g, "Ignoring host application's exceptions", null, 4, null);
}
uncaughtExceptionHandler = this.previousHandler;
if (uncaughtExceptionHandler == null) {
return;
}
} catch (Exception e15) {
Logger.e$default(com.sumsub.log.a.f35976a, f36341g, "Error while preparing Sentry evenelope: " + e15, null, 4, null);
uncaughtExceptionHandler = this.previousHandler;
if (uncaughtExceptionHandler == null) {
return;
}
}
uncaughtExceptionHandler.uncaughtException(thread, th4);
} catch (Throwable th5) {
Thread.UncaughtExceptionHandler uncaughtExceptionHandler2 = this.previousHandler;
if (uncaughtExceptionHandler2 != null) {
uncaughtExceptionHandler2.uncaughtException(thread, th4);
}
throw th5;
}
}
public final v a(@NotNull Thread thread, @NotNull Throwable e15) {
List e16;
SdkVersion sdkVersion = null;
Object[] objArr = 0;
if (!a(e15)) {
return null;
}
Throwable a15 = INSTANCE.a(thread, e15);
String invoke = this.getApplicantId.invoke();
Logger.d$default(com.sumsub.log.a.f35976a, f36341g, "prepare envelope: applicantId=" + invoke + " exception=" + e15, null, 4, null);
try {
z zVar = new z(null, null, null, null, null, null, null, null, null, null, null, 2047, null);
zVar.a(a15);
z a16 = new com.sumsub.sentry.android.c(this.context, new com.sumsub.sentry.android.a(), new com.sumsub.sentry.android.h(this.context, null, null, null, null, 30, null), invoke).a(new n(null, null, k.INSTANCE.a(), 3, null).a(zVar));
w wVar = new w(a16.getEventId(), sdkVersion, 2, (kotlin.jvm.internal.k) (objArr == true ? 1 : 0));
e16 = p029do.t.e(x.INSTANCE.a(a16));
return new v(wVar, e16);
} catch (Throwable th4) {
com.sumsub.log.a.f35976a.e(f36341g, "Failed to create event", th4);
return null;
}
}
private final boolean a(Throwable ex4) {
boolean V;
boolean z15 = false;
if (ex4 == null) {
return false;
}
StackTraceElement[] stackTrace = ex4.getStackTrace();
int length = stackTrace.length;
int i15 = 0;
while (true) {
if (i15 >= length) {
break;
}
V = kotlin.text.v.V(stackTrace[i15].getClassName(), "com.sumsub", false, 2, null);
if (V) {
z15 = true;
break;
}
i15++;
}
return !z15 ? a(ex4.getCause()) : z15;
}
}