apkfuckery/com.discord/smali/androidx/preference/EditTextPreference.smali

277 lines
7.8 KiB
Smali
Raw Normal View History

2019-11-15 02:21:15 +00:00
.class public Landroidx/preference/EditTextPreference;
.super Landroidx/preference/DialogPreference;
.source "EditTextPreference.java"
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Landroidx/preference/EditTextPreference$SimpleSummaryProvider;,
Landroidx/preference/EditTextPreference$SavedState;,
Landroidx/preference/EditTextPreference$OnBindEditTextListener;
}
.end annotation
# instance fields
2019-12-06 03:29:40 +00:00
.field public mOnBindEditTextListener:Landroidx/preference/EditTextPreference$OnBindEditTextListener;
.annotation build Landroidx/annotation/Nullable;
.end annotation
.end field
2019-11-15 02:21:15 +00:00
2019-12-06 03:29:40 +00:00
.field public mText:Ljava/lang/String;
2019-11-15 02:21:15 +00:00
# direct methods
.method public constructor <init>(Landroid/content/Context;)V
.locals 1
const/4 v0, 0x0
invoke-direct {p0, p1, v0}, Landroidx/preference/EditTextPreference;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
return-void
.end method
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
.locals 2
sget v0, Landroidx/preference/R$attr;->editTextPreferenceStyle:I
const v1, 0x1010092
invoke-static {p1, v0, v1}, Landroidx/core/content/res/TypedArrayUtils;->getAttr(Landroid/content/Context;II)I
move-result v0
invoke-direct {p0, p1, p2, v0}, Landroidx/preference/EditTextPreference;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
return-void
.end method
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
.locals 1
const/4 v0, 0x0
invoke-direct {p0, p1, p2, p3, v0}, Landroidx/preference/EditTextPreference;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;II)V
return-void
.end method
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;II)V
.locals 1
invoke-direct {p0, p1, p2, p3, p4}, Landroidx/preference/DialogPreference;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;II)V
sget-object v0, Landroidx/preference/R$styleable;->EditTextPreference:[I
invoke-virtual {p1, p2, v0, p3, p4}, Landroid/content/Context;->obtainStyledAttributes(Landroid/util/AttributeSet;[III)Landroid/content/res/TypedArray;
move-result-object p1
sget p2, Landroidx/preference/R$styleable;->EditTextPreference_useSimpleSummaryProvider:I
const/4 p3, 0x0
invoke-static {p1, p2, p2, p3}, Landroidx/core/content/res/TypedArrayUtils;->getBoolean(Landroid/content/res/TypedArray;IIZ)Z
move-result p2
if-eqz p2, :cond_0
invoke-static {}, Landroidx/preference/EditTextPreference$SimpleSummaryProvider;->getInstance()Landroidx/preference/EditTextPreference$SimpleSummaryProvider;
move-result-object p2
2019-12-06 03:29:40 +00:00
invoke-virtual {p0, p2}, Landroidx/preference/Preference;->setSummaryProvider(Landroidx/preference/Preference$SummaryProvider;)V
2019-11-15 02:21:15 +00:00
:cond_0
invoke-virtual {p1}, Landroid/content/res/TypedArray;->recycle()V
return-void
.end method
# virtual methods
2019-12-06 03:29:40 +00:00
.method public getOnBindEditTextListener()Landroidx/preference/EditTextPreference$OnBindEditTextListener;
2019-11-15 02:21:15 +00:00
.locals 1
2019-12-06 03:29:40 +00:00
.annotation build Landroidx/annotation/Nullable;
.end annotation
2019-11-15 02:21:15 +00:00
iget-object v0, p0, Landroidx/preference/EditTextPreference;->mOnBindEditTextListener:Landroidx/preference/EditTextPreference$OnBindEditTextListener;
return-object v0
.end method
.method public getText()Ljava/lang/String;
.locals 1
iget-object v0, p0, Landroidx/preference/EditTextPreference;->mText:Ljava/lang/String;
return-object v0
.end method
2019-12-06 03:29:40 +00:00
.method public onGetDefaultValue(Landroid/content/res/TypedArray;I)Ljava/lang/Object;
2019-11-15 02:21:15 +00:00
.locals 0
invoke-virtual {p1, p2}, Landroid/content/res/TypedArray;->getString(I)Ljava/lang/String;
move-result-object p1
return-object p1
.end method
2019-12-06 03:29:40 +00:00
.method public onRestoreInstanceState(Landroid/os/Parcelable;)V
2019-11-15 02:21:15 +00:00
.locals 2
if-eqz p1, :cond_1
invoke-virtual {p1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
move-result-object v0
const-class v1, Landroidx/preference/EditTextPreference$SavedState;
invoke-virtual {v0, v1}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
move-result v0
if-nez v0, :cond_0
goto :goto_0
:cond_0
check-cast p1, Landroidx/preference/EditTextPreference$SavedState;
2019-12-06 03:29:40 +00:00
invoke-virtual {p1}, Landroid/view/AbsSavedState;->getSuperState()Landroid/os/Parcelable;
2019-11-15 02:21:15 +00:00
move-result-object v0
2019-12-06 03:29:40 +00:00
invoke-super {p0, v0}, Landroidx/preference/Preference;->onRestoreInstanceState(Landroid/os/Parcelable;)V
2019-11-15 02:21:15 +00:00
iget-object p1, p1, Landroidx/preference/EditTextPreference$SavedState;->mText:Ljava/lang/String;
invoke-virtual {p0, p1}, Landroidx/preference/EditTextPreference;->setText(Ljava/lang/String;)V
return-void
:cond_1
:goto_0
2019-12-06 03:29:40 +00:00
invoke-super {p0, p1}, Landroidx/preference/Preference;->onRestoreInstanceState(Landroid/os/Parcelable;)V
2019-11-15 02:21:15 +00:00
return-void
.end method
2019-12-06 03:29:40 +00:00
.method public onSaveInstanceState()Landroid/os/Parcelable;
2019-11-15 02:21:15 +00:00
.locals 2
2019-12-06 03:29:40 +00:00
invoke-super {p0}, Landroidx/preference/Preference;->onSaveInstanceState()Landroid/os/Parcelable;
2019-11-15 02:21:15 +00:00
move-result-object v0
2019-12-06 03:29:40 +00:00
invoke-virtual {p0}, Landroidx/preference/Preference;->isPersistent()Z
2019-11-15 02:21:15 +00:00
move-result v1
if-eqz v1, :cond_0
return-object v0
:cond_0
new-instance v1, Landroidx/preference/EditTextPreference$SavedState;
invoke-direct {v1, v0}, Landroidx/preference/EditTextPreference$SavedState;-><init>(Landroid/os/Parcelable;)V
invoke-virtual {p0}, Landroidx/preference/EditTextPreference;->getText()Ljava/lang/String;
move-result-object v0
iput-object v0, v1, Landroidx/preference/EditTextPreference$SavedState;->mText:Ljava/lang/String;
return-object v1
.end method
2019-12-06 03:29:40 +00:00
.method public onSetInitialValue(Ljava/lang/Object;)V
2019-11-15 02:21:15 +00:00
.locals 0
check-cast p1, Ljava/lang/String;
2019-12-06 03:29:40 +00:00
invoke-virtual {p0, p1}, Landroidx/preference/Preference;->getPersistedString(Ljava/lang/String;)Ljava/lang/String;
2019-11-15 02:21:15 +00:00
move-result-object p1
invoke-virtual {p0, p1}, Landroidx/preference/EditTextPreference;->setText(Ljava/lang/String;)V
return-void
.end method
.method public setOnBindEditTextListener(Landroidx/preference/EditTextPreference$OnBindEditTextListener;)V
.locals 0
2019-12-06 03:29:40 +00:00
.param p1 # Landroidx/preference/EditTextPreference$OnBindEditTextListener;
.annotation build Landroidx/annotation/Nullable;
.end annotation
.end param
2019-11-15 02:21:15 +00:00
iput-object p1, p0, Landroidx/preference/EditTextPreference;->mOnBindEditTextListener:Landroidx/preference/EditTextPreference$OnBindEditTextListener;
return-void
.end method
.method public setText(Ljava/lang/String;)V
.locals 1
invoke-virtual {p0}, Landroidx/preference/EditTextPreference;->shouldDisableDependents()Z
move-result v0
iput-object p1, p0, Landroidx/preference/EditTextPreference;->mText:Ljava/lang/String;
2019-12-06 03:29:40 +00:00
invoke-virtual {p0, p1}, Landroidx/preference/Preference;->persistString(Ljava/lang/String;)Z
2019-11-15 02:21:15 +00:00
invoke-virtual {p0}, Landroidx/preference/EditTextPreference;->shouldDisableDependents()Z
move-result p1
if-eq p1, v0, :cond_0
2019-12-06 03:29:40 +00:00
invoke-virtual {p0, p1}, Landroidx/preference/Preference;->notifyDependencyChange(Z)V
2019-11-15 02:21:15 +00:00
:cond_0
2019-12-06 03:29:40 +00:00
invoke-virtual {p0}, Landroidx/preference/Preference;->notifyChanged()V
2019-11-15 02:21:15 +00:00
return-void
.end method
.method public shouldDisableDependents()Z
.locals 1
iget-object v0, p0, Landroidx/preference/EditTextPreference;->mText:Ljava/lang/String;
invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_1
2019-12-06 03:29:40 +00:00
invoke-super {p0}, Landroidx/preference/Preference;->shouldDisableDependents()Z
2019-11-15 02:21:15 +00:00
move-result v0
if-eqz v0, :cond_0
goto :goto_0
:cond_0
const/4 v0, 0x0
2019-12-06 03:29:40 +00:00
goto :goto_1
2019-11-15 02:21:15 +00:00
:cond_1
:goto_0
const/4 v0, 0x1
2019-12-06 03:29:40 +00:00
:goto_1
2019-11-15 02:21:15 +00:00
return v0
.end method