Add decompiled APK source code (JADX)

- 28,932 files
- Full Java source code
- Smali files
- Resources

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2026-02-18 14:52:23 -08:00
parent cc210a65ea
commit f9d20bb3fc
26991 changed files with 2541449 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
package kotlinx.coroutines.android;
import android.os.Looper;
import java.util.List;
import kotlinx.coroutines.MainCoroutineDispatcher;
import kotlinx.coroutines.internal.MainDispatcherFactory;
/* loaded from: classes5.dex */
public final class AndroidDispatcherFactory implements MainDispatcherFactory {
@Override // kotlinx.coroutines.internal.MainDispatcherFactory
public int getLoadPriority() {
return 1073741823;
}
@Override // kotlinx.coroutines.internal.MainDispatcherFactory
public String hintOnError() {
return "For tests Dispatchers.setMain from kotlinx-coroutines-test module can be used";
}
@Override // kotlinx.coroutines.internal.MainDispatcherFactory
public MainCoroutineDispatcher createDispatcher(List list) {
Looper mainLooper = Looper.getMainLooper();
if (mainLooper == null) {
throw new IllegalStateException("The main looper is not available");
}
return new HandlerContext(HandlerDispatcherKt.asHandler(mainLooper, true), null, 2, null);
}
}

View File

@@ -0,0 +1,50 @@
package kotlinx.coroutines.android;
import android.os.Build;
import java.lang.Thread;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import kotlin.coroutines.AbstractCoroutineContextElement;
import kotlin.coroutines.CoroutineContext;
import kotlinx.coroutines.CoroutineExceptionHandler;
/* loaded from: classes5.dex */
public final class AndroidExceptionPreHandler extends AbstractCoroutineContextElement implements CoroutineExceptionHandler {
private volatile Object _preHandler;
public AndroidExceptionPreHandler() {
super(CoroutineExceptionHandler.Key);
this._preHandler = this;
}
public final Method preHandler() {
Object obj = this._preHandler;
if (obj != this) {
return (Method) obj;
}
Method method = null;
try {
Method declaredMethod = Thread.class.getDeclaredMethod("getUncaughtExceptionPreHandler", new Class[0]);
if (Modifier.isPublic(declaredMethod.getModifiers())) {
if (Modifier.isStatic(declaredMethod.getModifiers())) {
method = declaredMethod;
}
}
} catch (Throwable unused) {
}
this._preHandler = method;
return method;
}
@Override // kotlinx.coroutines.CoroutineExceptionHandler
public void handleException(CoroutineContext coroutineContext, Throwable th) {
if (Build.VERSION.SDK_INT < 28) {
Method preHandler = preHandler();
Object invoke = preHandler != null ? preHandler.invoke(null, new Object[0]) : null;
Thread.UncaughtExceptionHandler uncaughtExceptionHandler = invoke instanceof Thread.UncaughtExceptionHandler ? (Thread.UncaughtExceptionHandler) invoke : null;
if (uncaughtExceptionHandler != null) {
uncaughtExceptionHandler.uncaughtException(Thread.currentThread(), th);
}
}
}
}

View File

@@ -0,0 +1,153 @@
package kotlinx.coroutines.android;
import android.os.Handler;
import android.os.Looper;
import java.util.concurrent.CancellationException;
import kotlin.Unit;
import kotlin.coroutines.CoroutineContext;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.ranges.RangesKt___RangesKt;
import kotlinx.coroutines.CancellableContinuation;
import kotlinx.coroutines.Delay;
import kotlinx.coroutines.Dispatchers;
import kotlinx.coroutines.DisposableHandle;
import kotlinx.coroutines.JobKt;
import kotlinx.coroutines.NonDisposableHandle;
/* loaded from: classes5.dex */
public final class HandlerContext extends HandlerDispatcher implements Delay {
private volatile HandlerContext _immediate;
public final Handler handler;
public final HandlerContext immediate;
public final boolean invokeImmediately;
public final String name;
@Override // kotlinx.coroutines.MainCoroutineDispatcher
public HandlerContext getImmediate() {
return this.immediate;
}
@Override // kotlinx.coroutines.Delay
/* renamed from: scheduleResumeAfterDelay */
public void mo4149scheduleResumeAfterDelay(long j, final CancellableContinuation cancellableContinuation) {
long coerceAtMost;
final Runnable runnable = new Runnable() { // from class: kotlinx.coroutines.android.HandlerContext$scheduleResumeAfterDelay$$inlined$Runnable$1
@Override // java.lang.Runnable
public final void run() {
CancellableContinuation.this.resumeUndispatched(this, Unit.INSTANCE);
}
};
Handler handler = this.handler;
coerceAtMost = RangesKt___RangesKt.coerceAtMost(j, 4611686018427387903L);
if (handler.postDelayed(runnable, coerceAtMost)) {
cancellableContinuation.invokeOnCancellation(new Function1() { // from class: kotlinx.coroutines.android.HandlerContext$scheduleResumeAfterDelay$1
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
{
super(1);
}
@Override // kotlin.jvm.functions.Function1
public /* bridge */ /* synthetic */ Object invoke(Object obj) {
invoke((Throwable) obj);
return Unit.INSTANCE;
}
public final void invoke(Throwable th) {
Handler handler2;
handler2 = HandlerContext.this.handler;
handler2.removeCallbacks(runnable);
}
});
} else {
cancelOnRejection(cancellableContinuation.getContext(), runnable);
}
}
public HandlerContext(Handler handler, String str, boolean z) {
super(null);
this.handler = handler;
this.name = str;
this.invokeImmediately = z;
this._immediate = z ? this : null;
HandlerContext handlerContext = this._immediate;
if (handlerContext == null) {
handlerContext = new HandlerContext(handler, str, true);
this._immediate = handlerContext;
}
this.immediate = handlerContext;
}
public /* synthetic */ HandlerContext(Handler handler, String str, int i, DefaultConstructorMarker defaultConstructorMarker) {
this(handler, (i & 2) != 0 ? null : str);
}
public HandlerContext(Handler handler, String str) {
this(handler, str, false);
}
@Override // kotlinx.coroutines.CoroutineDispatcher
public boolean isDispatchNeeded(CoroutineContext coroutineContext) {
return (this.invokeImmediately && Intrinsics.areEqual(Looper.myLooper(), this.handler.getLooper())) ? false : true;
}
@Override // kotlinx.coroutines.CoroutineDispatcher
/* renamed from: dispatch */
public void mo4148dispatch(CoroutineContext coroutineContext, Runnable runnable) {
if (this.handler.post(runnable)) {
return;
}
cancelOnRejection(coroutineContext, runnable);
}
@Override // kotlinx.coroutines.Delay
public DisposableHandle invokeOnTimeout(long j, final Runnable runnable, CoroutineContext coroutineContext) {
long coerceAtMost;
Handler handler = this.handler;
coerceAtMost = RangesKt___RangesKt.coerceAtMost(j, 4611686018427387903L);
if (handler.postDelayed(runnable, coerceAtMost)) {
return new DisposableHandle() { // from class: kotlinx.coroutines.android.HandlerContext$$ExternalSyntheticLambda0
@Override // kotlinx.coroutines.DisposableHandle
public final void dispose() {
HandlerContext.invokeOnTimeout$lambda$3(HandlerContext.this, runnable);
}
};
}
cancelOnRejection(coroutineContext, runnable);
return NonDisposableHandle.INSTANCE;
}
public static final void invokeOnTimeout$lambda$3(HandlerContext handlerContext, Runnable runnable) {
handlerContext.handler.removeCallbacks(runnable);
}
public final void cancelOnRejection(CoroutineContext coroutineContext, Runnable runnable) {
JobKt.cancel(coroutineContext, new CancellationException("The task was rejected, the handler underlying the dispatcher '" + this + "' was closed"));
Dispatchers.getIO().mo4148dispatch(coroutineContext, runnable);
}
@Override // kotlinx.coroutines.CoroutineDispatcher
public String toString() {
String stringInternalImpl = toStringInternalImpl();
if (stringInternalImpl != null) {
return stringInternalImpl;
}
String str = this.name;
if (str == null) {
str = this.handler.toString();
}
if (!this.invokeImmediately) {
return str;
}
return str + ".immediate";
}
public boolean equals(Object obj) {
return (obj instanceof HandlerContext) && ((HandlerContext) obj).handler == this.handler;
}
public int hashCode() {
return System.identityHashCode(this.handler);
}
}

View File

@@ -0,0 +1,15 @@
package kotlinx.coroutines.android;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlinx.coroutines.Delay;
import kotlinx.coroutines.MainCoroutineDispatcher;
/* loaded from: classes5.dex */
public abstract class HandlerDispatcher extends MainCoroutineDispatcher implements Delay {
public /* synthetic */ HandlerDispatcher(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
public HandlerDispatcher() {
}
}

View File

@@ -0,0 +1,43 @@
package kotlinx.coroutines.android;
import android.os.Build;
import android.os.Handler;
import android.os.Looper;
import android.view.Choreographer;
import kotlin.Result;
import kotlin.ResultKt;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes5.dex */
public abstract class HandlerDispatcherKt {
public static final HandlerDispatcher Main;
private static volatile Choreographer choreographer;
public static final Handler asHandler(Looper looper, boolean z) {
if (!z) {
return new Handler(looper);
}
if (Build.VERSION.SDK_INT >= 28) {
Object invoke = Handler.class.getDeclaredMethod("createAsync", Looper.class).invoke(null, looper);
Intrinsics.checkNotNull(invoke, "null cannot be cast to non-null type android.os.Handler");
return (Handler) invoke;
}
try {
return (Handler) Handler.class.getDeclaredConstructor(Looper.class, Handler.Callback.class, Boolean.TYPE).newInstance(looper, null, Boolean.TRUE);
} catch (NoSuchMethodException unused) {
return new Handler(looper);
}
}
static {
Object m4060constructorimpl;
try {
Result.Companion companion = Result.Companion;
m4060constructorimpl = Result.m4060constructorimpl(new HandlerContext(asHandler(Looper.getMainLooper(), true), null, 2, null));
} catch (Throwable th) {
Result.Companion companion2 = Result.Companion;
m4060constructorimpl = Result.m4060constructorimpl(ResultKt.createFailure(th));
}
Main = (HandlerDispatcher) (Result.m4064isFailureimpl(m4060constructorimpl) ? null : m4060constructorimpl);
}
}