Rabbit-R1/original r1/smali/smali_classes2/androidx/lifecycle/ComputableLiveData.smali
2024-05-21 17:08:36 -04:00

409 lines
13 KiB
Smali

.class public abstract Landroidx/lifecycle/ComputableLiveData;
.super Ljava/lang/Object;
.source "ComputableLiveData.kt"
# annotations
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">",
"Ljava/lang/Object;"
}
.end annotation
.annotation runtime Lkotlin/Metadata;
d1 = {
"\u00000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0000\n\u0000\n\u0002\u0018\u0002\n\u0002\u0008\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0008\u0007\n\u0002\u0018\u0002\n\u0002\u0008\n\n\u0002\u0010\u0002\n\u0000\u0008\'\u0018\u0000*\u0004\u0008\u0000\u0010\u00012\u00020\u0002B\u0011\u0008\u0007\u0012\u0008\u0008\u0002\u0010\u0003\u001a\u00020\u0004\u00a2\u0006\u0002\u0010\u0005J\r\u0010\u0019\u001a\u00028\u0000H%\u00a2\u0006\u0002\u0010\u001aJ\u0008\u0010\u001b\u001a\u00020\u001cH\u0016R\u0016\u0010\u0006\u001a\n\u0012\u0006\u0012\u0004\u0018\u00018\u00000\u0007X\u0082\u0004\u00a2\u0006\u0002\n\u0000R\u0014\u0010\u0008\u001a\u00020\tX\u0080\u0004\u00a2\u0006\u0008\n\u0000\u001a\u0004\u0008\n\u0010\u000bR\u0014\u0010\u0003\u001a\u00020\u0004X\u0080\u0004\u00a2\u0006\u0008\n\u0000\u001a\u0004\u0008\u000c\u0010\rR\u0014\u0010\u000e\u001a\u00020\tX\u0080\u0004\u00a2\u0006\u0008\n\u0000\u001a\u0004\u0008\u000f\u0010\u000bR\u0016\u0010\u0010\u001a\u00020\u00118\u0000X\u0081\u0004\u00a2\u0006\u0008\n\u0000\u0012\u0004\u0008\u0012\u0010\u0013R\u001c\u0010\u0014\u001a\n\u0012\u0006\u0012\u0004\u0018\u00018\u00000\u0007X\u0096\u0004\u00a2\u0006\u0008\n\u0000\u001a\u0004\u0008\u0015\u0010\u0016R\u0016\u0010\u0017\u001a\u00020\u00118\u0000X\u0081\u0004\u00a2\u0006\u0008\n\u0000\u0012\u0004\u0008\u0018\u0010\u0013\u00a8\u0006\u001d"
}
d2 = {
"Landroidx/lifecycle/ComputableLiveData;",
"T",
"",
"executor",
"Ljava/util/concurrent/Executor;",
"(Ljava/util/concurrent/Executor;)V",
"_liveData",
"Landroidx/lifecycle/LiveData;",
"computing",
"Ljava/util/concurrent/atomic/AtomicBoolean;",
"getComputing$lifecycle_livedata_release",
"()Ljava/util/concurrent/atomic/AtomicBoolean;",
"getExecutor$lifecycle_livedata_release",
"()Ljava/util/concurrent/Executor;",
"invalid",
"getInvalid$lifecycle_livedata_release",
"invalidationRunnable",
"Ljava/lang/Runnable;",
"getInvalidationRunnable$lifecycle_livedata_release$annotations",
"()V",
"liveData",
"getLiveData",
"()Landroidx/lifecycle/LiveData;",
"refreshRunnable",
"getRefreshRunnable$lifecycle_livedata_release$annotations",
"compute",
"()Ljava/lang/Object;",
"invalidate",
"",
"lifecycle-livedata_release"
}
k = 0x1
mv = {
0x1,
0x8,
0x0
}
xi = 0x30
.end annotation
# instance fields
.field private final _liveData:Landroidx/lifecycle/LiveData;
.annotation system Ldalvik/annotation/Signature;
value = {
"Landroidx/lifecycle/LiveData<",
"TT;>;"
}
.end annotation
.end field
.field private final computing:Ljava/util/concurrent/atomic/AtomicBoolean;
.field private final executor:Ljava/util/concurrent/Executor;
.field private final invalid:Ljava/util/concurrent/atomic/AtomicBoolean;
.field public final invalidationRunnable:Ljava/lang/Runnable;
.field private final liveData:Landroidx/lifecycle/LiveData;
.annotation system Ldalvik/annotation/Signature;
value = {
"Landroidx/lifecycle/LiveData<",
"TT;>;"
}
.end annotation
.end field
.field public final refreshRunnable:Ljava/lang/Runnable;
# direct methods
.method public static synthetic $r8$lambda$5eX8YRZhf-92-7ktc4Rs00cwiRw(Landroidx/lifecycle/ComputableLiveData;)V
.locals 0
invoke-static {p0}, Landroidx/lifecycle/ComputableLiveData;->refreshRunnable$lambda$0(Landroidx/lifecycle/ComputableLiveData;)V
return-void
.end method
.method public static synthetic $r8$lambda$Z8umybky1QMyXLhEFEx8n57LwT0(Landroidx/lifecycle/ComputableLiveData;)V
.locals 0
invoke-static {p0}, Landroidx/lifecycle/ComputableLiveData;->invalidationRunnable$lambda$1(Landroidx/lifecycle/ComputableLiveData;)V
return-void
.end method
.method public constructor <init>()V
.locals 2
const/4 v0, 0x0
const/4 v1, 0x1
invoke-direct {p0, v0, v1, v0}, Landroidx/lifecycle/ComputableLiveData;-><init>(Ljava/util/concurrent/Executor;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
return-void
.end method
.method public constructor <init>(Ljava/util/concurrent/Executor;)V
.locals 1
const-string v0, "executor"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 36
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
iput-object p1, p0, Landroidx/lifecycle/ComputableLiveData;->executor:Ljava/util/concurrent/Executor;
.line 49
new-instance p1, Landroidx/lifecycle/ComputableLiveData$_liveData$1;
invoke-direct {p1, p0}, Landroidx/lifecycle/ComputableLiveData$_liveData$1;-><init>(Landroidx/lifecycle/ComputableLiveData;)V
check-cast p1, Landroidx/lifecycle/LiveData;
iput-object p1, p0, Landroidx/lifecycle/ComputableLiveData;->_liveData:Landroidx/lifecycle/LiveData;
iput-object p1, p0, Landroidx/lifecycle/ComputableLiveData;->liveData:Landroidx/lifecycle/LiveData;
.line 58
new-instance p1, Ljava/util/concurrent/atomic/AtomicBoolean;
const/4 v0, 0x1
invoke-direct {p1, v0}, Ljava/util/concurrent/atomic/AtomicBoolean;-><init>(Z)V
iput-object p1, p0, Landroidx/lifecycle/ComputableLiveData;->invalid:Ljava/util/concurrent/atomic/AtomicBoolean;
.line 59
new-instance p1, Ljava/util/concurrent/atomic/AtomicBoolean;
const/4 v0, 0x0
invoke-direct {p1, v0}, Ljava/util/concurrent/atomic/AtomicBoolean;-><init>(Z)V
iput-object p1, p0, Landroidx/lifecycle/ComputableLiveData;->computing:Ljava/util/concurrent/atomic/AtomicBoolean;
.line 63
new-instance p1, Landroidx/lifecycle/ComputableLiveData$$ExternalSyntheticLambda0;
invoke-direct {p1, p0}, Landroidx/lifecycle/ComputableLiveData$$ExternalSyntheticLambda0;-><init>(Landroidx/lifecycle/ComputableLiveData;)V
iput-object p1, p0, Landroidx/lifecycle/ComputableLiveData;->refreshRunnable:Ljava/lang/Runnable;
.line 97
new-instance p1, Landroidx/lifecycle/ComputableLiveData$$ExternalSyntheticLambda1;
invoke-direct {p1, p0}, Landroidx/lifecycle/ComputableLiveData$$ExternalSyntheticLambda1;-><init>(Landroidx/lifecycle/ComputableLiveData;)V
iput-object p1, p0, Landroidx/lifecycle/ComputableLiveData;->invalidationRunnable:Ljava/lang/Runnable;
return-void
.end method
.method public synthetic constructor <init>(Ljava/util/concurrent/Executor;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
.locals 0
and-int/lit8 p2, p2, 0x1
if-eqz p2, :cond_0
.line 45
invoke-static {}, Landroidx/arch/core/executor/ArchTaskExecutor;->getIOThreadExecutor()Ljava/util/concurrent/Executor;
move-result-object p1
const-string p2, "getIOThreadExecutor()"
invoke-static {p1, p2}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
.line 44
:cond_0
invoke-direct {p0, p1}, Landroidx/lifecycle/ComputableLiveData;-><init>(Ljava/util/concurrent/Executor;)V
return-void
.end method
.method public static synthetic getInvalidationRunnable$lifecycle_livedata_release$annotations()V
.locals 0
return-void
.end method
.method public static synthetic getRefreshRunnable$lifecycle_livedata_release$annotations()V
.locals 0
return-void
.end method
.method private static final invalidationRunnable$lambda$1(Landroidx/lifecycle/ComputableLiveData;)V
.locals 4
const-string v0, "this$0"
invoke-static {p0, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 98
invoke-virtual {p0}, Landroidx/lifecycle/ComputableLiveData;->getLiveData()Landroidx/lifecycle/LiveData;
move-result-object v0
invoke-virtual {v0}, Landroidx/lifecycle/LiveData;->hasActiveObservers()Z
move-result v0
.line 99
iget-object v1, p0, Landroidx/lifecycle/ComputableLiveData;->invalid:Ljava/util/concurrent/atomic/AtomicBoolean;
const/4 v2, 0x0
const/4 v3, 0x1
invoke-virtual {v1, v2, v3}, Ljava/util/concurrent/atomic/AtomicBoolean;->compareAndSet(ZZ)Z
move-result v1
if-eqz v1, :cond_0
if-eqz v0, :cond_0
.line 101
iget-object v0, p0, Landroidx/lifecycle/ComputableLiveData;->executor:Ljava/util/concurrent/Executor;
iget-object p0, p0, Landroidx/lifecycle/ComputableLiveData;->refreshRunnable:Ljava/lang/Runnable;
invoke-interface {v0, p0}, Ljava/util/concurrent/Executor;->execute(Ljava/lang/Runnable;)V
:cond_0
return-void
.end method
.method private static final refreshRunnable$lambda$0(Landroidx/lifecycle/ComputableLiveData;)V
.locals 5
const-string v0, "this$0"
invoke-static {p0, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 68
:cond_0
iget-object v0, p0, Landroidx/lifecycle/ComputableLiveData;->computing:Ljava/util/concurrent/atomic/AtomicBoolean;
const/4 v1, 0x0
const/4 v2, 0x1
invoke-virtual {v0, v1, v2}, Ljava/util/concurrent/atomic/AtomicBoolean;->compareAndSet(ZZ)Z
move-result v0
if-eqz v0, :cond_3
const/4 v0, 0x0
move v3, v1
.line 72
:goto_0
:try_start_0
iget-object v4, p0, Landroidx/lifecycle/ComputableLiveData;->invalid:Ljava/util/concurrent/atomic/AtomicBoolean;
invoke-virtual {v4, v2, v1}, Ljava/util/concurrent/atomic/AtomicBoolean;->compareAndSet(ZZ)Z
move-result v4
if-eqz v4, :cond_1
.line 74
invoke-virtual {p0}, Landroidx/lifecycle/ComputableLiveData;->compute()Ljava/lang/Object;
move-result-object v0
move v3, v2
goto :goto_0
:cond_1
if-eqz v3, :cond_2
.line 77
invoke-virtual {p0}, Landroidx/lifecycle/ComputableLiveData;->getLiveData()Landroidx/lifecycle/LiveData;
move-result-object v2
invoke-virtual {v2, v0}, Landroidx/lifecycle/LiveData;->postValue(Ljava/lang/Object;)V
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 81
:cond_2
iget-object v0, p0, Landroidx/lifecycle/ComputableLiveData;->computing:Ljava/util/concurrent/atomic/AtomicBoolean;
invoke-virtual {v0, v1}, Ljava/util/concurrent/atomic/AtomicBoolean;->set(Z)V
if-eqz v3, :cond_3
.line 91
iget-object v0, p0, Landroidx/lifecycle/ComputableLiveData;->invalid:Ljava/util/concurrent/atomic/AtomicBoolean;
invoke-virtual {v0}, Ljava/util/concurrent/atomic/AtomicBoolean;->get()Z
move-result v0
if-nez v0, :cond_0
goto :goto_1
:catchall_0
move-exception v0
.line 81
iget-object p0, p0, Landroidx/lifecycle/ComputableLiveData;->computing:Ljava/util/concurrent/atomic/AtomicBoolean;
invoke-virtual {p0, v1}, Ljava/util/concurrent/atomic/AtomicBoolean;->set(Z)V
throw v0
:cond_3
:goto_1
return-void
.end method
# virtual methods
.method protected abstract compute()Ljava/lang/Object;
.annotation system Ldalvik/annotation/Signature;
value = {
"()TT;"
}
.end annotation
.end method
.method public final getComputing$lifecycle_livedata_release()Ljava/util/concurrent/atomic/AtomicBoolean;
.locals 0
iget-object p0, p0, Landroidx/lifecycle/ComputableLiveData;->computing:Ljava/util/concurrent/atomic/AtomicBoolean;
return-object p0
.end method
.method public final getExecutor$lifecycle_livedata_release()Ljava/util/concurrent/Executor;
.locals 0
iget-object p0, p0, Landroidx/lifecycle/ComputableLiveData;->executor:Ljava/util/concurrent/Executor;
return-object p0
.end method
.method public final getInvalid$lifecycle_livedata_release()Ljava/util/concurrent/atomic/AtomicBoolean;
.locals 0
iget-object p0, p0, Landroidx/lifecycle/ComputableLiveData;->invalid:Ljava/util/concurrent/atomic/AtomicBoolean;
return-object p0
.end method
.method public getLiveData()Landroidx/lifecycle/LiveData;
.locals 0
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Landroidx/lifecycle/LiveData<",
"TT;>;"
}
.end annotation
iget-object p0, p0, Landroidx/lifecycle/ComputableLiveData;->liveData:Landroidx/lifecycle/LiveData;
return-object p0
.end method
.method public invalidate()V
.locals 1
.line 112
invoke-static {}, Landroidx/arch/core/executor/ArchTaskExecutor;->getInstance()Landroidx/arch/core/executor/ArchTaskExecutor;
move-result-object v0
iget-object p0, p0, Landroidx/lifecycle/ComputableLiveData;->invalidationRunnable:Ljava/lang/Runnable;
invoke-virtual {v0, p0}, Landroidx/arch/core/executor/ArchTaskExecutor;->executeOnMainThread(Ljava/lang/Runnable;)V
return-void
.end method