apkfuckery/com.discord/smali/androidx/work/impl/utils/Preferences$LastCancelAllLiveData.smali
2019-12-06 04:29:40 +01:00

128 lines
3.9 KiB
Smali

.class public Landroidx/work/impl/utils/Preferences$LastCancelAllLiveData;
.super Landroidx/lifecycle/MutableLiveData;
.source "Preferences.java"
# interfaces
.implements Landroid/content/SharedPreferences$OnSharedPreferenceChangeListener;
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Landroidx/work/impl/utils/Preferences;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x9
name = "LastCancelAllLiveData"
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"Landroidx/lifecycle/MutableLiveData<",
"Ljava/lang/Long;",
">;",
"Landroid/content/SharedPreferences$OnSharedPreferenceChangeListener;"
}
.end annotation
# instance fields
.field public mLastCancelAllTimeMillis:J
.field public mSharedPreferences:Landroid/content/SharedPreferences;
# direct methods
.method public constructor <init>(Landroid/content/SharedPreferences;)V
.locals 3
invoke-direct {p0}, Landroidx/lifecycle/MutableLiveData;-><init>()V
iput-object p1, p0, Landroidx/work/impl/utils/Preferences$LastCancelAllLiveData;->mSharedPreferences:Landroid/content/SharedPreferences;
iget-object p1, p0, Landroidx/work/impl/utils/Preferences$LastCancelAllLiveData;->mSharedPreferences:Landroid/content/SharedPreferences;
const-string v0, "last_cancel_all_time_ms"
const-wide/16 v1, 0x0
invoke-interface {p1, v0, v1, v2}, Landroid/content/SharedPreferences;->getLong(Ljava/lang/String;J)J
move-result-wide v0
iput-wide v0, p0, Landroidx/work/impl/utils/Preferences$LastCancelAllLiveData;->mLastCancelAllTimeMillis:J
iget-wide v0, p0, Landroidx/work/impl/utils/Preferences$LastCancelAllLiveData;->mLastCancelAllTimeMillis:J
invoke-static {v0, v1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
move-result-object p1
invoke-virtual {p0, p1}, Landroidx/lifecycle/MutableLiveData;->postValue(Ljava/lang/Object;)V
return-void
.end method
# virtual methods
.method public onActive()V
.locals 1
invoke-super {p0}, Landroidx/lifecycle/LiveData;->onActive()V
iget-object v0, p0, Landroidx/work/impl/utils/Preferences$LastCancelAllLiveData;->mSharedPreferences:Landroid/content/SharedPreferences;
invoke-interface {v0, p0}, Landroid/content/SharedPreferences;->registerOnSharedPreferenceChangeListener(Landroid/content/SharedPreferences$OnSharedPreferenceChangeListener;)V
return-void
.end method
.method public onInactive()V
.locals 1
invoke-super {p0}, Landroidx/lifecycle/LiveData;->onInactive()V
iget-object v0, p0, Landroidx/work/impl/utils/Preferences$LastCancelAllLiveData;->mSharedPreferences:Landroid/content/SharedPreferences;
invoke-interface {v0, p0}, Landroid/content/SharedPreferences;->unregisterOnSharedPreferenceChangeListener(Landroid/content/SharedPreferences$OnSharedPreferenceChangeListener;)V
return-void
.end method
.method public onSharedPreferenceChanged(Landroid/content/SharedPreferences;Ljava/lang/String;)V
.locals 3
const-string v0, "last_cancel_all_time_ms"
invoke-virtual {v0, p2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_0
const-wide/16 v0, 0x0
invoke-interface {p1, p2, v0, v1}, Landroid/content/SharedPreferences;->getLong(Ljava/lang/String;J)J
move-result-wide p1
iget-wide v0, p0, Landroidx/work/impl/utils/Preferences$LastCancelAllLiveData;->mLastCancelAllTimeMillis:J
cmp-long v2, v0, p1
if-eqz v2, :cond_0
iput-wide p1, p0, Landroidx/work/impl/utils/Preferences$LastCancelAllLiveData;->mLastCancelAllTimeMillis:J
iget-wide p1, p0, Landroidx/work/impl/utils/Preferences$LastCancelAllLiveData;->mLastCancelAllTimeMillis:J
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
move-result-object p1
invoke-virtual {p0, p1}, Landroidx/lifecycle/MutableLiveData;->setValue(Ljava/lang/Object;)V
:cond_0
return-void
.end method