Rabbit-R1/original r1/smali/smali_classes2/androidx/room/RoomDatabaseKt.smali
2024-05-21 17:08:36 -04:00

531 lines
17 KiB
Smali

.class public final Landroidx/room/RoomDatabaseKt;
.super Ljava/lang/Object;
.source "RoomDatabaseExt.kt"
# annotations
.annotation system Ldalvik/annotation/SourceDebugExtension;
value = "SMAP\nRoomDatabaseExt.kt\nKotlin\n*S Kotlin\n*F\n+ 1 RoomDatabaseExt.kt\nandroidx/room/RoomDatabaseKt\n+ 2 CancellableContinuation.kt\nkotlinx/coroutines/CancellableContinuationKt\n*L\n1#1,175:1\n314#2,11:176\n*S KotlinDebug\n*F\n+ 1 RoomDatabaseExt.kt\nandroidx/room/RoomDatabaseKt\n*L\n113#1:176,11\n*E\n"
.end annotation
.annotation runtime Lkotlin/Metadata;
d1 = {
"\u00000\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0008\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0008\u0004\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\u0008\u0002\u001a\u001d\u0010\u0000\u001a\u00020\u0001*\u00020\u00022\u0006\u0010\u0003\u001a\u00020\u0004H\u0082@\u00f8\u0001\u0000\u00a2\u0006\u0002\u0010\u0005\u001a\u0015\u0010\u0006\u001a\u00020\u0007*\u00020\u0008H\u0082@\u00f8\u0001\u0000\u00a2\u0006\u0002\u0010\t\u001a9\u0010\n\u001a\u0002H\u000b\"\u0004\u0008\u0000\u0010\u000b*\u00020\u00082\u001c\u0010\u000c\u001a\u0018\u0008\u0001\u0012\n\u0012\u0008\u0012\u0004\u0012\u0002H\u000b0\u000e\u0012\u0006\u0012\u0004\u0018\u00010\u000f0\rH\u0086@\u00f8\u0001\u0000\u00a2\u0006\u0002\u0010\u0010\u0082\u0002\u0004\n\u0002\u0008\u0019\u00a8\u0006\u0011"
}
d2 = {
"acquireTransactionThread",
"Lkotlin/coroutines/ContinuationInterceptor;",
"Ljava/util/concurrent/Executor;",
"controlJob",
"Lkotlinx/coroutines/Job;",
"(Ljava/util/concurrent/Executor;Lkotlinx/coroutines/Job;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;",
"createTransactionContext",
"Lkotlin/coroutines/CoroutineContext;",
"Landroidx/room/RoomDatabase;",
"(Landroidx/room/RoomDatabase;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;",
"withTransaction",
"R",
"block",
"Lkotlin/Function1;",
"Lkotlin/coroutines/Continuation;",
"",
"(Landroidx/room/RoomDatabase;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;",
"room-ktx_release"
}
k = 0x2
mv = {
0x1,
0x7,
0x1
}
xi = 0x30
.end annotation
# direct methods
.method public static final synthetic access$acquireTransactionThread(Ljava/util/concurrent/Executor;Lkotlinx/coroutines/Job;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
.locals 0
.line 1
invoke-static {p0, p1, p2}, Landroidx/room/RoomDatabaseKt;->acquireTransactionThread(Ljava/util/concurrent/Executor;Lkotlinx/coroutines/Job;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
move-result-object p0
return-object p0
.end method
.method public static final synthetic access$createTransactionContext(Landroidx/room/RoomDatabase;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
.locals 0
.line 1
invoke-static {p0, p1}, Landroidx/room/RoomDatabaseKt;->createTransactionContext(Landroidx/room/RoomDatabase;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
move-result-object p0
return-object p0
.end method
.method private static final acquireTransactionThread(Ljava/util/concurrent/Executor;Lkotlinx/coroutines/Job;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
.locals 3
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/util/concurrent/Executor;",
"Lkotlinx/coroutines/Job;",
"Lkotlin/coroutines/Continuation<",
"-",
"Lkotlin/coroutines/ContinuationInterceptor;",
">;)",
"Ljava/lang/Object;"
}
.end annotation
.line 177
new-instance v0, Lkotlinx/coroutines/CancellableContinuationImpl;
invoke-static {p2}, Lkotlin/coroutines/intrinsics/IntrinsicsKt;->intercepted(Lkotlin/coroutines/Continuation;)Lkotlin/coroutines/Continuation;
move-result-object v1
const/4 v2, 0x1
invoke-direct {v0, v1, v2}, Lkotlinx/coroutines/CancellableContinuationImpl;-><init>(Lkotlin/coroutines/Continuation;I)V
.line 183
invoke-virtual {v0}, Lkotlinx/coroutines/CancellableContinuationImpl;->initCancellability()V
.line 184
move-object v1, v0
check-cast v1, Lkotlinx/coroutines/CancellableContinuation;
.line 114
new-instance v2, Landroidx/room/RoomDatabaseKt$acquireTransactionThread$2$1;
invoke-direct {v2, p1}, Landroidx/room/RoomDatabaseKt$acquireTransactionThread$2$1;-><init>(Lkotlinx/coroutines/Job;)V
check-cast v2, Lkotlin/jvm/functions/Function1;
invoke-interface {v1, v2}, Lkotlinx/coroutines/CancellableContinuation;->invokeOnCancellation(Lkotlin/jvm/functions/Function1;)V
.line 121
:try_start_0
new-instance v2, Landroidx/room/RoomDatabaseKt$acquireTransactionThread$2$2;
invoke-direct {v2, v1, p1}, Landroidx/room/RoomDatabaseKt$acquireTransactionThread$2$2;-><init>(Lkotlinx/coroutines/CancellableContinuation;Lkotlinx/coroutines/Job;)V
check-cast v2, Ljava/lang/Runnable;
invoke-interface {p0, v2}, Ljava/util/concurrent/Executor;->execute(Ljava/lang/Runnable;)V
:try_end_0
.catch Ljava/util/concurrent/RejectedExecutionException; {:try_start_0 .. :try_end_0} :catch_0
goto :goto_0
:catch_0
move-exception p0
.line 131
new-instance p1, Ljava/lang/IllegalStateException;
const-string v2, "Unable to acquire a thread to perform the database transaction."
.line 132
check-cast p0, Ljava/lang/Throwable;
.line 131
invoke-direct {p1, v2, p0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
check-cast p1, Ljava/lang/Throwable;
.line 130
invoke-interface {v1, p1}, Lkotlinx/coroutines/CancellableContinuation;->cancel(Ljava/lang/Throwable;)Z
.line 185
:goto_0
invoke-virtual {v0}, Lkotlinx/coroutines/CancellableContinuationImpl;->getResult()Ljava/lang/Object;
move-result-object p0
.line 176
invoke-static {}, Lkotlin/coroutines/intrinsics/IntrinsicsKt;->getCOROUTINE_SUSPENDED()Ljava/lang/Object;
move-result-object p1
if-ne p0, p1, :cond_0
invoke-static {p2}, Lkotlin/coroutines/jvm/internal/DebugProbesKt;->probeCoroutineSuspended(Lkotlin/coroutines/Continuation;)V
:cond_0
return-object p0
.end method
.method private static final createTransactionContext(Landroidx/room/RoomDatabase;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
.locals 6
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Landroidx/room/RoomDatabase;",
"Lkotlin/coroutines/Continuation<",
"-",
"Lkotlin/coroutines/CoroutineContext;",
">;)",
"Ljava/lang/Object;"
}
.end annotation
instance-of v0, p1, Landroidx/room/RoomDatabaseKt$createTransactionContext$1;
if-eqz v0, :cond_0
move-object v0, p1
check-cast v0, Landroidx/room/RoomDatabaseKt$createTransactionContext$1;
iget v1, v0, Landroidx/room/RoomDatabaseKt$createTransactionContext$1;->label:I
const/high16 v2, -0x80000000
and-int/2addr v1, v2
if-eqz v1, :cond_0
iget p1, v0, Landroidx/room/RoomDatabaseKt$createTransactionContext$1;->label:I
sub-int/2addr p1, v2
iput p1, v0, Landroidx/room/RoomDatabaseKt$createTransactionContext$1;->label:I
goto :goto_0
:cond_0
new-instance v0, Landroidx/room/RoomDatabaseKt$createTransactionContext$1;
invoke-direct {v0, p1}, Landroidx/room/RoomDatabaseKt$createTransactionContext$1;-><init>(Lkotlin/coroutines/Continuation;)V
:goto_0
iget-object p1, v0, Landroidx/room/RoomDatabaseKt$createTransactionContext$1;->result:Ljava/lang/Object;
invoke-static {}, Lkotlin/coroutines/intrinsics/IntrinsicsKt;->getCOROUTINE_SUSPENDED()Ljava/lang/Object;
move-result-object v1
.line 91
iget v2, v0, Landroidx/room/RoomDatabaseKt$createTransactionContext$1;->label:I
const/4 v3, 0x1
if-eqz v2, :cond_2
if-ne v2, v3, :cond_1
iget-object p0, v0, Landroidx/room/RoomDatabaseKt$createTransactionContext$1;->L$1:Ljava/lang/Object;
check-cast p0, Lkotlinx/coroutines/CompletableJob;
iget-object v0, v0, Landroidx/room/RoomDatabaseKt$createTransactionContext$1;->L$0:Ljava/lang/Object;
check-cast v0, Landroidx/room/RoomDatabase;
invoke-static {p1}, Lkotlin/ResultKt;->throwOnFailure(Ljava/lang/Object;)V
goto :goto_1
:cond_1
new-instance p0, Ljava/lang/IllegalStateException;
const-string p1, "call to \'resume\' before \'invoke\' with coroutine"
invoke-direct {p0, p1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw p0
:cond_2
invoke-static {p1}, Lkotlin/ResultKt;->throwOnFailure(Ljava/lang/Object;)V
const/4 p1, 0x0
.line 92
invoke-static {p1, v3, p1}, Lkotlinx/coroutines/JobKt;->Job$default(Lkotlinx/coroutines/Job;ILjava/lang/Object;)Lkotlinx/coroutines/CompletableJob;
move-result-object p1
.line 97
invoke-interface {v0}, Lkotlin/coroutines/Continuation;->getContext()Lkotlin/coroutines/CoroutineContext;
move-result-object v2
sget-object v4, Lkotlinx/coroutines/Job;->Key:Lkotlinx/coroutines/Job$Key;
check-cast v4, Lkotlin/coroutines/CoroutineContext$Key;
invoke-interface {v2, v4}, Lkotlin/coroutines/CoroutineContext;->get(Lkotlin/coroutines/CoroutineContext$Key;)Lkotlin/coroutines/CoroutineContext$Element;
move-result-object v2
check-cast v2, Lkotlinx/coroutines/Job;
if-eqz v2, :cond_3
new-instance v4, Landroidx/room/RoomDatabaseKt$createTransactionContext$2;
invoke-direct {v4, p1}, Landroidx/room/RoomDatabaseKt$createTransactionContext$2;-><init>(Lkotlinx/coroutines/CompletableJob;)V
check-cast v4, Lkotlin/jvm/functions/Function1;
invoke-interface {v2, v4}, Lkotlinx/coroutines/Job;->invokeOnCompletion(Lkotlin/jvm/functions/Function1;)Lkotlinx/coroutines/DisposableHandle;
.line 100
:cond_3
invoke-virtual {p0}, Landroidx/room/RoomDatabase;->getTransactionExecutor()Ljava/util/concurrent/Executor;
move-result-object v2
move-object v4, p1
check-cast v4, Lkotlinx/coroutines/Job;
iput-object p0, v0, Landroidx/room/RoomDatabaseKt$createTransactionContext$1;->L$0:Ljava/lang/Object;
iput-object p1, v0, Landroidx/room/RoomDatabaseKt$createTransactionContext$1;->L$1:Ljava/lang/Object;
iput v3, v0, Landroidx/room/RoomDatabaseKt$createTransactionContext$1;->label:I
invoke-static {v2, v4, v0}, Landroidx/room/RoomDatabaseKt;->acquireTransactionThread(Ljava/util/concurrent/Executor;Lkotlinx/coroutines/Job;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
move-result-object v0
if-ne v0, v1, :cond_4
return-object v1
:cond_4
move-object v5, v0
move-object v0, p0
move-object p0, p1
move-object p1, v5
.line 91
:goto_1
check-cast p1, Lkotlin/coroutines/ContinuationInterceptor;
.line 101
new-instance v1, Landroidx/room/TransactionElement;
move-object v2, p0
check-cast v2, Lkotlinx/coroutines/Job;
invoke-direct {v1, v2, p1}, Landroidx/room/TransactionElement;-><init>(Lkotlinx/coroutines/Job;Lkotlin/coroutines/ContinuationInterceptor;)V
.line 103
invoke-virtual {v0}, Landroidx/room/RoomDatabase;->getSuspendingTransactionId()Ljava/lang/ThreadLocal;
move-result-object v0
invoke-static {p0}, Ljava/lang/System;->identityHashCode(Ljava/lang/Object;)I
move-result p0
invoke-static {p0}, Lkotlin/coroutines/jvm/internal/Boxing;->boxInt(I)Ljava/lang/Integer;
move-result-object p0
invoke-static {v0, p0}, Lkotlinx/coroutines/ThreadContextElementKt;->asContextElement(Ljava/lang/ThreadLocal;Ljava/lang/Object;)Lkotlinx/coroutines/ThreadContextElement;
move-result-object p0
.line 104
check-cast v1, Lkotlin/coroutines/CoroutineContext;
invoke-interface {p1, v1}, Lkotlin/coroutines/ContinuationInterceptor;->plus(Lkotlin/coroutines/CoroutineContext;)Lkotlin/coroutines/CoroutineContext;
move-result-object p1
check-cast p0, Lkotlin/coroutines/CoroutineContext;
invoke-interface {p1, p0}, Lkotlin/coroutines/CoroutineContext;->plus(Lkotlin/coroutines/CoroutineContext;)Lkotlin/coroutines/CoroutineContext;
move-result-object p0
return-object p0
.end method
.method public static final withTransaction(Landroidx/room/RoomDatabase;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
.locals 5
.annotation system Ldalvik/annotation/Signature;
value = {
"<R:",
"Ljava/lang/Object;",
">(",
"Landroidx/room/RoomDatabase;",
"Lkotlin/jvm/functions/Function1<",
"-",
"Lkotlin/coroutines/Continuation<",
"-TR;>;+",
"Ljava/lang/Object;",
">;",
"Lkotlin/coroutines/Continuation<",
"-TR;>;)",
"Ljava/lang/Object;"
}
.end annotation
instance-of v0, p2, Landroidx/room/RoomDatabaseKt$withTransaction$1;
if-eqz v0, :cond_0
move-object v0, p2
check-cast v0, Landroidx/room/RoomDatabaseKt$withTransaction$1;
iget v1, v0, Landroidx/room/RoomDatabaseKt$withTransaction$1;->label:I
const/high16 v2, -0x80000000
and-int/2addr v1, v2
if-eqz v1, :cond_0
iget p2, v0, Landroidx/room/RoomDatabaseKt$withTransaction$1;->label:I
sub-int/2addr p2, v2
iput p2, v0, Landroidx/room/RoomDatabaseKt$withTransaction$1;->label:I
goto :goto_0
:cond_0
new-instance v0, Landroidx/room/RoomDatabaseKt$withTransaction$1;
invoke-direct {v0, p2}, Landroidx/room/RoomDatabaseKt$withTransaction$1;-><init>(Lkotlin/coroutines/Continuation;)V
:goto_0
iget-object p2, v0, Landroidx/room/RoomDatabaseKt$withTransaction$1;->result:Ljava/lang/Object;
invoke-static {}, Lkotlin/coroutines/intrinsics/IntrinsicsKt;->getCOROUTINE_SUSPENDED()Ljava/lang/Object;
move-result-object v1
.line 48
iget v2, v0, Landroidx/room/RoomDatabaseKt$withTransaction$1;->label:I
const/4 v3, 0x2
const/4 v4, 0x1
if-eqz v2, :cond_3
if-eq v2, v4, :cond_2
if-ne v2, v3, :cond_1
invoke-static {p2}, Lkotlin/ResultKt;->throwOnFailure(Ljava/lang/Object;)V
goto :goto_3
:cond_1
new-instance p0, Ljava/lang/IllegalStateException;
const-string p1, "call to \'resume\' before \'invoke\' with coroutine"
invoke-direct {p0, p1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw p0
:cond_2
iget-object p0, v0, Landroidx/room/RoomDatabaseKt$withTransaction$1;->L$1:Ljava/lang/Object;
move-object p1, p0
check-cast p1, Lkotlin/jvm/functions/Function1;
iget-object p0, v0, Landroidx/room/RoomDatabaseKt$withTransaction$1;->L$0:Ljava/lang/Object;
check-cast p0, Landroidx/room/RoomDatabase;
invoke-static {p2}, Lkotlin/ResultKt;->throwOnFailure(Ljava/lang/Object;)V
goto :goto_1
:cond_3
invoke-static {p2}, Lkotlin/ResultKt;->throwOnFailure(Ljava/lang/Object;)V
.line 51
invoke-interface {v0}, Lkotlin/coroutines/Continuation;->getContext()Lkotlin/coroutines/CoroutineContext;
move-result-object p2
sget-object v2, Landroidx/room/TransactionElement;->Key:Landroidx/room/TransactionElement$Key;
check-cast v2, Lkotlin/coroutines/CoroutineContext$Key;
invoke-interface {p2, v2}, Lkotlin/coroutines/CoroutineContext;->get(Lkotlin/coroutines/CoroutineContext$Key;)Lkotlin/coroutines/CoroutineContext$Element;
move-result-object p2
check-cast p2, Landroidx/room/TransactionElement;
if-eqz p2, :cond_4
invoke-virtual {p2}, Landroidx/room/TransactionElement;->getTransactionDispatcher$room_ktx_release()Lkotlin/coroutines/ContinuationInterceptor;
move-result-object p2
if-eqz p2, :cond_4
check-cast p2, Lkotlin/coroutines/CoroutineContext;
goto :goto_2
:cond_4
iput-object p0, v0, Landroidx/room/RoomDatabaseKt$withTransaction$1;->L$0:Ljava/lang/Object;
iput-object p1, v0, Landroidx/room/RoomDatabaseKt$withTransaction$1;->L$1:Ljava/lang/Object;
iput v4, v0, Landroidx/room/RoomDatabaseKt$withTransaction$1;->label:I
invoke-static {p0, v0}, Landroidx/room/RoomDatabaseKt;->createTransactionContext(Landroidx/room/RoomDatabase;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
move-result-object p2
if-ne p2, v1, :cond_5
return-object v1
.line 48
:cond_5
:goto_1
check-cast p2, Lkotlin/coroutines/CoroutineContext;
.line 52
:goto_2
new-instance v2, Landroidx/room/RoomDatabaseKt$withTransaction$2;
const/4 v4, 0x0
invoke-direct {v2, p0, p1, v4}, Landroidx/room/RoomDatabaseKt$withTransaction$2;-><init>(Landroidx/room/RoomDatabase;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)V
check-cast v2, Lkotlin/jvm/functions/Function2;
iput-object v4, v0, Landroidx/room/RoomDatabaseKt$withTransaction$1;->L$0:Ljava/lang/Object;
iput-object v4, v0, Landroidx/room/RoomDatabaseKt$withTransaction$1;->L$1:Ljava/lang/Object;
iput v3, v0, Landroidx/room/RoomDatabaseKt$withTransaction$1;->label:I
invoke-static {p2, v2, v0}, Lkotlinx/coroutines/BuildersKt;->withContext(Lkotlin/coroutines/CoroutineContext;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
move-result-object p2
if-ne p2, v1, :cond_6
return-object v1
:cond_6
:goto_3
return-object p2
.end method