2019-11-15 02:21:15 +00:00
|
|
|
.class public Landroidx/preference/MultiSelectListPreferenceDialogFragment;
|
|
|
|
.super Landroidx/preference/PreferenceDialogFragment;
|
|
|
|
.source "MultiSelectListPreferenceDialogFragment.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_CHANGED:Ljava/lang/String; = "MultiSelectListPreferenceDialogFragment.changed"
|
2019-11-15 02:21:15 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
.field public static final SAVE_STATE_ENTRIES:Ljava/lang/String; = "MultiSelectListPreferenceDialogFragment.entries"
|
2019-11-15 02:21:15 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
.field public static final SAVE_STATE_ENTRY_VALUES:Ljava/lang/String; = "MultiSelectListPreferenceDialogFragment.entryValues"
|
2019-11-15 02:21:15 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
.field public static final SAVE_STATE_VALUES:Ljava/lang/String; = "MultiSelectListPreferenceDialogFragment.values"
|
2019-11-15 02:21:15 +00:00
|
|
|
|
|
|
|
|
|
|
|
# instance fields
|
2019-12-06 03:29:40 +00:00
|
|
|
.field public mEntries:[Ljava/lang/CharSequence;
|
2019-11-15 02:21:15 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
.field public mEntryValues:[Ljava/lang/CharSequence;
|
2019-11-15 02:21:15 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
.field public mNewValues:Ljava/util/Set;
|
2019-11-15 02:21:15 +00:00
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"Ljava/util/Set<",
|
|
|
|
"Ljava/lang/String;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
.field public mPreferenceChanged:Z
|
2019-11-15 02:21:15 +00:00
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
|
|
|
.method public constructor <init>()V
|
|
|
|
.locals 1
|
|
|
|
.annotation runtime Ljava/lang/Deprecated;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
invoke-direct {p0}, Landroidx/preference/PreferenceDialogFragment;-><init>()V
|
|
|
|
|
|
|
|
new-instance v0, Ljava/util/HashSet;
|
|
|
|
|
|
|
|
invoke-direct {v0}, Ljava/util/HashSet;-><init>()V
|
|
|
|
|
|
|
|
iput-object v0, p0, Landroidx/preference/MultiSelectListPreferenceDialogFragment;->mNewValues:Ljava/util/Set;
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private getListPreference()Landroidx/preference/MultiSelectListPreference;
|
|
|
|
.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/MultiSelectListPreference;
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static newInstance(Ljava/lang/String;)Landroidx/preference/MultiSelectListPreferenceDialogFragment;
|
|
|
|
.locals 3
|
|
|
|
.annotation runtime Ljava/lang/Deprecated;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
new-instance v0, Landroidx/preference/MultiSelectListPreferenceDialogFragment;
|
|
|
|
|
|
|
|
invoke-direct {v0}, Landroidx/preference/MultiSelectListPreferenceDialogFragment;-><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
|
|
|
|
.method public onCreate(Landroid/os/Bundle;)V
|
|
|
|
.locals 3
|
|
|
|
|
|
|
|
invoke-super {p0, p1}, Landroidx/preference/PreferenceDialogFragment;->onCreate(Landroid/os/Bundle;)V
|
|
|
|
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
if-nez p1, :cond_1
|
|
|
|
|
|
|
|
invoke-direct {p0}, Landroidx/preference/MultiSelectListPreferenceDialogFragment;->getListPreference()Landroidx/preference/MultiSelectListPreference;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Landroidx/preference/MultiSelectListPreference;->getEntries()[Ljava/lang/CharSequence;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Landroidx/preference/MultiSelectListPreference;->getEntryValues()[Ljava/lang/CharSequence;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
|
|
|
|
iget-object v1, p0, Landroidx/preference/MultiSelectListPreferenceDialogFragment;->mNewValues:Ljava/util/Set;
|
|
|
|
|
|
|
|
invoke-interface {v1}, Ljava/util/Set;->clear()V
|
|
|
|
|
|
|
|
iget-object v1, p0, Landroidx/preference/MultiSelectListPreferenceDialogFragment;->mNewValues:Ljava/util/Set;
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Landroidx/preference/MultiSelectListPreference;->getValues()Ljava/util/Set;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
invoke-interface {v1, v2}, Ljava/util/Set;->addAll(Ljava/util/Collection;)Z
|
|
|
|
|
|
|
|
iput-boolean v0, p0, Landroidx/preference/MultiSelectListPreferenceDialogFragment;->mPreferenceChanged:Z
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Landroidx/preference/MultiSelectListPreference;->getEntries()[Ljava/lang/CharSequence;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
iput-object v0, p0, Landroidx/preference/MultiSelectListPreferenceDialogFragment;->mEntries:[Ljava/lang/CharSequence;
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Landroidx/preference/MultiSelectListPreference;->getEntryValues()[Ljava/lang/CharSequence;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
iput-object p1, p0, Landroidx/preference/MultiSelectListPreferenceDialogFragment;->mEntryValues:[Ljava/lang/CharSequence;
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
goto :goto_0
|
2019-11-15 02:21:15 +00:00
|
|
|
|
|
|
|
:cond_0
|
|
|
|
new-instance p1, Ljava/lang/IllegalStateException;
|
|
|
|
|
|
|
|
const-string v0, "MultiSelectListPreference requires an entries array and an entryValues array."
|
|
|
|
|
|
|
|
invoke-direct {p1, v0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
throw p1
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
iget-object v1, p0, Landroidx/preference/MultiSelectListPreferenceDialogFragment;->mNewValues:Ljava/util/Set;
|
|
|
|
|
|
|
|
invoke-interface {v1}, Ljava/util/Set;->clear()V
|
|
|
|
|
|
|
|
iget-object v1, p0, Landroidx/preference/MultiSelectListPreferenceDialogFragment;->mNewValues:Ljava/util/Set;
|
|
|
|
|
|
|
|
const-string v2, "MultiSelectListPreferenceDialogFragment.values"
|
|
|
|
|
|
|
|
invoke-virtual {p1, v2}, Landroid/os/Bundle;->getStringArrayList(Ljava/lang/String;)Ljava/util/ArrayList;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
invoke-interface {v1, v2}, Ljava/util/Set;->addAll(Ljava/util/Collection;)Z
|
|
|
|
|
|
|
|
const-string v1, "MultiSelectListPreferenceDialogFragment.changed"
|
|
|
|
|
|
|
|
invoke-virtual {p1, v1, v0}, Landroid/os/Bundle;->getBoolean(Ljava/lang/String;Z)Z
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
iput-boolean v0, p0, Landroidx/preference/MultiSelectListPreferenceDialogFragment;->mPreferenceChanged:Z
|
|
|
|
|
|
|
|
const-string v0, "MultiSelectListPreferenceDialogFragment.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/MultiSelectListPreferenceDialogFragment;->mEntries:[Ljava/lang/CharSequence;
|
|
|
|
|
|
|
|
const-string v0, "MultiSelectListPreferenceDialogFragment.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/MultiSelectListPreferenceDialogFragment;->mEntryValues:[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 2
|
|
|
|
.annotation runtime Ljava/lang/Deprecated;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
invoke-direct {p0}, Landroidx/preference/MultiSelectListPreferenceDialogFragment;->getListPreference()Landroidx/preference/MultiSelectListPreference;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
|
|
|
|
iget-boolean p1, p0, Landroidx/preference/MultiSelectListPreferenceDialogFragment;->mPreferenceChanged:Z
|
|
|
|
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
|
|
|
|
iget-object p1, p0, Landroidx/preference/MultiSelectListPreferenceDialogFragment;->mNewValues:Ljava/util/Set;
|
|
|
|
|
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 v1
|
|
|
|
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
|
|
|
|
invoke-virtual {v0, p1}, Landroidx/preference/MultiSelectListPreference;->setValues(Ljava/util/Set;)V
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const/4 p1, 0x0
|
|
|
|
|
|
|
|
iput-boolean p1, p0, Landroidx/preference/MultiSelectListPreferenceDialogFragment;->mPreferenceChanged:Z
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
.method public onPrepareDialogBuilder(Landroid/app/AlertDialog$Builder;)V
|
2019-11-15 02:21:15 +00:00
|
|
|
.locals 5
|
|
|
|
|
|
|
|
invoke-super {p0, p1}, Landroidx/preference/PreferenceDialogFragment;->onPrepareDialogBuilder(Landroid/app/AlertDialog$Builder;)V
|
|
|
|
|
|
|
|
iget-object v0, p0, Landroidx/preference/MultiSelectListPreferenceDialogFragment;->mEntryValues:[Ljava/lang/CharSequence;
|
|
|
|
|
|
|
|
array-length v0, v0
|
|
|
|
|
|
|
|
new-array v1, v0, [Z
|
|
|
|
|
|
|
|
const/4 v2, 0x0
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
if-ge v2, v0, :cond_0
|
|
|
|
|
|
|
|
iget-object v3, p0, Landroidx/preference/MultiSelectListPreferenceDialogFragment;->mNewValues:Ljava/util/Set;
|
|
|
|
|
|
|
|
iget-object v4, p0, Landroidx/preference/MultiSelectListPreferenceDialogFragment;->mEntryValues:[Ljava/lang/CharSequence;
|
|
|
|
|
|
|
|
aget-object v4, v4, v2
|
|
|
|
|
|
|
|
invoke-interface {v4}, Ljava/lang/CharSequence;->toString()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v4
|
|
|
|
|
|
|
|
invoke-interface {v3, v4}, Ljava/util/Set;->contains(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
move-result v3
|
|
|
|
|
|
|
|
aput-boolean v3, v1, v2
|
|
|
|
|
|
|
|
add-int/lit8 v2, v2, 0x1
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
iget-object v0, p0, Landroidx/preference/MultiSelectListPreferenceDialogFragment;->mEntries:[Ljava/lang/CharSequence;
|
|
|
|
|
|
|
|
new-instance v2, Landroidx/preference/MultiSelectListPreferenceDialogFragment$1;
|
|
|
|
|
|
|
|
invoke-direct {v2, p0}, Landroidx/preference/MultiSelectListPreferenceDialogFragment$1;-><init>(Landroidx/preference/MultiSelectListPreferenceDialogFragment;)V
|
|
|
|
|
|
|
|
invoke-virtual {p1, v0, v1, v2}, Landroid/app/AlertDialog$Builder;->setMultiChoiceItems([Ljava/lang/CharSequence;[ZLandroid/content/DialogInterface$OnMultiChoiceClickListener;)Landroid/app/AlertDialog$Builder;
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
new-instance v0, Ljava/util/ArrayList;
|
|
|
|
|
|
|
|
iget-object v1, p0, Landroidx/preference/MultiSelectListPreferenceDialogFragment;->mNewValues:Ljava/util/Set;
|
|
|
|
|
|
|
|
invoke-direct {v0, v1}, Ljava/util/ArrayList;-><init>(Ljava/util/Collection;)V
|
|
|
|
|
|
|
|
const-string v1, "MultiSelectListPreferenceDialogFragment.values"
|
|
|
|
|
|
|
|
invoke-virtual {p1, v1, v0}, Landroid/os/Bundle;->putStringArrayList(Ljava/lang/String;Ljava/util/ArrayList;)V
|
|
|
|
|
|
|
|
iget-boolean v0, p0, Landroidx/preference/MultiSelectListPreferenceDialogFragment;->mPreferenceChanged:Z
|
|
|
|
|
|
|
|
const-string v1, "MultiSelectListPreferenceDialogFragment.changed"
|
|
|
|
|
|
|
|
invoke-virtual {p1, v1, v0}, Landroid/os/Bundle;->putBoolean(Ljava/lang/String;Z)V
|
|
|
|
|
|
|
|
iget-object v0, p0, Landroidx/preference/MultiSelectListPreferenceDialogFragment;->mEntries:[Ljava/lang/CharSequence;
|
|
|
|
|
|
|
|
const-string v1, "MultiSelectListPreferenceDialogFragment.entries"
|
|
|
|
|
|
|
|
invoke-virtual {p1, v1, v0}, Landroid/os/Bundle;->putCharSequenceArray(Ljava/lang/String;[Ljava/lang/CharSequence;)V
|
|
|
|
|
|
|
|
iget-object v0, p0, Landroidx/preference/MultiSelectListPreferenceDialogFragment;->mEntryValues:[Ljava/lang/CharSequence;
|
|
|
|
|
|
|
|
const-string v1, "MultiSelectListPreferenceDialogFragment.entryValues"
|
|
|
|
|
|
|
|
invoke-virtual {p1, v1, v0}, Landroid/os/Bundle;->putCharSequenceArray(Ljava/lang/String;[Ljava/lang/CharSequence;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|