apkfuckery/com.discord/smali/androidx/work/OperationKt.smali
2019-05-09 00:54:48 +02:00

270 lines
6.9 KiB
Smali

.class public final Landroidx/work/OperationKt;
.super Ljava/lang/Object;
.source "Operation.kt"
# direct methods
.method public static final await(Landroidx/work/Operation;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
.locals 4
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Landroidx/work/Operation;",
"Lkotlin/coroutines/Continuation<",
"-",
"Landroidx/work/Operation$State$SUCCESS;",
">;)",
"Ljava/lang/Object;"
}
.end annotation
instance-of v0, p1, Landroidx/work/OperationKt$await$1;
if-eqz v0, :cond_0
move-object v0, p1
check-cast v0, Landroidx/work/OperationKt$await$1;
iget v1, v0, Landroidx/work/OperationKt$await$1;->label:I
const/high16 v2, -0x80000000
and-int/2addr v1, v2
if-eqz v1, :cond_0
iget p1, v0, Landroidx/work/OperationKt$await$1;->label:I
sub-int/2addr p1, v2
iput p1, v0, Landroidx/work/OperationKt$await$1;->label:I
goto :goto_0
:cond_0
new-instance v0, Landroidx/work/OperationKt$await$1;
invoke-direct {v0, p1}, Landroidx/work/OperationKt$await$1;-><init>(Lkotlin/coroutines/Continuation;)V
:goto_0
iget-object p1, v0, Landroidx/work/OperationKt$await$1;->result:Ljava/lang/Object;
sget-object v1, Lkotlin/coroutines/a/a;->bfm:Lkotlin/coroutines/a/a;
iget v2, v0, Landroidx/work/OperationKt$await$1;->label:I
const/4 v3, 0x1
if-eqz v2, :cond_3
if-ne v2, v3, :cond_2
instance-of p0, p1, Lkotlin/m$b;
if-nez p0, :cond_1
goto :goto_1
:cond_1
check-cast p1, Lkotlin/m$b;
iget-object p0, p1, Lkotlin/m$b;->exception:Ljava/lang/Throwable;
throw p0
:cond_2
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_3
instance-of v2, p1, Lkotlin/m$b;
if-nez v2, :cond_8
invoke-interface {p0}, Landroidx/work/Operation;->getResult()Lcom/google/a/a/a/a;
move-result-object p1
const-string v2, "result"
invoke-static {p1, v2}, Lkotlin/jvm/internal/j;->g(Ljava/lang/Object;Ljava/lang/String;)V
invoke-interface {p1}, Lcom/google/a/a/a/a;->isDone()Z
move-result v2
if-eqz v2, :cond_5
:try_start_0
invoke-interface {p1}, Lcom/google/a/a/a/a;->get()Ljava/lang/Object;
move-result-object p0
:try_end_0
.catch Ljava/util/concurrent/ExecutionException; {:try_start_0 .. :try_end_0} :catch_0
return-object p0
:catch_0
move-exception p0
invoke-virtual {p0}, Ljava/util/concurrent/ExecutionException;->getCause()Ljava/lang/Throwable;
move-result-object p1
if-nez p1, :cond_4
move-object p1, p0
check-cast p1, Ljava/lang/Throwable;
:cond_4
throw p1
:cond_5
iput-object p0, v0, Landroidx/work/OperationKt$await$1;->L$0:Ljava/lang/Object;
iput-object p1, v0, Landroidx/work/OperationKt$await$1;->L$1:Ljava/lang/Object;
iput v3, v0, Landroidx/work/OperationKt$await$1;->label:I
new-instance p0, Lkotlinx/coroutines/i;
invoke-static {v0}, Lkotlin/coroutines/a/b;->c(Lkotlin/coroutines/Continuation;)Lkotlin/coroutines/Continuation;
move-result-object v2
invoke-direct {p0, v2}, Lkotlinx/coroutines/i;-><init>(Lkotlin/coroutines/Continuation;)V
move-object v2, p0
check-cast v2, Lkotlinx/coroutines/h;
new-instance v3, Landroidx/work/OperationKt$await$$inlined$suspendCancellableCoroutine$lambda$1;
invoke-direct {v3, v2, p1}, Landroidx/work/OperationKt$await$$inlined$suspendCancellableCoroutine$lambda$1;-><init>(Lkotlinx/coroutines/h;Lcom/google/a/a/a/a;)V
check-cast v3, Ljava/lang/Runnable;
sget-object v2, Landroidx/work/DirectExecutor;->INSTANCE:Landroidx/work/DirectExecutor;
check-cast v2, Ljava/util/concurrent/Executor;
invoke-interface {p1, v3, v2}, Lcom/google/a/a/a/a;->addListener(Ljava/lang/Runnable;Ljava/util/concurrent/Executor;)V
invoke-virtual {p0}, Lkotlinx/coroutines/i;->getResult()Ljava/lang/Object;
move-result-object p1
sget-object p0, Lkotlin/coroutines/a/a;->bfm:Lkotlin/coroutines/a/a;
if-ne p1, p0, :cond_6
const-string p0, "frame"
invoke-static {v0, p0}, Lkotlin/jvm/internal/j;->h(Ljava/lang/Object;Ljava/lang/String;)V
:cond_6
if-ne p1, v1, :cond_7
return-object v1
:cond_7
:goto_1
return-object p1
:cond_8
check-cast p1, Lkotlin/m$b;
iget-object p0, p1, Lkotlin/m$b;->exception:Ljava/lang/Throwable;
throw p0
.end method
.method private static final await$$forInline(Landroidx/work/Operation;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
.locals 3
invoke-interface {p0}, Landroidx/work/Operation;->getResult()Lcom/google/a/a/a/a;
move-result-object p0
const-string v0, "result"
invoke-static {p0, v0}, Lkotlin/jvm/internal/j;->g(Ljava/lang/Object;Ljava/lang/String;)V
invoke-interface {p0}, Lcom/google/a/a/a/a;->isDone()Z
move-result v0
if-eqz v0, :cond_1
:try_start_0
invoke-interface {p0}, Lcom/google/a/a/a/a;->get()Ljava/lang/Object;
move-result-object p0
:try_end_0
.catch Ljava/util/concurrent/ExecutionException; {:try_start_0 .. :try_end_0} :catch_0
return-object p0
:catch_0
move-exception p0
invoke-virtual {p0}, Ljava/util/concurrent/ExecutionException;->getCause()Ljava/lang/Throwable;
move-result-object p1
if-nez p1, :cond_0
move-object p1, p0
check-cast p1, Ljava/lang/Throwable;
:cond_0
throw p1
:cond_1
new-instance v0, Lkotlinx/coroutines/i;
invoke-static {p1}, Lkotlin/coroutines/a/b;->c(Lkotlin/coroutines/Continuation;)Lkotlin/coroutines/Continuation;
move-result-object v1
invoke-direct {v0, v1}, Lkotlinx/coroutines/i;-><init>(Lkotlin/coroutines/Continuation;)V
move-object v1, v0
check-cast v1, Lkotlinx/coroutines/h;
new-instance v2, Landroidx/work/OperationKt$await$$inlined$suspendCancellableCoroutine$lambda$1;
invoke-direct {v2, v1, p0}, Landroidx/work/OperationKt$await$$inlined$suspendCancellableCoroutine$lambda$1;-><init>(Lkotlinx/coroutines/h;Lcom/google/a/a/a/a;)V
check-cast v2, Ljava/lang/Runnable;
sget-object v1, Landroidx/work/DirectExecutor;->INSTANCE:Landroidx/work/DirectExecutor;
check-cast v1, Ljava/util/concurrent/Executor;
invoke-interface {p0, v2, v1}, Lcom/google/a/a/a/a;->addListener(Ljava/lang/Runnable;Ljava/util/concurrent/Executor;)V
invoke-virtual {v0}, Lkotlinx/coroutines/i;->getResult()Ljava/lang/Object;
move-result-object p0
sget-object v0, Lkotlin/coroutines/a/a;->bfm:Lkotlin/coroutines/a/a;
if-ne p0, v0, :cond_2
const-string v0, "frame"
invoke-static {p1, v0}, Lkotlin/jvm/internal/j;->h(Ljava/lang/Object;Ljava/lang/String;)V
:cond_2
return-object p0
.end method