374 lines
10 KiB
Smali
374 lines
10 KiB
Smali
.class public abstract Landroidx/work/CoroutineWorker;
|
|
.super Landroidx/work/ListenableWorker;
|
|
.source "CoroutineWorker.kt"
|
|
|
|
|
|
# instance fields
|
|
.field public final coroutineContext:Lk0/a/v;
|
|
|
|
.field public final future:Landroidx/work/impl/utils/futures/SettableFuture;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Landroidx/work/impl/utils/futures/SettableFuture<",
|
|
"Landroidx/work/ListenableWorker$Result;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public final job:Lk0/a/o;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Landroid/content/Context;Landroidx/work/WorkerParameters;)V
|
|
.locals 2
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
invoke-direct {p0, p1, p2}, Landroidx/work/ListenableWorker;-><init>(Landroid/content/Context;Landroidx/work/WorkerParameters;)V
|
|
|
|
new-instance p1, Lk0/a/a1;
|
|
|
|
invoke-direct {p1, v0}, Lk0/a/a1;-><init>(Lkotlinx/coroutines/Job;)V
|
|
|
|
iput-object p1, p0, Landroidx/work/CoroutineWorker;->job:Lk0/a/o;
|
|
|
|
invoke-static {}, Landroidx/work/impl/utils/futures/SettableFuture;->create()Landroidx/work/impl/utils/futures/SettableFuture;
|
|
|
|
move-result-object p1
|
|
|
|
const-string p2, "SettableFuture.create()"
|
|
|
|
invoke-static {p1, p2}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
iput-object p1, p0, Landroidx/work/CoroutineWorker;->future:Landroidx/work/impl/utils/futures/SettableFuture;
|
|
|
|
new-instance p2, Landroidx/work/CoroutineWorker$1;
|
|
|
|
invoke-direct {p2, p0}, Landroidx/work/CoroutineWorker$1;-><init>(Landroidx/work/CoroutineWorker;)V
|
|
|
|
invoke-virtual {p0}, Landroidx/work/ListenableWorker;->getTaskExecutor()Landroidx/work/impl/utils/taskexecutor/TaskExecutor;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "taskExecutor"
|
|
|
|
invoke-static {v0, v1}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-interface {v0}, Landroidx/work/impl/utils/taskexecutor/TaskExecutor;->getBackgroundExecutor()Landroidx/work/impl/utils/SerialExecutor;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p1, p2, v0}, Landroidx/work/impl/utils/futures/AbstractFuture;->addListener(Ljava/lang/Runnable;Ljava/util/concurrent/Executor;)V
|
|
|
|
sget-object p1, Lk0/a/j0;->a:Lk0/a/v;
|
|
|
|
iput-object p1, p0, Landroidx/work/CoroutineWorker;->coroutineContext:Lk0/a/v;
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const-string p1, "params"
|
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_1
|
|
const-string p1, "appContext"
|
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public static synthetic coroutineContext$annotations()V
|
|
.locals 0
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public abstract doWork(Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Lkotlin/coroutines/Continuation<",
|
|
"-",
|
|
"Landroidx/work/ListenableWorker$Result;",
|
|
">;)",
|
|
"Ljava/lang/Object;"
|
|
}
|
|
.end annotation
|
|
.end method
|
|
|
|
.method public getCoroutineContext()Lk0/a/v;
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Landroidx/work/CoroutineWorker;->coroutineContext:Lk0/a/v;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final getFuture$work_runtime_ktx_release()Landroidx/work/impl/utils/futures/SettableFuture;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Landroidx/work/impl/utils/futures/SettableFuture<",
|
|
"Landroidx/work/ListenableWorker$Result;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Landroidx/work/CoroutineWorker;->future:Landroidx/work/impl/utils/futures/SettableFuture;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final getJob$work_runtime_ktx_release()Lk0/a/o;
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Landroidx/work/CoroutineWorker;->job:Lk0/a/o;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final onStopped()V
|
|
.locals 2
|
|
|
|
invoke-super {p0}, Landroidx/work/ListenableWorker;->onStopped()V
|
|
|
|
iget-object v0, p0, Landroidx/work/CoroutineWorker;->future:Landroidx/work/impl/utils/futures/SettableFuture;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-virtual {v0, v1}, Landroidx/work/impl/utils/futures/AbstractFuture;->cancel(Z)Z
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final setForeground(Landroidx/work/ForegroundInfo;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
|
.locals 3
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Landroidx/work/ForegroundInfo;",
|
|
"Lkotlin/coroutines/Continuation<",
|
|
"-",
|
|
"Lkotlin/Unit;",
|
|
">;)",
|
|
"Ljava/lang/Object;"
|
|
}
|
|
.end annotation
|
|
|
|
sget-object v0, Lj0/k/g/a;->d:Lj0/k/g/a;
|
|
|
|
invoke-virtual {p0, p1}, Landroidx/work/ListenableWorker;->setForegroundAsync(Landroidx/work/ForegroundInfo;)Lf/h/b/a/a/a;
|
|
|
|
move-result-object p1
|
|
|
|
const-string v1, "setForegroundAsync(foregroundInfo)"
|
|
|
|
invoke-static {p1, v1}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-interface {p1}, Ljava/util/concurrent/Future;->isDone()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
:try_start_0
|
|
invoke-interface {p1}, Ljava/util/concurrent/Future;->get()Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
:try_end_0
|
|
.catch Ljava/util/concurrent/ExecutionException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
goto :goto_0
|
|
|
|
:catch_0
|
|
move-exception p1
|
|
|
|
invoke-virtual {p1}, Ljava/util/concurrent/ExecutionException;->getCause()Ljava/lang/Throwable;
|
|
|
|
move-result-object p2
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
move-object p1, p2
|
|
|
|
:cond_0
|
|
throw p1
|
|
|
|
:cond_1
|
|
new-instance v1, Lk0/a/g;
|
|
|
|
invoke-static {p2}, Lf/n/a/k/a;->intercepted(Lkotlin/coroutines/Continuation;)Lkotlin/coroutines/Continuation;
|
|
|
|
move-result-object p2
|
|
|
|
const/4 v2, 0x1
|
|
|
|
invoke-direct {v1, p2, v2}, Lk0/a/g;-><init>(Lkotlin/coroutines/Continuation;I)V
|
|
|
|
new-instance p2, Landroidx/work/CoroutineWorker$await$$inlined$suspendCancellableCoroutine$lambda$2;
|
|
|
|
invoke-direct {p2, v1, p1}, Landroidx/work/CoroutineWorker$await$$inlined$suspendCancellableCoroutine$lambda$2;-><init>(Lk0/a/f;Lf/h/b/a/a/a;)V
|
|
|
|
sget-object v2, Landroidx/work/DirectExecutor;->INSTANCE:Landroidx/work/DirectExecutor;
|
|
|
|
invoke-interface {p1, p2, v2}, Lf/h/b/a/a/a;->addListener(Ljava/lang/Runnable;Ljava/util/concurrent/Executor;)V
|
|
|
|
invoke-virtual {v1}, Lk0/a/g;->k()Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
|
|
:goto_0
|
|
if-ne p1, v0, :cond_2
|
|
|
|
return-object p1
|
|
|
|
:cond_2
|
|
sget-object p1, Lkotlin/Unit;->a:Lkotlin/Unit;
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public final setProgress(Landroidx/work/Data;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
|
.locals 3
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Landroidx/work/Data;",
|
|
"Lkotlin/coroutines/Continuation<",
|
|
"-",
|
|
"Lkotlin/Unit;",
|
|
">;)",
|
|
"Ljava/lang/Object;"
|
|
}
|
|
.end annotation
|
|
|
|
sget-object v0, Lj0/k/g/a;->d:Lj0/k/g/a;
|
|
|
|
invoke-virtual {p0, p1}, Landroidx/work/ListenableWorker;->setProgressAsync(Landroidx/work/Data;)Lf/h/b/a/a/a;
|
|
|
|
move-result-object p1
|
|
|
|
const-string v1, "setProgressAsync(data)"
|
|
|
|
invoke-static {p1, v1}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-interface {p1}, Ljava/util/concurrent/Future;->isDone()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
:try_start_0
|
|
invoke-interface {p1}, Ljava/util/concurrent/Future;->get()Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
:try_end_0
|
|
.catch Ljava/util/concurrent/ExecutionException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
goto :goto_0
|
|
|
|
:catch_0
|
|
move-exception p1
|
|
|
|
invoke-virtual {p1}, Ljava/util/concurrent/ExecutionException;->getCause()Ljava/lang/Throwable;
|
|
|
|
move-result-object p2
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
move-object p1, p2
|
|
|
|
:cond_0
|
|
throw p1
|
|
|
|
:cond_1
|
|
new-instance v1, Lk0/a/g;
|
|
|
|
invoke-static {p2}, Lf/n/a/k/a;->intercepted(Lkotlin/coroutines/Continuation;)Lkotlin/coroutines/Continuation;
|
|
|
|
move-result-object p2
|
|
|
|
const/4 v2, 0x1
|
|
|
|
invoke-direct {v1, p2, v2}, Lk0/a/g;-><init>(Lkotlin/coroutines/Continuation;I)V
|
|
|
|
new-instance p2, Landroidx/work/CoroutineWorker$await$$inlined$suspendCancellableCoroutine$lambda$1;
|
|
|
|
invoke-direct {p2, v1, p1}, Landroidx/work/CoroutineWorker$await$$inlined$suspendCancellableCoroutine$lambda$1;-><init>(Lk0/a/f;Lf/h/b/a/a/a;)V
|
|
|
|
sget-object v2, Landroidx/work/DirectExecutor;->INSTANCE:Landroidx/work/DirectExecutor;
|
|
|
|
invoke-interface {p1, p2, v2}, Lf/h/b/a/a/a;->addListener(Ljava/lang/Runnable;Ljava/util/concurrent/Executor;)V
|
|
|
|
invoke-virtual {v1}, Lk0/a/g;->k()Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
|
|
:goto_0
|
|
if-ne p1, v0, :cond_2
|
|
|
|
return-object p1
|
|
|
|
:cond_2
|
|
sget-object p1, Lkotlin/Unit;->a:Lkotlin/Unit;
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public final startWork()Lf/h/b/a/a/a;
|
|
.locals 7
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Lf/h/b/a/a/a<",
|
|
"Landroidx/work/ListenableWorker$Result;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
invoke-virtual {p0}, Landroidx/work/CoroutineWorker;->getCoroutineContext()Lk0/a/v;
|
|
|
|
move-result-object v0
|
|
|
|
iget-object v1, p0, Landroidx/work/CoroutineWorker;->job:Lk0/a/o;
|
|
|
|
invoke-virtual {v0, v1}, Lj0/k/a;->plus(Lkotlin/coroutines/CoroutineContext;)Lkotlin/coroutines/CoroutineContext;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v0}, Lf/n/a/k/a;->a(Lkotlin/coroutines/CoroutineContext;)Lkotlinx/coroutines/CoroutineScope;
|
|
|
|
move-result-object v1
|
|
|
|
new-instance v4, Landroidx/work/CoroutineWorker$startWork$1;
|
|
|
|
const/4 v0, 0x0
|
|
|
|
invoke-direct {v4, p0, v0}, Landroidx/work/CoroutineWorker$startWork$1;-><init>(Landroidx/work/CoroutineWorker;Lkotlin/coroutines/Continuation;)V
|
|
|
|
const/4 v2, 0x0
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/4 v5, 0x3
|
|
|
|
const/4 v6, 0x0
|
|
|
|
invoke-static/range {v1 .. v6}, Lf/n/a/k/a;->M(Lkotlinx/coroutines/CoroutineScope;Lkotlin/coroutines/CoroutineContext;Lk0/a/z;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/Job;
|
|
|
|
iget-object v0, p0, Landroidx/work/CoroutineWorker;->future:Landroidx/work/impl/utils/futures/SettableFuture;
|
|
|
|
return-object v0
|
|
.end method
|