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

226 lines
7 KiB
Smali
Raw Normal View History

2020-05-17 12:40:10 +00:00
.class public Landroidx/preference/EditTextPreferenceDialogFragmentCompat;
.super Landroidx/preference/PreferenceDialogFragmentCompat;
.source "EditTextPreferenceDialogFragmentCompat.java"
# static fields
.field public static final SAVE_STATE_TEXT:Ljava/lang/String; = "EditTextPreferenceDialogFragment.text"
# instance fields
.field public mEditText:Landroid/widget/EditText;
.field public mText:Ljava/lang/CharSequence;
# direct methods
.method public constructor <init>()V
.locals 0
invoke-direct {p0}, Landroidx/preference/PreferenceDialogFragmentCompat;-><init>()V
return-void
.end method
.method private getEditTextPreference()Landroidx/preference/EditTextPreference;
.locals 1
invoke-virtual {p0}, Landroidx/preference/PreferenceDialogFragmentCompat;->getPreference()Landroidx/preference/DialogPreference;
move-result-object v0
check-cast v0, Landroidx/preference/EditTextPreference;
return-object v0
.end method
.method public static newInstance(Ljava/lang/String;)Landroidx/preference/EditTextPreferenceDialogFragmentCompat;
.locals 3
new-instance v0, Landroidx/preference/EditTextPreferenceDialogFragmentCompat;
invoke-direct {v0}, Landroidx/preference/EditTextPreferenceDialogFragmentCompat;-><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
invoke-virtual {v0, v1}, Landroidx/fragment/app/Fragment;->setArguments(Landroid/os/Bundle;)V
return-object v0
.end method
# virtual methods
.method public needInputMethod()Z
.locals 1
.annotation build Landroidx/annotation/RestrictTo;
value = {
.enum Landroidx/annotation/RestrictTo$Scope;->LIBRARY:Landroidx/annotation/RestrictTo$Scope;
}
.end annotation
const/4 v0, 0x1
return v0
.end method
.method public onBindDialogView(Landroid/view/View;)V
.locals 1
invoke-super {p0, p1}, Landroidx/preference/PreferenceDialogFragmentCompat;->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/EditTextPreferenceDialogFragmentCompat;->mEditText:Landroid/widget/EditText;
if-eqz p1, :cond_1
invoke-virtual {p1}, Landroid/widget/EditText;->requestFocus()Z
iget-object p1, p0, Landroidx/preference/EditTextPreferenceDialogFragmentCompat;->mEditText:Landroid/widget/EditText;
iget-object v0, p0, Landroidx/preference/EditTextPreferenceDialogFragmentCompat;->mText:Ljava/lang/CharSequence;
invoke-virtual {p1, v0}, Landroid/widget/EditText;->setText(Ljava/lang/CharSequence;)V
iget-object p1, p0, Landroidx/preference/EditTextPreferenceDialogFragmentCompat;->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
invoke-direct {p0}, Landroidx/preference/EditTextPreferenceDialogFragmentCompat;->getEditTextPreference()Landroidx/preference/EditTextPreference;
move-result-object p1
invoke-virtual {p1}, Landroidx/preference/EditTextPreference;->getOnBindEditTextListener()Landroidx/preference/EditTextPreference$OnBindEditTextListener;
move-result-object p1
if-eqz p1, :cond_0
invoke-direct {p0}, Landroidx/preference/EditTextPreferenceDialogFragmentCompat;->getEditTextPreference()Landroidx/preference/EditTextPreference;
move-result-object p1
invoke-virtual {p1}, Landroidx/preference/EditTextPreference;->getOnBindEditTextListener()Landroidx/preference/EditTextPreference$OnBindEditTextListener;
move-result-object p1
iget-object v0, p0, Landroidx/preference/EditTextPreferenceDialogFragmentCompat;->mEditText:Landroid/widget/EditText;
invoke-interface {p1, v0}, Landroidx/preference/EditTextPreference$OnBindEditTextListener;->onBindEditText(Landroid/widget/EditText;)V
:cond_0
return-void
:cond_1
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/PreferenceDialogFragmentCompat;->onCreate(Landroid/os/Bundle;)V
if-nez p1, :cond_0
invoke-direct {p0}, Landroidx/preference/EditTextPreferenceDialogFragmentCompat;->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/EditTextPreferenceDialogFragmentCompat;->mText:Ljava/lang/CharSequence;
goto :goto_0
: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/EditTextPreferenceDialogFragmentCompat;->mText:Ljava/lang/CharSequence;
:goto_0
return-void
.end method
.method public onDialogClosed(Z)V
.locals 2
if-eqz p1, :cond_0
iget-object p1, p0, Landroidx/preference/EditTextPreferenceDialogFragmentCompat;->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/EditTextPreferenceDialogFragmentCompat;->getEditTextPreference()Landroidx/preference/EditTextPreference;
move-result-object v0
invoke-virtual {v0, p1}, Landroidx/preference/Preference;->callChangeListener(Ljava/lang/Object;)Z
move-result v1
if-eqz v1, :cond_0
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
.param p1 # Landroid/os/Bundle;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
invoke-super {p0, p1}, Landroidx/preference/PreferenceDialogFragmentCompat;->onSaveInstanceState(Landroid/os/Bundle;)V
iget-object v0, p0, Landroidx/preference/EditTextPreferenceDialogFragmentCompat;->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