apkfuckery/com.discord/smali/androidx/lifecycle/MediatorLiveData$Source.smali

138 lines
3.6 KiB
Smali
Raw Normal View History

2020-05-17 12:40:10 +00:00
.class public Landroidx/lifecycle/MediatorLiveData$Source;
.super Ljava/lang/Object;
.source "MediatorLiveData.java"
# interfaces
.implements Landroidx/lifecycle/Observer;
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Landroidx/lifecycle/MediatorLiveData;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x9
name = "Source"
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"<V:",
"Ljava/lang/Object;",
">",
"Ljava/lang/Object;",
"Landroidx/lifecycle/Observer<",
"TV;>;"
}
.end annotation
# instance fields
.field public final mLiveData:Landroidx/lifecycle/LiveData;
.annotation system Ldalvik/annotation/Signature;
value = {
"Landroidx/lifecycle/LiveData<",
"TV;>;"
}
.end annotation
.end field
.field public final mObserver:Landroidx/lifecycle/Observer;
.annotation system Ldalvik/annotation/Signature;
value = {
"Landroidx/lifecycle/Observer<",
"-TV;>;"
}
.end annotation
.end field
.field public mVersion:I
# direct methods
.method public constructor <init>(Landroidx/lifecycle/LiveData;Landroidx/lifecycle/Observer;)V
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Landroidx/lifecycle/LiveData<",
"TV;>;",
"Landroidx/lifecycle/Observer<",
"-TV;>;)V"
}
.end annotation
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
const/4 v0, -0x1
iput v0, p0, Landroidx/lifecycle/MediatorLiveData$Source;->mVersion:I
iput-object p1, p0, Landroidx/lifecycle/MediatorLiveData$Source;->mLiveData:Landroidx/lifecycle/LiveData;
iput-object p2, p0, Landroidx/lifecycle/MediatorLiveData$Source;->mObserver:Landroidx/lifecycle/Observer;
return-void
.end method
# virtual methods
.method public onChanged(Ljava/lang/Object;)V
.locals 2
.param p1 # Ljava/lang/Object;
.annotation build Landroidx/annotation/Nullable;
.end annotation
.end param
.annotation system Ldalvik/annotation/Signature;
value = {
"(TV;)V"
}
.end annotation
iget v0, p0, Landroidx/lifecycle/MediatorLiveData$Source;->mVersion:I
iget-object v1, p0, Landroidx/lifecycle/MediatorLiveData$Source;->mLiveData:Landroidx/lifecycle/LiveData;
invoke-virtual {v1}, Landroidx/lifecycle/LiveData;->getVersion()I
move-result v1
if-eq v0, v1, :cond_0
iget-object v0, p0, Landroidx/lifecycle/MediatorLiveData$Source;->mLiveData:Landroidx/lifecycle/LiveData;
invoke-virtual {v0}, Landroidx/lifecycle/LiveData;->getVersion()I
move-result v0
iput v0, p0, Landroidx/lifecycle/MediatorLiveData$Source;->mVersion:I
iget-object v0, p0, Landroidx/lifecycle/MediatorLiveData$Source;->mObserver:Landroidx/lifecycle/Observer;
invoke-interface {v0, p1}, Landroidx/lifecycle/Observer;->onChanged(Ljava/lang/Object;)V
:cond_0
return-void
.end method
.method public plug()V
.locals 1
iget-object v0, p0, Landroidx/lifecycle/MediatorLiveData$Source;->mLiveData:Landroidx/lifecycle/LiveData;
invoke-virtual {v0, p0}, Landroidx/lifecycle/LiveData;->observeForever(Landroidx/lifecycle/Observer;)V
return-void
.end method
.method public unplug()V
.locals 1
iget-object v0, p0, Landroidx/lifecycle/MediatorLiveData$Source;->mLiveData:Landroidx/lifecycle/LiveData;
invoke-virtual {v0, p0}, Landroidx/lifecycle/LiveData;->removeObserver(Landroidx/lifecycle/Observer;)V
return-void
.end method