Initial import of ADIF API reverse-engineering toolkit

This commit is contained in:
2025-12-16 08:37:56 +01:00
commit 60388529c1
11486 changed files with 1086536 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
package kotlinx.coroutines.tasks;
import java.util.concurrent.Executor;
import kotlin.Metadata;
@Metadata(d1 = {"\u0000\u0018\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\\u0002\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002J\u0010\u0010\u0003\u001a\u00020\u00042\u0006\u0010\u0005\u001a\u00020\u0006H\u0016¨\u0006\u0007"}, d2 = {"Lkotlinx/coroutines/tasks/DirectExecutor;", "Ljava/util/concurrent/Executor;", "()V", "execute", "", "r", "Ljava/lang/Runnable;", "kotlinx-coroutines-play-services"}, k = 1, mv = {1, 9, 0}, xi = 48)
/* loaded from: classes3.dex */
final class DirectExecutor implements Executor {
public static final DirectExecutor INSTANCE = new DirectExecutor();
private DirectExecutor() {
}
@Override // java.util.concurrent.Executor
public void execute(Runnable r4) {
r4.run();
}
}

View File

@@ -0,0 +1,340 @@
package kotlinx.coroutines.tasks;
import com.google.android.gms.tasks.CancellationTokenSource;
import com.google.android.gms.tasks.OnCompleteListener;
import com.google.android.gms.tasks.RuntimeExecutionException;
import com.google.android.gms.tasks.Task;
import com.google.android.gms.tasks.TaskCompletionSource;
import java.util.concurrent.CancellationException;
import kotlin.Deprecated;
import kotlin.DeprecationLevel;
import kotlin.Metadata;
import kotlin.Result;
import kotlin.ResultKt;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.CoroutineContext;
import kotlin.coroutines.intrinsics.IntrinsicsKt;
import kotlin.coroutines.jvm.internal.DebugProbesKt;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.SourceDebugExtension;
import kotlin.sequences.Sequence;
import kotlinx.coroutines.CancellableContinuation;
import kotlinx.coroutines.CancellableContinuationImpl;
import kotlinx.coroutines.ChildHandle;
import kotlinx.coroutines.ChildJob;
import kotlinx.coroutines.CompletableDeferred;
import kotlinx.coroutines.CompletableDeferredKt;
import kotlinx.coroutines.Deferred;
import kotlinx.coroutines.DisposableHandle;
import kotlinx.coroutines.ExperimentalCoroutinesApi;
import kotlinx.coroutines.InternalCoroutinesApi;
import kotlinx.coroutines.Job;
import kotlinx.coroutines.selects.SelectClause0;
import kotlinx.coroutines.selects.SelectClause1;
@Metadata(d1 = {"\u0000\u0016\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0007\u001a\u001c\u0010\u0000\u001a\b\u0012\u0004\u0012\u0002H\u00020\u0001\"\u0004\b\u0000\u0010\u0002*\b\u0012\u0004\u0012\u0002H\u00020\u0003\u001a&\u0010\u0000\u001a\b\u0012\u0004\u0012\u0002H\u00020\u0001\"\u0004\b\u0000\u0010\u0002*\b\u0012\u0004\u0012\u0002H\u00020\u00032\u0006\u0010\u0004\u001a\u00020\u0005H\u0007\u001a(\u0010\u0006\u001a\b\u0012\u0004\u0012\u0002H\u00020\u0001\"\u0004\b\u0000\u0010\u0002*\b\u0012\u0004\u0012\u0002H\u00020\u00032\b\u0010\u0004\u001a\u0004\u0018\u00010\u0005H\u0002\u001a\u001c\u0010\u0007\u001a\b\u0012\u0004\u0012\u0002H\u00020\u0003\"\u0004\b\u0000\u0010\u0002*\b\u0012\u0004\u0012\u0002H\u00020\u0001\u001a\u001e\u0010\b\u001a\u0002H\u0002\"\u0004\b\u0000\u0010\u0002*\b\u0012\u0004\u0012\u0002H\u00020\u0003H\u0086@¢\u0006\u0002\u0010\t\u001a&\u0010\b\u001a\u0002H\u0002\"\u0004\b\u0000\u0010\u0002*\b\u0012\u0004\u0012\u0002H\u00020\u00032\u0006\u0010\u0004\u001a\u00020\u0005H\u0087@¢\u0006\u0002\u0010\n\u001a(\u0010\u000b\u001a\u0002H\u0002\"\u0004\b\u0000\u0010\u0002*\b\u0012\u0004\u0012\u0002H\u00020\u00032\b\u0010\u0004\u001a\u0004\u0018\u00010\u0005H\u0082@¢\u0006\u0002\u0010\\u0006\f"}, d2 = {"asDeferred", "Lkotlinx/coroutines/Deferred;", "T", "Lcom/google/android/gms/tasks/Task;", "cancellationTokenSource", "Lcom/google/android/gms/tasks/CancellationTokenSource;", "asDeferredImpl", "asTask", "await", "(Lcom/google/android/gms/tasks/Task;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "(Lcom/google/android/gms/tasks/Task;Lcom/google/android/gms/tasks/CancellationTokenSource;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "awaitImpl", "kotlinx-coroutines-play-services"}, k = 2, mv = {1, 9, 0}, xi = 48)
@SourceDebugExtension({"SMAP\nTasks.kt\nKotlin\n*S Kotlin\n*F\n+ 1 Tasks.kt\nkotlinx/coroutines/tasks/TasksKt\n+ 2 CancellableContinuation.kt\nkotlinx/coroutines/CancellableContinuationKt\n*L\n1#1,167:1\n314#2,11:168\n*S KotlinDebug\n*F\n+ 1 Tasks.kt\nkotlinx/coroutines/tasks/TasksKt\n*L\n139#1:168,11\n*E\n"})
/* loaded from: classes3.dex */
public final class TasksKt {
public static final <T> Deferred<T> asDeferred(Task<T> task) {
return asDeferredImpl(task, null);
}
private static final <T> Deferred<T> asDeferredImpl(Task<T> task, final CancellationTokenSource cancellationTokenSource) {
final CompletableDeferred CompletableDeferred$default = CompletableDeferredKt.CompletableDeferred$default(null, 1, null);
if (task.isComplete()) {
Exception exception = task.getException();
if (exception != null) {
CompletableDeferred$default.completeExceptionally(exception);
} else if (task.isCanceled()) {
Job.DefaultImpls.cancel$default((Job) CompletableDeferred$default, (CancellationException) null, 1, (Object) null);
} else {
CompletableDeferred$default.complete(task.getResult());
}
} else {
task.addOnCompleteListener(DirectExecutor.INSTANCE, new OnCompleteListener() { // from class: kotlinx.coroutines.tasks.a
@Override // com.google.android.gms.tasks.OnCompleteListener
public final void onComplete(Task task2) {
TasksKt.asDeferredImpl$lambda$0(CompletableDeferred.this, task2);
}
});
}
if (cancellationTokenSource != null) {
CompletableDeferred$default.invokeOnCompletion(new Function1<Throwable, Unit>() { // from class: kotlinx.coroutines.tasks.TasksKt$asDeferredImpl$2
{
super(1);
}
@Override // kotlin.jvm.functions.Function1
public /* bridge */ /* synthetic */ Unit invoke(Throwable th) {
invoke2(th);
return Unit.INSTANCE;
}
/* renamed from: invoke, reason: avoid collision after fix types in other method */
public final void invoke2(Throwable th) {
CancellationTokenSource.this.cancel();
}
});
}
return new Deferred<T>() { // from class: kotlinx.coroutines.tasks.TasksKt$asDeferredImpl$3
@Override // kotlinx.coroutines.Job
@InternalCoroutinesApi
public ChildHandle attachChild(ChildJob child) {
return CompletableDeferred$default.attachChild(child);
}
@Override // kotlinx.coroutines.Deferred
public Object await(Continuation<? super T> continuation) {
return CompletableDeferred$default.await(continuation);
}
@Override // kotlinx.coroutines.Job
@Deprecated(level = DeprecationLevel.HIDDEN, message = "Since 1.2.0, binary compatibility with versions <= 1.1.x")
public /* synthetic */ void cancel() {
CompletableDeferred$default.cancel();
}
@Override // kotlin.coroutines.CoroutineContext.Element, kotlin.coroutines.CoroutineContext
public <R> R fold(R initial, Function2<? super R, ? super CoroutineContext.Element, ? extends R> operation) {
return (R) CompletableDeferred$default.fold(initial, operation);
}
@Override // kotlin.coroutines.CoroutineContext.Element, kotlin.coroutines.CoroutineContext
public <E extends CoroutineContext.Element> E get(CoroutineContext.Key<E> key) {
return (E) CompletableDeferred$default.get(key);
}
@Override // kotlinx.coroutines.Job
@InternalCoroutinesApi
public CancellationException getCancellationException() {
return CompletableDeferred$default.getCancellationException();
}
@Override // kotlinx.coroutines.Job
public Sequence<Job> getChildren() {
return CompletableDeferred$default.getChildren();
}
@Override // kotlinx.coroutines.Deferred
@ExperimentalCoroutinesApi
public T getCompleted() {
return CompletableDeferred$default.getCompleted();
}
@Override // kotlinx.coroutines.Deferred
@ExperimentalCoroutinesApi
public Throwable getCompletionExceptionOrNull() {
return CompletableDeferred$default.getCompletionExceptionOrNull();
}
@Override // kotlin.coroutines.CoroutineContext.Element
public CoroutineContext.Key<?> getKey() {
return CompletableDeferred$default.getKey();
}
@Override // kotlinx.coroutines.Deferred
public SelectClause1<T> getOnAwait() {
return CompletableDeferred$default.getOnAwait();
}
@Override // kotlinx.coroutines.Job
public SelectClause0 getOnJoin() {
return CompletableDeferred$default.getOnJoin();
}
@Override // kotlinx.coroutines.Job
public Job getParent() {
return CompletableDeferred$default.getParent();
}
@Override // kotlinx.coroutines.Job
public DisposableHandle invokeOnCompletion(Function1<? super Throwable, Unit> handler) {
return CompletableDeferred$default.invokeOnCompletion(handler);
}
@Override // kotlinx.coroutines.Job
public boolean isActive() {
return CompletableDeferred$default.isActive();
}
@Override // kotlinx.coroutines.Job
public boolean isCancelled() {
return CompletableDeferred$default.isCancelled();
}
@Override // kotlinx.coroutines.Job
public boolean isCompleted() {
return CompletableDeferred$default.isCompleted();
}
@Override // kotlinx.coroutines.Job
public Object join(Continuation<? super Unit> continuation) {
return CompletableDeferred$default.join(continuation);
}
@Override // kotlin.coroutines.CoroutineContext.Element, kotlin.coroutines.CoroutineContext
public CoroutineContext minusKey(CoroutineContext.Key<?> key) {
return CompletableDeferred$default.minusKey(key);
}
@Override // kotlin.coroutines.CoroutineContext
public CoroutineContext plus(CoroutineContext context) {
return CompletableDeferred$default.plus(context);
}
@Override // kotlinx.coroutines.Job
public boolean start() {
return CompletableDeferred$default.start();
}
@Override // kotlinx.coroutines.Job
public void cancel(CancellationException cause) {
CompletableDeferred$default.cancel(cause);
}
@Override // kotlinx.coroutines.Job
@InternalCoroutinesApi
public DisposableHandle invokeOnCompletion(boolean onCancelling, boolean invokeImmediately, Function1<? super Throwable, Unit> handler) {
return CompletableDeferred$default.invokeOnCompletion(onCancelling, invokeImmediately, handler);
}
@Override // kotlinx.coroutines.Job
@Deprecated(level = DeprecationLevel.ERROR, message = "Operator '+' on two Job objects is meaningless. Job is a coroutine context element and `+` is a set-sum operator for coroutine contexts. The job to the right of `+` just replaces the job the left of `+`.")
public Job plus(Job other) {
return CompletableDeferred$default.plus(other);
}
@Override // kotlinx.coroutines.Job
@Deprecated(level = DeprecationLevel.HIDDEN, message = "Since 1.2.0, binary compatibility with versions <= 1.1.x")
public /* synthetic */ boolean cancel(Throwable cause) {
return CompletableDeferred$default.cancel(cause);
}
};
}
/* JADX INFO: Access modifiers changed from: private */
public static final void asDeferredImpl$lambda$0(CompletableDeferred completableDeferred, Task task) {
Exception exception = task.getException();
if (exception != null) {
completableDeferred.completeExceptionally(exception);
} else if (task.isCanceled()) {
Job.DefaultImpls.cancel$default((Job) completableDeferred, (CancellationException) null, 1, (Object) null);
} else {
completableDeferred.complete(task.getResult());
}
}
public static final <T> Task<T> asTask(final Deferred<? extends T> deferred) {
final CancellationTokenSource cancellationTokenSource = new CancellationTokenSource();
final TaskCompletionSource taskCompletionSource = new TaskCompletionSource(cancellationTokenSource.getToken());
deferred.invokeOnCompletion(new Function1<Throwable, Unit>() { // from class: kotlinx.coroutines.tasks.TasksKt$asTask$1
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
/* JADX WARN: Multi-variable type inference failed */
{
super(1);
}
@Override // kotlin.jvm.functions.Function1
public /* bridge */ /* synthetic */ Unit invoke(Throwable th) {
invoke2(th);
return Unit.INSTANCE;
}
/* renamed from: invoke, reason: avoid collision after fix types in other method */
public final void invoke2(Throwable th) {
if (th instanceof CancellationException) {
CancellationTokenSource.this.cancel();
return;
}
Throwable completionExceptionOrNull = deferred.getCompletionExceptionOrNull();
if (completionExceptionOrNull == null) {
taskCompletionSource.setResult(deferred.getCompleted());
return;
}
TaskCompletionSource<T> taskCompletionSource2 = taskCompletionSource;
Exception exc = completionExceptionOrNull instanceof Exception ? (Exception) completionExceptionOrNull : null;
if (exc == null) {
exc = new RuntimeExecutionException(completionExceptionOrNull);
}
taskCompletionSource2.setException(exc);
}
});
return taskCompletionSource.getTask();
}
public static final <T> Object await(Task<T> task, Continuation<? super T> continuation) {
return awaitImpl(task, null, continuation);
}
/* JADX INFO: Access modifiers changed from: private */
public static final <T> Object awaitImpl(Task<T> task, final CancellationTokenSource cancellationTokenSource, Continuation<? super T> continuation) {
if (task.isComplete()) {
Exception exception = task.getException();
if (exception != null) {
throw exception;
}
if (!task.isCanceled()) {
return task.getResult();
}
throw new CancellationException("Task " + task + " was cancelled normally.");
}
final CancellableContinuationImpl cancellableContinuationImpl = new CancellableContinuationImpl(IntrinsicsKt.intercepted(continuation), 1);
cancellableContinuationImpl.initCancellability();
task.addOnCompleteListener(DirectExecutor.INSTANCE, new OnCompleteListener() { // from class: kotlinx.coroutines.tasks.TasksKt$awaitImpl$2$1
@Override // com.google.android.gms.tasks.OnCompleteListener
public final void onComplete(Task<T> task2) {
Exception exception2 = task2.getException();
if (exception2 != null) {
Continuation continuation2 = cancellableContinuationImpl;
Result.Companion companion = Result.INSTANCE;
continuation2.resumeWith(Result.m116constructorimpl(ResultKt.createFailure(exception2)));
return;
}
boolean isCanceled = task2.isCanceled();
CancellableContinuation<T> cancellableContinuation = cancellableContinuationImpl;
if (isCanceled) {
CancellableContinuation.DefaultImpls.cancel$default(cancellableContinuation, null, 1, null);
} else {
Result.Companion companion2 = Result.INSTANCE;
cancellableContinuation.resumeWith(Result.m116constructorimpl(task2.getResult()));
}
}
});
if (cancellationTokenSource != null) {
cancellableContinuationImpl.invokeOnCancellation(new Function1<Throwable, Unit>() { // from class: kotlinx.coroutines.tasks.TasksKt$awaitImpl$2$2
{
super(1);
}
@Override // kotlin.jvm.functions.Function1
public /* bridge */ /* synthetic */ Unit invoke(Throwable th) {
invoke2(th);
return Unit.INSTANCE;
}
/* renamed from: invoke, reason: avoid collision after fix types in other method */
public final void invoke2(Throwable th) {
CancellationTokenSource.this.cancel();
}
});
}
Object result = cancellableContinuationImpl.getResult();
if (result == IntrinsicsKt.getCOROUTINE_SUSPENDED()) {
DebugProbesKt.probeCoroutineSuspended(continuation);
}
return result;
}
@ExperimentalCoroutinesApi
public static final <T> Deferred<T> asDeferred(Task<T> task, CancellationTokenSource cancellationTokenSource) {
return asDeferredImpl(task, cancellationTokenSource);
}
@ExperimentalCoroutinesApi
public static final <T> Object await(Task<T> task, CancellationTokenSource cancellationTokenSource, Continuation<? super T> continuation) {
return awaitImpl(task, cancellationTokenSource, continuation);
}
}