Rabbit-R1/original r1/smali/smali_classes2/androidx/loader/content/AsyncTaskLoader.smali
2024-05-21 17:08:36 -04:00

601 lines
18 KiB
Smali

.class public abstract Landroidx/loader/content/AsyncTaskLoader;
.super Landroidx/loader/content/Loader;
.source "AsyncTaskLoader.java"
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Landroidx/loader/content/AsyncTaskLoader$LoadTask;
}
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"<D:",
"Ljava/lang/Object;",
">",
"Landroidx/loader/content/Loader<",
"TD;>;"
}
.end annotation
# static fields
.field static final DEBUG:Z = false
.field static final TAG:Ljava/lang/String; = "AsyncTaskLoader"
# instance fields
.field volatile mCancellingTask:Landroidx/loader/content/AsyncTaskLoader$LoadTask;
.annotation system Ldalvik/annotation/Signature;
value = {
"Landroidx/loader/content/AsyncTaskLoader<",
"TD;>.",
"LoadTask;"
}
.end annotation
.end field
.field private final mExecutor:Ljava/util/concurrent/Executor;
.field mHandler:Landroid/os/Handler;
.field mLastLoadCompleteTime:J
.field volatile mTask:Landroidx/loader/content/AsyncTaskLoader$LoadTask;
.annotation system Ldalvik/annotation/Signature;
value = {
"Landroidx/loader/content/AsyncTaskLoader<",
"TD;>.",
"LoadTask;"
}
.end annotation
.end field
.field mUpdateThrottle:J
# direct methods
.method public constructor <init>(Landroid/content/Context;)V
.locals 1
.line 128
sget-object v0, Landroidx/loader/content/ModernAsyncTask;->THREAD_POOL_EXECUTOR:Ljava/util/concurrent/Executor;
invoke-direct {p0, p1, v0}, Landroidx/loader/content/AsyncTaskLoader;-><init>(Landroid/content/Context;Ljava/util/concurrent/Executor;)V
return-void
.end method
.method private constructor <init>(Landroid/content/Context;Ljava/util/concurrent/Executor;)V
.locals 2
.line 132
invoke-direct {p0, p1}, Landroidx/loader/content/Loader;-><init>(Landroid/content/Context;)V
const-wide/16 v0, -0x2710
iput-wide v0, p0, Landroidx/loader/content/AsyncTaskLoader;->mLastLoadCompleteTime:J
iput-object p2, p0, Landroidx/loader/content/AsyncTaskLoader;->mExecutor:Ljava/util/concurrent/Executor;
return-void
.end method
# virtual methods
.method public cancelLoadInBackground()V
.locals 0
return-void
.end method
.method dispatchOnCancelled(Landroidx/loader/content/AsyncTaskLoader$LoadTask;Ljava/lang/Object;)V
.locals 0
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Landroidx/loader/content/AsyncTaskLoader<",
"TD;>.",
"LoadTask;",
"TD;)V"
}
.end annotation
.line 233
invoke-virtual {p0, p2}, Landroidx/loader/content/AsyncTaskLoader;->onCanceled(Ljava/lang/Object;)V
iget-object p2, p0, Landroidx/loader/content/AsyncTaskLoader;->mCancellingTask:Landroidx/loader/content/AsyncTaskLoader$LoadTask;
if-ne p2, p1, :cond_0
.line 236
invoke-virtual {p0}, Landroidx/loader/content/AsyncTaskLoader;->rollbackContentChanged()V
.line 237
invoke-static {}, Landroid/os/SystemClock;->uptimeMillis()J
move-result-wide p1
iput-wide p1, p0, Landroidx/loader/content/AsyncTaskLoader;->mLastLoadCompleteTime:J
const/4 p1, 0x0
iput-object p1, p0, Landroidx/loader/content/AsyncTaskLoader;->mCancellingTask:Landroidx/loader/content/AsyncTaskLoader$LoadTask;
.line 240
invoke-virtual {p0}, Landroidx/loader/content/AsyncTaskLoader;->deliverCancellation()V
.line 241
invoke-virtual {p0}, Landroidx/loader/content/AsyncTaskLoader;->executePendingTask()V
:cond_0
return-void
.end method
.method dispatchOnLoadComplete(Landroidx/loader/content/AsyncTaskLoader$LoadTask;Ljava/lang/Object;)V
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Landroidx/loader/content/AsyncTaskLoader<",
"TD;>.",
"LoadTask;",
"TD;)V"
}
.end annotation
iget-object v0, p0, Landroidx/loader/content/AsyncTaskLoader;->mTask:Landroidx/loader/content/AsyncTaskLoader$LoadTask;
if-eq v0, p1, :cond_0
.line 248
invoke-virtual {p0, p1, p2}, Landroidx/loader/content/AsyncTaskLoader;->dispatchOnCancelled(Landroidx/loader/content/AsyncTaskLoader$LoadTask;Ljava/lang/Object;)V
goto :goto_0
.line 250
:cond_0
invoke-virtual {p0}, Landroidx/loader/content/AsyncTaskLoader;->isAbandoned()Z
move-result p1
if-eqz p1, :cond_1
.line 252
invoke-virtual {p0, p2}, Landroidx/loader/content/AsyncTaskLoader;->onCanceled(Ljava/lang/Object;)V
goto :goto_0
.line 254
:cond_1
invoke-virtual {p0}, Landroidx/loader/content/AsyncTaskLoader;->commitContentChanged()V
.line 255
invoke-static {}, Landroid/os/SystemClock;->uptimeMillis()J
move-result-wide v0
iput-wide v0, p0, Landroidx/loader/content/AsyncTaskLoader;->mLastLoadCompleteTime:J
const/4 p1, 0x0
iput-object p1, p0, Landroidx/loader/content/AsyncTaskLoader;->mTask:Landroidx/loader/content/AsyncTaskLoader$LoadTask;
.line 258
invoke-virtual {p0, p2}, Landroidx/loader/content/AsyncTaskLoader;->deliverResult(Ljava/lang/Object;)V
:goto_0
return-void
.end method
.method public dump(Ljava/lang/String;Ljava/io/FileDescriptor;Ljava/io/PrintWriter;[Ljava/lang/String;)V
.locals 4
.annotation runtime Ljava/lang/Deprecated;
.end annotation
.line 356
invoke-super {p0, p1, p2, p3, p4}, Landroidx/loader/content/Loader;->dump(Ljava/lang/String;Ljava/io/FileDescriptor;Ljava/io/PrintWriter;[Ljava/lang/String;)V
iget-object p2, p0, Landroidx/loader/content/AsyncTaskLoader;->mTask:Landroidx/loader/content/AsyncTaskLoader$LoadTask;
const-string p4, " waiting="
if-eqz p2, :cond_0
.line 358
invoke-virtual {p3, p1}, Ljava/io/PrintWriter;->print(Ljava/lang/String;)V
const-string p2, "mTask="
invoke-virtual {p3, p2}, Ljava/io/PrintWriter;->print(Ljava/lang/String;)V
iget-object p2, p0, Landroidx/loader/content/AsyncTaskLoader;->mTask:Landroidx/loader/content/AsyncTaskLoader$LoadTask;
invoke-virtual {p3, p2}, Ljava/io/PrintWriter;->print(Ljava/lang/Object;)V
.line 359
invoke-virtual {p3, p4}, Ljava/io/PrintWriter;->print(Ljava/lang/String;)V
iget-object p2, p0, Landroidx/loader/content/AsyncTaskLoader;->mTask:Landroidx/loader/content/AsyncTaskLoader$LoadTask;
iget-boolean p2, p2, Landroidx/loader/content/AsyncTaskLoader$LoadTask;->waiting:Z
invoke-virtual {p3, p2}, Ljava/io/PrintWriter;->println(Z)V
:cond_0
iget-object p2, p0, Landroidx/loader/content/AsyncTaskLoader;->mCancellingTask:Landroidx/loader/content/AsyncTaskLoader$LoadTask;
if-eqz p2, :cond_1
.line 362
invoke-virtual {p3, p1}, Ljava/io/PrintWriter;->print(Ljava/lang/String;)V
const-string p2, "mCancellingTask="
invoke-virtual {p3, p2}, Ljava/io/PrintWriter;->print(Ljava/lang/String;)V
iget-object p2, p0, Landroidx/loader/content/AsyncTaskLoader;->mCancellingTask:Landroidx/loader/content/AsyncTaskLoader$LoadTask;
invoke-virtual {p3, p2}, Ljava/io/PrintWriter;->print(Ljava/lang/Object;)V
.line 363
invoke-virtual {p3, p4}, Ljava/io/PrintWriter;->print(Ljava/lang/String;)V
iget-object p2, p0, Landroidx/loader/content/AsyncTaskLoader;->mCancellingTask:Landroidx/loader/content/AsyncTaskLoader$LoadTask;
iget-boolean p2, p2, Landroidx/loader/content/AsyncTaskLoader$LoadTask;->waiting:Z
invoke-virtual {p3, p2}, Ljava/io/PrintWriter;->println(Z)V
:cond_1
iget-wide v0, p0, Landroidx/loader/content/AsyncTaskLoader;->mUpdateThrottle:J
const-wide/16 v2, 0x0
cmp-long p2, v0, v2
if-eqz p2, :cond_2
.line 366
invoke-virtual {p3, p1}, Ljava/io/PrintWriter;->print(Ljava/lang/String;)V
const-string p1, "mUpdateThrottle="
invoke-virtual {p3, p1}, Ljava/io/PrintWriter;->print(Ljava/lang/String;)V
iget-wide p1, p0, Landroidx/loader/content/AsyncTaskLoader;->mUpdateThrottle:J
.line 367
invoke-static {p1, p2, p3}, Landroidx/core/util/TimeUtils;->formatDuration(JLjava/io/PrintWriter;)V
const-string p1, " mLastLoadCompleteTime="
.line 368
invoke-virtual {p3, p1}, Ljava/io/PrintWriter;->print(Ljava/lang/String;)V
iget-wide p0, p0, Landroidx/loader/content/AsyncTaskLoader;->mLastLoadCompleteTime:J
.line 370
invoke-static {}, Landroid/os/SystemClock;->uptimeMillis()J
move-result-wide v0
.line 369
invoke-static {p0, p1, v0, v1, p3}, Landroidx/core/util/TimeUtils;->formatDuration(JJLjava/io/PrintWriter;)V
.line 371
invoke-virtual {p3}, Ljava/io/PrintWriter;->println()V
:cond_2
return-void
.end method
.method executePendingTask()V
.locals 6
iget-object v0, p0, Landroidx/loader/content/AsyncTaskLoader;->mCancellingTask:Landroidx/loader/content/AsyncTaskLoader$LoadTask;
if-nez v0, :cond_2
iget-object v0, p0, Landroidx/loader/content/AsyncTaskLoader;->mTask:Landroidx/loader/content/AsyncTaskLoader$LoadTask;
if-eqz v0, :cond_2
iget-object v0, p0, Landroidx/loader/content/AsyncTaskLoader;->mTask:Landroidx/loader/content/AsyncTaskLoader$LoadTask;
.line 211
iget-boolean v0, v0, Landroidx/loader/content/AsyncTaskLoader$LoadTask;->waiting:Z
if-eqz v0, :cond_0
iget-object v0, p0, Landroidx/loader/content/AsyncTaskLoader;->mTask:Landroidx/loader/content/AsyncTaskLoader$LoadTask;
const/4 v1, 0x0
.line 212
iput-boolean v1, v0, Landroidx/loader/content/AsyncTaskLoader$LoadTask;->waiting:Z
iget-object v0, p0, Landroidx/loader/content/AsyncTaskLoader;->mHandler:Landroid/os/Handler;
iget-object v1, p0, Landroidx/loader/content/AsyncTaskLoader;->mTask:Landroidx/loader/content/AsyncTaskLoader$LoadTask;
.line 213
invoke-virtual {v0, v1}, Landroid/os/Handler;->removeCallbacks(Ljava/lang/Runnable;)V
:cond_0
iget-wide v0, p0, Landroidx/loader/content/AsyncTaskLoader;->mUpdateThrottle:J
const-wide/16 v2, 0x0
cmp-long v0, v0, v2
if-lez v0, :cond_1
.line 216
invoke-static {}, Landroid/os/SystemClock;->uptimeMillis()J
move-result-wide v0
iget-wide v2, p0, Landroidx/loader/content/AsyncTaskLoader;->mLastLoadCompleteTime:J
iget-wide v4, p0, Landroidx/loader/content/AsyncTaskLoader;->mUpdateThrottle:J
add-long/2addr v2, v4
cmp-long v0, v0, v2
if-gez v0, :cond_1
iget-object v0, p0, Landroidx/loader/content/AsyncTaskLoader;->mTask:Landroidx/loader/content/AsyncTaskLoader$LoadTask;
const/4 v1, 0x1
.line 222
iput-boolean v1, v0, Landroidx/loader/content/AsyncTaskLoader$LoadTask;->waiting:Z
iget-object v0, p0, Landroidx/loader/content/AsyncTaskLoader;->mHandler:Landroid/os/Handler;
iget-object v1, p0, Landroidx/loader/content/AsyncTaskLoader;->mTask:Landroidx/loader/content/AsyncTaskLoader$LoadTask;
iget-wide v2, p0, Landroidx/loader/content/AsyncTaskLoader;->mLastLoadCompleteTime:J
iget-wide v4, p0, Landroidx/loader/content/AsyncTaskLoader;->mUpdateThrottle:J
add-long/2addr v2, v4
.line 223
invoke-virtual {v0, v1, v2, v3}, Landroid/os/Handler;->postAtTime(Ljava/lang/Runnable;J)Z
return-void
:cond_1
iget-object v0, p0, Landroidx/loader/content/AsyncTaskLoader;->mTask:Landroidx/loader/content/AsyncTaskLoader$LoadTask;
iget-object p0, p0, Landroidx/loader/content/AsyncTaskLoader;->mExecutor:Ljava/util/concurrent/Executor;
const/4 v1, 0x0
.line 228
move-object v2, v1
check-cast v2, [Ljava/lang/Void;
invoke-virtual {v0, p0, v1}, Landroidx/loader/content/AsyncTaskLoader$LoadTask;->executeOnExecutor(Ljava/util/concurrent/Executor;[Ljava/lang/Object;)Landroidx/loader/content/ModernAsyncTask;
:cond_2
return-void
.end method
.method public isLoadInBackgroundCanceled()Z
.locals 0
iget-object p0, p0, Landroidx/loader/content/AsyncTaskLoader;->mCancellingTask:Landroidx/loader/content/AsyncTaskLoader$LoadTask;
if-eqz p0, :cond_0
const/4 p0, 0x1
goto :goto_0
:cond_0
const/4 p0, 0x0
:goto_0
return p0
.end method
.method public abstract loadInBackground()Ljava/lang/Object;
.annotation system Ldalvik/annotation/Signature;
value = {
"()TD;"
}
.end annotation
.end method
.method protected onCancelLoad()Z
.locals 4
iget-object v0, p0, Landroidx/loader/content/AsyncTaskLoader;->mTask:Landroidx/loader/content/AsyncTaskLoader$LoadTask;
const/4 v1, 0x0
if-eqz v0, :cond_5
.line 163
iget-boolean v0, p0, Landroidx/loader/content/AsyncTaskLoader;->mStarted:Z
if-nez v0, :cond_0
const/4 v0, 0x1
.line 164
iput-boolean v0, p0, Landroidx/loader/content/AsyncTaskLoader;->mContentChanged:Z
:cond_0
iget-object v0, p0, Landroidx/loader/content/AsyncTaskLoader;->mCancellingTask:Landroidx/loader/content/AsyncTaskLoader$LoadTask;
const/4 v2, 0x0
if-eqz v0, :cond_2
iget-object v0, p0, Landroidx/loader/content/AsyncTaskLoader;->mTask:Landroidx/loader/content/AsyncTaskLoader$LoadTask;
.line 171
iget-boolean v0, v0, Landroidx/loader/content/AsyncTaskLoader$LoadTask;->waiting:Z
if-eqz v0, :cond_1
iget-object v0, p0, Landroidx/loader/content/AsyncTaskLoader;->mTask:Landroidx/loader/content/AsyncTaskLoader$LoadTask;
.line 172
iput-boolean v1, v0, Landroidx/loader/content/AsyncTaskLoader$LoadTask;->waiting:Z
iget-object v0, p0, Landroidx/loader/content/AsyncTaskLoader;->mHandler:Landroid/os/Handler;
iget-object v3, p0, Landroidx/loader/content/AsyncTaskLoader;->mTask:Landroidx/loader/content/AsyncTaskLoader$LoadTask;
.line 173
invoke-virtual {v0, v3}, Landroid/os/Handler;->removeCallbacks(Ljava/lang/Runnable;)V
:cond_1
iput-object v2, p0, Landroidx/loader/content/AsyncTaskLoader;->mTask:Landroidx/loader/content/AsyncTaskLoader$LoadTask;
return v1
:cond_2
iget-object v0, p0, Landroidx/loader/content/AsyncTaskLoader;->mTask:Landroidx/loader/content/AsyncTaskLoader$LoadTask;
.line 177
iget-boolean v0, v0, Landroidx/loader/content/AsyncTaskLoader$LoadTask;->waiting:Z
if-eqz v0, :cond_3
iget-object v0, p0, Landroidx/loader/content/AsyncTaskLoader;->mTask:Landroidx/loader/content/AsyncTaskLoader$LoadTask;
.line 181
iput-boolean v1, v0, Landroidx/loader/content/AsyncTaskLoader$LoadTask;->waiting:Z
iget-object v0, p0, Landroidx/loader/content/AsyncTaskLoader;->mHandler:Landroid/os/Handler;
iget-object v3, p0, Landroidx/loader/content/AsyncTaskLoader;->mTask:Landroidx/loader/content/AsyncTaskLoader$LoadTask;
.line 182
invoke-virtual {v0, v3}, Landroid/os/Handler;->removeCallbacks(Ljava/lang/Runnable;)V
iput-object v2, p0, Landroidx/loader/content/AsyncTaskLoader;->mTask:Landroidx/loader/content/AsyncTaskLoader$LoadTask;
return v1
:cond_3
iget-object v0, p0, Landroidx/loader/content/AsyncTaskLoader;->mTask:Landroidx/loader/content/AsyncTaskLoader$LoadTask;
.line 186
invoke-virtual {v0, v1}, Landroidx/loader/content/AsyncTaskLoader$LoadTask;->cancel(Z)Z
move-result v0
if-eqz v0, :cond_4
iget-object v1, p0, Landroidx/loader/content/AsyncTaskLoader;->mTask:Landroidx/loader/content/AsyncTaskLoader$LoadTask;
iput-object v1, p0, Landroidx/loader/content/AsyncTaskLoader;->mCancellingTask:Landroidx/loader/content/AsyncTaskLoader$LoadTask;
.line 190
invoke-virtual {p0}, Landroidx/loader/content/AsyncTaskLoader;->cancelLoadInBackground()V
:cond_4
iput-object v2, p0, Landroidx/loader/content/AsyncTaskLoader;->mTask:Landroidx/loader/content/AsyncTaskLoader$LoadTask;
return v0
:cond_5
return v1
.end method
.method public onCanceled(Ljava/lang/Object;)V
.locals 0
.annotation system Ldalvik/annotation/Signature;
value = {
"(TD;)V"
}
.end annotation
return-void
.end method
.method protected onForceLoad()V
.locals 1
.line 152
invoke-super {p0}, Landroidx/loader/content/Loader;->onForceLoad()V
.line 153
invoke-virtual {p0}, Landroidx/loader/content/AsyncTaskLoader;->cancelLoad()Z
.line 154
new-instance v0, Landroidx/loader/content/AsyncTaskLoader$LoadTask;
invoke-direct {v0, p0}, Landroidx/loader/content/AsyncTaskLoader$LoadTask;-><init>(Landroidx/loader/content/AsyncTaskLoader;)V
iput-object v0, p0, Landroidx/loader/content/AsyncTaskLoader;->mTask:Landroidx/loader/content/AsyncTaskLoader$LoadTask;
.line 156
invoke-virtual {p0}, Landroidx/loader/content/AsyncTaskLoader;->executePendingTask()V
return-void
.end method
.method protected onLoadInBackground()Ljava/lang/Object;
.locals 0
.annotation system Ldalvik/annotation/Signature;
value = {
"()TD;"
}
.end annotation
.line 307
invoke-virtual {p0}, Landroidx/loader/content/AsyncTaskLoader;->loadInBackground()Ljava/lang/Object;
move-result-object p0
return-object p0
.end method
.method public setUpdateThrottle(J)V
.locals 2
iput-wide p1, p0, Landroidx/loader/content/AsyncTaskLoader;->mUpdateThrottle:J
const-wide/16 v0, 0x0
cmp-long p1, p1, v0
if-eqz p1, :cond_0
.line 146
new-instance p1, Landroid/os/Handler;
invoke-direct {p1}, Landroid/os/Handler;-><init>()V
iput-object p1, p0, Landroidx/loader/content/AsyncTaskLoader;->mHandler:Landroid/os/Handler;
:cond_0
return-void
.end method
.method public waitForLoader()V
.locals 0
iget-object p0, p0, Landroidx/loader/content/AsyncTaskLoader;->mTask:Landroidx/loader/content/AsyncTaskLoader$LoadTask;
if-eqz p0, :cond_0
.line 349
invoke-virtual {p0}, Landroidx/loader/content/AsyncTaskLoader$LoadTask;->waitForLoader()V
:cond_0
return-void
.end method