2020-11-12 02:11:44 +00:00
|
|
|
.class public Landroidx/preference/ListPreferenceDialogFragmentCompat;
|
|
|
|
.super Landroidx/preference/PreferenceDialogFragmentCompat;
|
|
|
|
.source "ListPreferenceDialogFragmentCompat.java"
|
|
|
|
|
|
|
|
|
|
|
|
# static fields
|
2020-11-21 21:10:53 +00:00
|
|
|
.field public static final SAVE_STATE_ENTRIES:Ljava/lang/String; = "ListPreferenceDialogFragment.entries"
|
2020-11-12 02:11:44 +00:00
|
|
|
|
2020-11-21 21:10:53 +00:00
|
|
|
.field public static final SAVE_STATE_ENTRY_VALUES:Ljava/lang/String; = "ListPreferenceDialogFragment.entryValues"
|
2020-11-12 02:11:44 +00:00
|
|
|
|
2020-11-21 21:10:53 +00:00
|
|
|
.field public static final SAVE_STATE_INDEX:Ljava/lang/String; = "ListPreferenceDialogFragment.index"
|
2020-11-12 02:11:44 +00:00
|
|
|
|
|
|
|
|
|
|
|
# instance fields
|
|
|
|
.field public mClickedDialogEntryIndex:I
|
|
|
|
|
2020-11-21 21:10:53 +00:00
|
|
|
.field public mEntries:[Ljava/lang/CharSequence;
|
2020-11-12 02:11:44 +00:00
|
|
|
|
2020-11-21 21:10:53 +00:00
|
|
|
.field public mEntryValues:[Ljava/lang/CharSequence;
|
2020-11-12 02:11:44 +00:00
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
|
|
|
.method public constructor <init>()V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-direct {p0}, Landroidx/preference/PreferenceDialogFragmentCompat;-><init>()V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private getListPreference()Landroidx/preference/ListPreference;
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Landroidx/preference/PreferenceDialogFragmentCompat;->getPreference()Landroidx/preference/DialogPreference;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
check-cast v0, Landroidx/preference/ListPreference;
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static newInstance(Ljava/lang/String;)Landroidx/preference/ListPreferenceDialogFragmentCompat;
|
|
|
|
.locals 3
|
|
|
|
|
|
|
|
new-instance v0, Landroidx/preference/ListPreferenceDialogFragmentCompat;
|
|
|
|
|
|
|
|
invoke-direct {v0}, Landroidx/preference/ListPreferenceDialogFragmentCompat;-><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 onCreate(Landroid/os/Bundle;)V
|
|
|
|
.locals 2
|
|
|
|
|
|
|
|
invoke-super {p0, p1}, Landroidx/preference/PreferenceDialogFragmentCompat;->onCreate(Landroid/os/Bundle;)V
|
|
|
|
|
|
|
|
if-nez p1, :cond_1
|
|
|
|
|
|
|
|
invoke-direct {p0}, Landroidx/preference/ListPreferenceDialogFragmentCompat;->getListPreference()Landroidx/preference/ListPreference;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Landroidx/preference/ListPreference;->getEntries()[Ljava/lang/CharSequence;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Landroidx/preference/ListPreference;->getEntryValues()[Ljava/lang/CharSequence;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Landroidx/preference/ListPreference;->getValue()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-virtual {p1, v0}, Landroidx/preference/ListPreference;->findIndexOfValue(Ljava/lang/String;)I
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
iput v0, p0, Landroidx/preference/ListPreferenceDialogFragmentCompat;->mClickedDialogEntryIndex:I
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Landroidx/preference/ListPreference;->getEntries()[Ljava/lang/CharSequence;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
iput-object v0, p0, Landroidx/preference/ListPreferenceDialogFragmentCompat;->mEntries:[Ljava/lang/CharSequence;
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Landroidx/preference/ListPreference;->getEntryValues()[Ljava/lang/CharSequence;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
iput-object p1, p0, Landroidx/preference/ListPreferenceDialogFragmentCompat;->mEntryValues:[Ljava/lang/CharSequence;
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
new-instance p1, Ljava/lang/IllegalStateException;
|
|
|
|
|
|
|
|
const-string v0, "ListPreference requires an entries array and an entryValues array."
|
|
|
|
|
|
|
|
invoke-direct {p1, v0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
throw p1
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
const-string v1, "ListPreferenceDialogFragment.index"
|
|
|
|
|
|
|
|
invoke-virtual {p1, v1, v0}, Landroid/os/Bundle;->getInt(Ljava/lang/String;I)I
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
iput v0, p0, Landroidx/preference/ListPreferenceDialogFragmentCompat;->mClickedDialogEntryIndex:I
|
|
|
|
|
|
|
|
const-string v0, "ListPreferenceDialogFragment.entries"
|
|
|
|
|
|
|
|
invoke-virtual {p1, v0}, Landroid/os/Bundle;->getCharSequenceArray(Ljava/lang/String;)[Ljava/lang/CharSequence;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
iput-object v0, p0, Landroidx/preference/ListPreferenceDialogFragmentCompat;->mEntries:[Ljava/lang/CharSequence;
|
|
|
|
|
|
|
|
const-string v0, "ListPreferenceDialogFragment.entryValues"
|
|
|
|
|
|
|
|
invoke-virtual {p1, v0}, Landroid/os/Bundle;->getCharSequenceArray(Ljava/lang/String;)[Ljava/lang/CharSequence;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
iput-object p1, p0, Landroidx/preference/ListPreferenceDialogFragmentCompat;->mEntryValues:[Ljava/lang/CharSequence;
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public onDialogClosed(Z)V
|
|
|
|
.locals 2
|
|
|
|
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
|
|
|
|
iget p1, p0, Landroidx/preference/ListPreferenceDialogFragmentCompat;->mClickedDialogEntryIndex:I
|
|
|
|
|
|
|
|
if-ltz p1, :cond_0
|
|
|
|
|
|
|
|
iget-object v0, p0, Landroidx/preference/ListPreferenceDialogFragmentCompat;->mEntryValues:[Ljava/lang/CharSequence;
|
|
|
|
|
|
|
|
aget-object p1, v0, p1
|
|
|
|
|
|
|
|
invoke-interface {p1}, Ljava/lang/CharSequence;->toString()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-direct {p0}, Landroidx/preference/ListPreferenceDialogFragmentCompat;->getListPreference()Landroidx/preference/ListPreference;
|
|
|
|
|
|
|
|
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/ListPreference;->setValue(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public onPrepareDialogBuilder(Landroidx/appcompat/app/AlertDialog$Builder;)V
|
|
|
|
.locals 3
|
|
|
|
|
|
|
|
invoke-super {p0, p1}, Landroidx/preference/PreferenceDialogFragmentCompat;->onPrepareDialogBuilder(Landroidx/appcompat/app/AlertDialog$Builder;)V
|
|
|
|
|
|
|
|
iget-object v0, p0, Landroidx/preference/ListPreferenceDialogFragmentCompat;->mEntries:[Ljava/lang/CharSequence;
|
|
|
|
|
|
|
|
iget v1, p0, Landroidx/preference/ListPreferenceDialogFragmentCompat;->mClickedDialogEntryIndex:I
|
|
|
|
|
|
|
|
new-instance v2, Landroidx/preference/ListPreferenceDialogFragmentCompat$1;
|
|
|
|
|
|
|
|
invoke-direct {v2, p0}, Landroidx/preference/ListPreferenceDialogFragmentCompat$1;-><init>(Landroidx/preference/ListPreferenceDialogFragmentCompat;)V
|
|
|
|
|
|
|
|
invoke-virtual {p1, v0, v1, v2}, Landroidx/appcompat/app/AlertDialog$Builder;->setSingleChoiceItems([Ljava/lang/CharSequence;ILandroid/content/DialogInterface$OnClickListener;)Landroidx/appcompat/app/AlertDialog$Builder;
|
|
|
|
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
invoke-virtual {p1, v0, v0}, Landroidx/appcompat/app/AlertDialog$Builder;->setPositiveButton(Ljava/lang/CharSequence;Landroid/content/DialogInterface$OnClickListener;)Landroidx/appcompat/app/AlertDialog$Builder;
|
|
|
|
|
|
|
|
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 v0, p0, Landroidx/preference/ListPreferenceDialogFragmentCompat;->mClickedDialogEntryIndex:I
|
|
|
|
|
|
|
|
const-string v1, "ListPreferenceDialogFragment.index"
|
|
|
|
|
|
|
|
invoke-virtual {p1, v1, v0}, Landroid/os/Bundle;->putInt(Ljava/lang/String;I)V
|
|
|
|
|
|
|
|
iget-object v0, p0, Landroidx/preference/ListPreferenceDialogFragmentCompat;->mEntries:[Ljava/lang/CharSequence;
|
|
|
|
|
|
|
|
const-string v1, "ListPreferenceDialogFragment.entries"
|
|
|
|
|
|
|
|
invoke-virtual {p1, v1, v0}, Landroid/os/Bundle;->putCharSequenceArray(Ljava/lang/String;[Ljava/lang/CharSequence;)V
|
|
|
|
|
|
|
|
iget-object v0, p0, Landroidx/preference/ListPreferenceDialogFragmentCompat;->mEntryValues:[Ljava/lang/CharSequence;
|
|
|
|
|
|
|
|
const-string v1, "ListPreferenceDialogFragment.entryValues"
|
|
|
|
|
|
|
|
invoke-virtual {p1, v1, v0}, Landroid/os/Bundle;->putCharSequenceArray(Ljava/lang/String;[Ljava/lang/CharSequence;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|