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

220 lines
6.4 KiB
Smali
Raw Normal View History

2019-11-15 02:21:15 +00:00
.class public Landroidx/preference/EditTextPreferenceDialogFragment;
.super Landroidx/preference/PreferenceDialogFragment;
.source "EditTextPreferenceDialogFragment.java"
# annotations
.annotation runtime Ljava/lang/Deprecated;
.end annotation
# static fields
2019-12-06 03:29:40 +00:00
.field public static final SAVE_STATE_TEXT:Ljava/lang/String; = "EditTextPreferenceDialogFragment.text"
2019-11-15 02:21:15 +00:00
# instance fields
2019-12-06 03:29:40 +00:00
.field public mEditText:Landroid/widget/EditText;
2019-11-15 02:21:15 +00:00
2019-12-06 03:29:40 +00:00
.field public mText:Ljava/lang/CharSequence;
2019-11-15 02:21:15 +00:00
# direct methods
.method public constructor <init>()V
.locals 0
.annotation runtime Ljava/lang/Deprecated;
.end annotation
invoke-direct {p0}, Landroidx/preference/PreferenceDialogFragment;-><init>()V
return-void
.end method
.method private getEditTextPreference()Landroidx/preference/EditTextPreference;
.locals 1
2019-12-06 03:29:40 +00:00
invoke-virtual {p0}, Landroidx/preference/PreferenceDialogFragment;->getPreference()Landroidx/preference/DialogPreference;
2019-11-15 02:21:15 +00:00
move-result-object v0
check-cast v0, Landroidx/preference/EditTextPreference;
return-object v0
.end method
.method public static newInstance(Ljava/lang/String;)Landroidx/preference/EditTextPreferenceDialogFragment;
.locals 3
.annotation runtime Ljava/lang/Deprecated;
.end annotation
new-instance v0, Landroidx/preference/EditTextPreferenceDialogFragment;
invoke-direct {v0}, Landroidx/preference/EditTextPreferenceDialogFragment;-><init>()V
new-instance v1, Landroid/os/Bundle;
const/4 v2, 0x1
invoke-direct {v1, v2}, Landroid/os/Bundle;-><init>(I)V
const-string v2, "key"
invoke-virtual {v1, v2, p0}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V
2019-12-06 03:29:40 +00:00
invoke-virtual {v0, v1}, Landroid/app/DialogFragment;->setArguments(Landroid/os/Bundle;)V
2019-11-15 02:21:15 +00:00
return-object v0
.end method
# virtual methods
2019-12-06 03:29:40 +00:00
.method public needInputMethod()Z
2019-11-15 02:21:15 +00:00
.locals 1
2019-12-06 03:29:40 +00:00
.annotation build Landroidx/annotation/RestrictTo;
value = {
.enum Landroidx/annotation/RestrictTo$Scope;->LIBRARY:Landroidx/annotation/RestrictTo$Scope;
}
.end annotation
2019-11-15 02:21:15 +00:00
const/4 v0, 0x1
return v0
.end method
2019-12-06 03:29:40 +00:00
.method public onBindDialogView(Landroid/view/View;)V
2019-11-15 02:21:15 +00:00
.locals 1
invoke-super {p0, p1}, Landroidx/preference/PreferenceDialogFragment;->onBindDialogView(Landroid/view/View;)V
const v0, 0x1020003
invoke-virtual {p1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;
move-result-object p1
check-cast p1, Landroid/widget/EditText;
iput-object p1, p0, Landroidx/preference/EditTextPreferenceDialogFragment;->mEditText:Landroid/widget/EditText;
iget-object p1, p0, Landroidx/preference/EditTextPreferenceDialogFragment;->mEditText:Landroid/widget/EditText;
invoke-virtual {p1}, Landroid/widget/EditText;->requestFocus()Z
iget-object p1, p0, Landroidx/preference/EditTextPreferenceDialogFragment;->mEditText:Landroid/widget/EditText;
if-eqz p1, :cond_0
iget-object v0, p0, Landroidx/preference/EditTextPreferenceDialogFragment;->mText:Ljava/lang/CharSequence;
invoke-virtual {p1, v0}, Landroid/widget/EditText;->setText(Ljava/lang/CharSequence;)V
iget-object p1, p0, Landroidx/preference/EditTextPreferenceDialogFragment;->mEditText:Landroid/widget/EditText;
invoke-virtual {p1}, Landroid/widget/EditText;->getText()Landroid/text/Editable;
move-result-object v0
invoke-interface {v0}, Landroid/text/Editable;->length()I
move-result v0
invoke-virtual {p1, v0}, Landroid/widget/EditText;->setSelection(I)V
return-void
:cond_0
new-instance p1, Ljava/lang/IllegalStateException;
const-string v0, "Dialog view must contain an EditText with id @android:id/edit"
invoke-direct {p1, v0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw p1
.end method
.method public onCreate(Landroid/os/Bundle;)V
.locals 1
invoke-super {p0, p1}, Landroidx/preference/PreferenceDialogFragment;->onCreate(Landroid/os/Bundle;)V
if-nez p1, :cond_0
invoke-direct {p0}, Landroidx/preference/EditTextPreferenceDialogFragment;->getEditTextPreference()Landroidx/preference/EditTextPreference;
move-result-object p1
invoke-virtual {p1}, Landroidx/preference/EditTextPreference;->getText()Ljava/lang/String;
move-result-object p1
iput-object p1, p0, Landroidx/preference/EditTextPreferenceDialogFragment;->mText:Ljava/lang/CharSequence;
2019-12-06 03:29:40 +00:00
goto :goto_0
2019-11-15 02:21:15 +00:00
:cond_0
const-string v0, "EditTextPreferenceDialogFragment.text"
invoke-virtual {p1, v0}, Landroid/os/Bundle;->getCharSequence(Ljava/lang/String;)Ljava/lang/CharSequence;
move-result-object p1
iput-object p1, p0, Landroidx/preference/EditTextPreferenceDialogFragment;->mText:Ljava/lang/CharSequence;
2019-12-06 03:29:40 +00:00
:goto_0
2019-11-15 02:21:15 +00:00
return-void
.end method
.method public onDialogClosed(Z)V
.locals 1
.annotation runtime Ljava/lang/Deprecated;
.end annotation
if-eqz p1, :cond_0
iget-object p1, p0, Landroidx/preference/EditTextPreferenceDialogFragment;->mEditText:Landroid/widget/EditText;
invoke-virtual {p1}, Landroid/widget/EditText;->getText()Landroid/text/Editable;
move-result-object p1
invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object p1
invoke-direct {p0}, Landroidx/preference/EditTextPreferenceDialogFragment;->getEditTextPreference()Landroidx/preference/EditTextPreference;
move-result-object v0
2019-12-06 03:29:40 +00:00
invoke-virtual {v0, p1}, Landroidx/preference/Preference;->callChangeListener(Ljava/lang/Object;)Z
2019-11-15 02:21:15 +00:00
move-result v0
if-eqz v0, :cond_0
invoke-direct {p0}, Landroidx/preference/EditTextPreferenceDialogFragment;->getEditTextPreference()Landroidx/preference/EditTextPreference;
move-result-object v0
invoke-virtual {v0, p1}, Landroidx/preference/EditTextPreference;->setText(Ljava/lang/String;)V
:cond_0
return-void
.end method
.method public onSaveInstanceState(Landroid/os/Bundle;)V
.locals 2
2019-12-06 03:29:40 +00:00
.param p1 # Landroid/os/Bundle;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
2019-11-15 02:21:15 +00:00
invoke-super {p0, p1}, Landroidx/preference/PreferenceDialogFragment;->onSaveInstanceState(Landroid/os/Bundle;)V
iget-object v0, p0, Landroidx/preference/EditTextPreferenceDialogFragment;->mText:Ljava/lang/CharSequence;
const-string v1, "EditTextPreferenceDialogFragment.text"
invoke-virtual {p1, v1, v0}, Landroid/os/Bundle;->putCharSequence(Ljava/lang/String;Ljava/lang/CharSequence;)V
return-void
.end method