222 lines
7 KiB
Smali
222 lines
7 KiB
Smali
.class public abstract Landroidx/work/CoroutineWorker;
|
|
.super Landroidx/work/ListenableWorker;
|
|
.source "CoroutineWorker.kt"
|
|
|
|
|
|
# instance fields
|
|
.field private final coroutineContext:Lkotlinx/coroutines/y;
|
|
|
|
.field private 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 private final job:Lkotlinx/coroutines/Job;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Landroid/content/Context;Landroidx/work/WorkerParameters;)V
|
|
.locals 2
|
|
|
|
const-string v0, "appContext"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/k;->h(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v0, "params"
|
|
|
|
invoke-static {p2, v0}, Lkotlin/jvm/internal/k;->h(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-direct {p0, p1, p2}, Landroidx/work/ListenableWorker;-><init>(Landroid/content/Context;Landroidx/work/WorkerParameters;)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
invoke-static {p1}, Lkotlinx/coroutines/bg;->b(Lkotlinx/coroutines/Job;)Lkotlinx/coroutines/p;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Lkotlinx/coroutines/Job;
|
|
|
|
iput-object p1, p0, Landroidx/work/CoroutineWorker;->job:Lkotlinx/coroutines/Job;
|
|
|
|
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}, Lkotlin/jvm/internal/k;->g(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
iput-object p1, p0, Landroidx/work/CoroutineWorker;->future:Landroidx/work/impl/utils/futures/SettableFuture;
|
|
|
|
iget-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
|
|
|
|
check-cast p2, Ljava/lang/Runnable;
|
|
|
|
invoke-virtual {p0}, Landroidx/work/CoroutineWorker;->getTaskExecutor()Landroidx/work/impl/utils/taskexecutor/TaskExecutor;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "taskExecutor"
|
|
|
|
invoke-static {v0, v1}, Lkotlin/jvm/internal/k;->g(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-interface {v0}, Landroidx/work/impl/utils/taskexecutor/TaskExecutor;->getBackgroundExecutor()Ljava/util/concurrent/Executor;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p1, p2, v0}, Landroidx/work/impl/utils/futures/SettableFuture;->addListener(Ljava/lang/Runnable;Ljava/util/concurrent/Executor;)V
|
|
|
|
invoke-static {}, Lkotlinx/coroutines/ao;->EM()Lkotlinx/coroutines/y;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Landroidx/work/CoroutineWorker;->coroutineContext:Lkotlinx/coroutines/y;
|
|
|
|
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()Lkotlinx/coroutines/y;
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Landroidx/work/CoroutineWorker;->coroutineContext:Lkotlinx/coroutines/y;
|
|
|
|
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()Lkotlinx/coroutines/Job;
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Landroidx/work/CoroutineWorker;->job:Lkotlinx/coroutines/Job;
|
|
|
|
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/SettableFuture;->cancel(Z)Z
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final startWork()Lcom/google/a/a/a/a;
|
|
.locals 4
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Lcom/google/a/a/a/a<",
|
|
"Landroidx/work/ListenableWorker$Result;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
invoke-virtual {p0}, Landroidx/work/CoroutineWorker;->getCoroutineContext()Lkotlinx/coroutines/y;
|
|
|
|
move-result-object v0
|
|
|
|
iget-object v1, p0, Landroidx/work/CoroutineWorker;->job:Lkotlinx/coroutines/Job;
|
|
|
|
check-cast v1, Lkotlin/coroutines/CoroutineContext;
|
|
|
|
invoke-virtual {v0, v1}, Lkotlinx/coroutines/y;->plus(Lkotlin/coroutines/CoroutineContext;)Lkotlin/coroutines/CoroutineContext;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "context"
|
|
|
|
invoke-static {v0, v1}, Lkotlin/jvm/internal/k;->h(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
new-instance v1, Lkotlinx/coroutines/internal/f;
|
|
|
|
sget-object v2, Lkotlinx/coroutines/Job;->blB:Lkotlinx/coroutines/Job$b;
|
|
|
|
check-cast v2, Lkotlin/coroutines/CoroutineContext$c;
|
|
|
|
invoke-interface {v0, v2}, Lkotlin/coroutines/CoroutineContext;->get(Lkotlin/coroutines/CoroutineContext$c;)Lkotlin/coroutines/CoroutineContext$b;
|
|
|
|
move-result-object v2
|
|
|
|
const/4 v3, 0x0
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
invoke-static {v3}, Lkotlinx/coroutines/bg;->b(Lkotlinx/coroutines/Job;)Lkotlinx/coroutines/p;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Lkotlin/coroutines/CoroutineContext;
|
|
|
|
invoke-interface {v0, v2}, Lkotlin/coroutines/CoroutineContext;->plus(Lkotlin/coroutines/CoroutineContext;)Lkotlin/coroutines/CoroutineContext;
|
|
|
|
move-result-object v0
|
|
|
|
:goto_0
|
|
invoke-direct {v1, v0}, Lkotlinx/coroutines/internal/f;-><init>(Lkotlin/coroutines/CoroutineContext;)V
|
|
|
|
check-cast v1, Lkotlinx/coroutines/CoroutineScope;
|
|
|
|
new-instance v0, Landroidx/work/CoroutineWorker$startWork$1;
|
|
|
|
invoke-direct {v0, p0, v3}, Landroidx/work/CoroutineWorker$startWork$1;-><init>(Landroidx/work/CoroutineWorker;Lkotlin/coroutines/Continuation;)V
|
|
|
|
check-cast v0, Lkotlin/jvm/functions/Function2;
|
|
|
|
const/4 v2, 0x3
|
|
|
|
invoke-static {v1, v3, v0, v2}, Lkotlinx/coroutines/d;->a(Lkotlinx/coroutines/CoroutineScope;Lkotlin/coroutines/CoroutineContext;Lkotlin/jvm/functions/Function2;I)Lkotlinx/coroutines/Job;
|
|
|
|
iget-object v0, p0, Landroidx/work/CoroutineWorker;->future:Landroidx/work/impl/utils/futures/SettableFuture;
|
|
|
|
check-cast v0, Lcom/google/a/a/a/a;
|
|
|
|
return-object v0
|
|
.end method
|