apkfuckery/com.discord/smali/androidx/lifecycle/ComputableLiveData.smali

155 lines
4.6 KiB
Smali
Raw Normal View History

2019-02-04 20:08:30 +00:00
.class public abstract Landroidx/lifecycle/ComputableLiveData;
.super Ljava/lang/Object;
2019-02-04 20:29:01 +00:00
.source "ComputableLiveData.java"
2019-02-04 20:08:30 +00:00
# annotations
.annotation build Landroidx/annotation/RestrictTo;
value = {
.enum Landroidx/annotation/RestrictTo$Scope;->LIBRARY_GROUP:Landroidx/annotation/RestrictTo$Scope;
}
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">",
"Ljava/lang/Object;"
}
.end annotation
# instance fields
.field final mComputing:Ljava/util/concurrent/atomic/AtomicBoolean;
.field final mExecutor:Ljava/util/concurrent/Executor;
.field final mInvalid:Ljava/util/concurrent/atomic/AtomicBoolean;
.field final mInvalidationRunnable:Ljava/lang/Runnable;
.annotation build Landroidx/annotation/VisibleForTesting;
.end annotation
.end field
.field final mLiveData:Landroidx/lifecycle/LiveData;
.annotation system Ldalvik/annotation/Signature;
value = {
"Landroidx/lifecycle/LiveData<",
"TT;>;"
}
.end annotation
.end field
.field final mRefreshRunnable:Ljava/lang/Runnable;
.annotation build Landroidx/annotation/VisibleForTesting;
.end annotation
.end field
# direct methods
.method public constructor <init>()V
.locals 1
invoke-static {}, Landroidx/arch/core/executor/ArchTaskExecutor;->getIOThreadExecutor()Ljava/util/concurrent/Executor;
move-result-object v0
invoke-direct {p0, v0}, Landroidx/lifecycle/ComputableLiveData;-><init>(Ljava/util/concurrent/Executor;)V
return-void
.end method
.method public constructor <init>(Ljava/util/concurrent/Executor;)V
.locals 2
.param p1 # Ljava/util/concurrent/Executor;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
new-instance v0, Ljava/util/concurrent/atomic/AtomicBoolean;
const/4 v1, 0x1
invoke-direct {v0, v1}, Ljava/util/concurrent/atomic/AtomicBoolean;-><init>(Z)V
iput-object v0, p0, Landroidx/lifecycle/ComputableLiveData;->mInvalid:Ljava/util/concurrent/atomic/AtomicBoolean;
new-instance v0, Ljava/util/concurrent/atomic/AtomicBoolean;
const/4 v1, 0x0
invoke-direct {v0, v1}, Ljava/util/concurrent/atomic/AtomicBoolean;-><init>(Z)V
iput-object v0, p0, Landroidx/lifecycle/ComputableLiveData;->mComputing:Ljava/util/concurrent/atomic/AtomicBoolean;
new-instance v0, Landroidx/lifecycle/ComputableLiveData$2;
invoke-direct {v0, p0}, Landroidx/lifecycle/ComputableLiveData$2;-><init>(Landroidx/lifecycle/ComputableLiveData;)V
iput-object v0, p0, Landroidx/lifecycle/ComputableLiveData;->mRefreshRunnable:Ljava/lang/Runnable;
new-instance v0, Landroidx/lifecycle/ComputableLiveData$3;
invoke-direct {v0, p0}, Landroidx/lifecycle/ComputableLiveData$3;-><init>(Landroidx/lifecycle/ComputableLiveData;)V
iput-object v0, p0, Landroidx/lifecycle/ComputableLiveData;->mInvalidationRunnable:Ljava/lang/Runnable;
iput-object p1, p0, Landroidx/lifecycle/ComputableLiveData;->mExecutor:Ljava/util/concurrent/Executor;
new-instance p1, Landroidx/lifecycle/ComputableLiveData$1;
invoke-direct {p1, p0}, Landroidx/lifecycle/ComputableLiveData$1;-><init>(Landroidx/lifecycle/ComputableLiveData;)V
iput-object p1, p0, Landroidx/lifecycle/ComputableLiveData;->mLiveData:Landroidx/lifecycle/LiveData;
return-void
.end method
# virtual methods
.method protected abstract compute()Ljava/lang/Object;
.annotation build Landroidx/annotation/WorkerThread;
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"()TT;"
}
.end annotation
.end method
.method public getLiveData()Landroidx/lifecycle/LiveData;
.locals 1
.annotation build Landroidx/annotation/NonNull;
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Landroidx/lifecycle/LiveData<",
"TT;>;"
}
.end annotation
iget-object v0, p0, Landroidx/lifecycle/ComputableLiveData;->mLiveData:Landroidx/lifecycle/LiveData;
return-object v0
.end method
.method public invalidate()V
.locals 2
invoke-static {}, Landroidx/arch/core/executor/ArchTaskExecutor;->getInstance()Landroidx/arch/core/executor/ArchTaskExecutor;
move-result-object v0
iget-object v1, p0, Landroidx/lifecycle/ComputableLiveData;->mInvalidationRunnable:Ljava/lang/Runnable;
invoke-virtual {v0, v1}, Landroidx/arch/core/executor/ArchTaskExecutor;->executeOnMainThread(Ljava/lang/Runnable;)V
return-void
.end method