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

218 lines
6.3 KiB
Smali
Raw Normal View History

2020-05-17 12:40:10 +00:00
.class public Landroidx/preference/EditTextPreferenceDialogFragment;
.super Landroidx/preference/PreferenceDialogFragment;
.source "EditTextPreferenceDialogFragment.java"
# annotations
.annotation runtime Ljava/lang/Deprecated;
.end annotation
# 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
.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
invoke-virtual {p0}, Landroidx/preference/PreferenceDialogFragment;->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/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
invoke-virtual {v0, v1}, Landroid/app/DialogFragment;->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/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;
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;
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/EditTextPreferenceDialogFragment;->mText:Ljava/lang/CharSequence;
:goto_0
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
invoke-virtual {v0, p1}, Landroidx/preference/Preference;->callChangeListener(Ljava/lang/Object;)Z
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
.param p1 # Landroid/os/Bundle;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
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