apkfuckery/com.discord/smali/androidx/preference/PreferenceFragment.smali
2020-09-23 03:12:49 +00:00

1162 lines
37 KiB
Smali

.class public abstract Landroidx/preference/PreferenceFragment;
.super Landroid/app/Fragment;
.source "PreferenceFragment.java"
# interfaces
.implements Landroidx/preference/PreferenceManager$OnPreferenceTreeClickListener;
.implements Landroidx/preference/PreferenceManager$OnDisplayPreferenceDialogListener;
.implements Landroidx/preference/PreferenceManager$OnNavigateToScreenListener;
.implements Landroidx/preference/DialogPreference$TargetFragment;
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Landroidx/preference/PreferenceFragment$DividerDecoration;,
Landroidx/preference/PreferenceFragment$ScrollToPreferenceObserver;,
Landroidx/preference/PreferenceFragment$OnPreferenceDisplayDialogCallback;,
Landroidx/preference/PreferenceFragment$OnPreferenceStartScreenCallback;,
Landroidx/preference/PreferenceFragment$OnPreferenceStartFragmentCallback;
}
.end annotation
.annotation runtime Ljava/lang/Deprecated;
.end annotation
# static fields
.field public static final ARG_PREFERENCE_ROOT:Ljava/lang/String; = "androidx.preference.PreferenceFragmentCompat.PREFERENCE_ROOT"
.annotation runtime Ljava/lang/Deprecated;
.end annotation
.end field
.field public static final DIALOG_FRAGMENT_TAG:Ljava/lang/String; = "androidx.preference.PreferenceFragment.DIALOG"
.field public static final MSG_BIND_PREFERENCES:I = 0x1
.field public static final PREFERENCES_TAG:Ljava/lang/String; = "android:preferences"
# instance fields
.field public final mDividerDecoration:Landroidx/preference/PreferenceFragment$DividerDecoration;
.field public final mHandler:Landroid/os/Handler;
.field public mHavePrefs:Z
.field public mInitDone:Z
.field public mLayoutResId:I
.field public mList:Landroidx/recyclerview/widget/RecyclerView;
.field public mPreferenceManager:Landroidx/preference/PreferenceManager;
.field public final mRequestFocus:Ljava/lang/Runnable;
.field public mSelectPreferenceRunnable:Ljava/lang/Runnable;
.field public mStyledContext:Landroid/content/Context;
# direct methods
.method public constructor <init>()V
.locals 1
invoke-direct {p0}, Landroid/app/Fragment;-><init>()V
new-instance v0, Landroidx/preference/PreferenceFragment$DividerDecoration;
invoke-direct {v0, p0}, Landroidx/preference/PreferenceFragment$DividerDecoration;-><init>(Landroidx/preference/PreferenceFragment;)V
iput-object v0, p0, Landroidx/preference/PreferenceFragment;->mDividerDecoration:Landroidx/preference/PreferenceFragment$DividerDecoration;
sget v0, Landroidx/preference/R$layout;->preference_list_fragment:I
iput v0, p0, Landroidx/preference/PreferenceFragment;->mLayoutResId:I
new-instance v0, Landroidx/preference/PreferenceFragment$1;
invoke-direct {v0, p0}, Landroidx/preference/PreferenceFragment$1;-><init>(Landroidx/preference/PreferenceFragment;)V
iput-object v0, p0, Landroidx/preference/PreferenceFragment;->mHandler:Landroid/os/Handler;
new-instance v0, Landroidx/preference/PreferenceFragment$2;
invoke-direct {v0, p0}, Landroidx/preference/PreferenceFragment$2;-><init>(Landroidx/preference/PreferenceFragment;)V
iput-object v0, p0, Landroidx/preference/PreferenceFragment;->mRequestFocus:Ljava/lang/Runnable;
return-void
.end method
.method private postBindPreferences()V
.locals 2
iget-object v0, p0, Landroidx/preference/PreferenceFragment;->mHandler:Landroid/os/Handler;
const/4 v1, 0x1
invoke-virtual {v0, v1}, Landroid/os/Handler;->hasMessages(I)Z
move-result v0
if-eqz v0, :cond_0
return-void
:cond_0
iget-object v0, p0, Landroidx/preference/PreferenceFragment;->mHandler:Landroid/os/Handler;
invoke-virtual {v0, v1}, Landroid/os/Handler;->obtainMessage(I)Landroid/os/Message;
move-result-object v0
invoke-virtual {v0}, Landroid/os/Message;->sendToTarget()V
return-void
.end method
.method private requirePreferenceManager()V
.locals 2
iget-object v0, p0, Landroidx/preference/PreferenceFragment;->mPreferenceManager:Landroidx/preference/PreferenceManager;
if-eqz v0, :cond_0
return-void
:cond_0
new-instance v0, Ljava/lang/RuntimeException;
const-string v1, "This should be called after super.onCreate."
invoke-direct {v0, v1}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;)V
throw v0
.end method
.method private scrollToPreferenceInternal(Landroidx/preference/Preference;Ljava/lang/String;)V
.locals 1
new-instance v0, Landroidx/preference/PreferenceFragment$3;
invoke-direct {v0, p0, p1, p2}, Landroidx/preference/PreferenceFragment$3;-><init>(Landroidx/preference/PreferenceFragment;Landroidx/preference/Preference;Ljava/lang/String;)V
iget-object p1, p0, Landroidx/preference/PreferenceFragment;->mList:Landroidx/recyclerview/widget/RecyclerView;
if-nez p1, :cond_0
iput-object v0, p0, Landroidx/preference/PreferenceFragment;->mSelectPreferenceRunnable:Ljava/lang/Runnable;
goto :goto_0
:cond_0
invoke-virtual {v0}, Landroidx/preference/PreferenceFragment$3;->run()V
:goto_0
return-void
.end method
.method private unbindPreferences()V
.locals 1
invoke-virtual {p0}, Landroidx/preference/PreferenceFragment;->getPreferenceScreen()Landroidx/preference/PreferenceScreen;
move-result-object v0
if-eqz v0, :cond_0
invoke-virtual {v0}, Landroidx/preference/PreferenceGroup;->onDetached()V
:cond_0
invoke-virtual {p0}, Landroidx/preference/PreferenceFragment;->onUnbindPreferences()V
return-void
.end method
# virtual methods
.method public addPreferencesFromResource(I)V
.locals 3
.param p1 # I
.annotation build Landroidx/annotation/XmlRes;
.end annotation
.end param
.annotation runtime Ljava/lang/Deprecated;
.end annotation
invoke-direct {p0}, Landroidx/preference/PreferenceFragment;->requirePreferenceManager()V
iget-object v0, p0, Landroidx/preference/PreferenceFragment;->mPreferenceManager:Landroidx/preference/PreferenceManager;
iget-object v1, p0, Landroidx/preference/PreferenceFragment;->mStyledContext:Landroid/content/Context;
invoke-virtual {p0}, Landroidx/preference/PreferenceFragment;->getPreferenceScreen()Landroidx/preference/PreferenceScreen;
move-result-object v2
invoke-virtual {v0, v1, p1, v2}, Landroidx/preference/PreferenceManager;->inflateFromResource(Landroid/content/Context;ILandroidx/preference/PreferenceScreen;)Landroidx/preference/PreferenceScreen;
move-result-object p1
invoke-virtual {p0, p1}, Landroidx/preference/PreferenceFragment;->setPreferenceScreen(Landroidx/preference/PreferenceScreen;)V
return-void
.end method
.method public bindPreferences()V
.locals 3
invoke-virtual {p0}, Landroidx/preference/PreferenceFragment;->getPreferenceScreen()Landroidx/preference/PreferenceScreen;
move-result-object v0
if-eqz v0, :cond_0
invoke-virtual {p0}, Landroidx/preference/PreferenceFragment;->getListView()Landroidx/recyclerview/widget/RecyclerView;
move-result-object v1
invoke-virtual {p0, v0}, Landroidx/preference/PreferenceFragment;->onCreateAdapter(Landroidx/preference/PreferenceScreen;)Landroidx/recyclerview/widget/RecyclerView$Adapter;
move-result-object v2
invoke-virtual {v1, v2}, Landroidx/recyclerview/widget/RecyclerView;->setAdapter(Landroidx/recyclerview/widget/RecyclerView$Adapter;)V
invoke-virtual {v0}, Landroidx/preference/PreferenceGroup;->onAttached()V
:cond_0
invoke-virtual {p0}, Landroidx/preference/PreferenceFragment;->onBindPreferences()V
return-void
.end method
.method public findPreference(Ljava/lang/CharSequence;)Landroidx/preference/Preference;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Landroidx/preference/Preference;",
">(",
"Ljava/lang/CharSequence;",
")TT;"
}
.end annotation
.annotation runtime Ljava/lang/Deprecated;
.end annotation
iget-object v0, p0, Landroidx/preference/PreferenceFragment;->mPreferenceManager:Landroidx/preference/PreferenceManager;
if-nez v0, :cond_0
const/4 p1, 0x0
return-object p1
:cond_0
invoke-virtual {v0, p1}, Landroidx/preference/PreferenceManager;->findPreference(Ljava/lang/CharSequence;)Landroidx/preference/Preference;
move-result-object p1
return-object p1
.end method
.method public getCallbackFragment()Landroid/app/Fragment;
.locals 1
.annotation build Landroidx/annotation/RestrictTo;
value = {
.enum Landroidx/annotation/RestrictTo$Scope;->LIBRARY:Landroidx/annotation/RestrictTo$Scope;
}
.end annotation
const/4 v0, 0x0
return-object v0
.end method
.method public final getListView()Landroidx/recyclerview/widget/RecyclerView;
.locals 1
.annotation runtime Ljava/lang/Deprecated;
.end annotation
iget-object v0, p0, Landroidx/preference/PreferenceFragment;->mList:Landroidx/recyclerview/widget/RecyclerView;
return-object v0
.end method
.method public getPreferenceManager()Landroidx/preference/PreferenceManager;
.locals 1
.annotation runtime Ljava/lang/Deprecated;
.end annotation
iget-object v0, p0, Landroidx/preference/PreferenceFragment;->mPreferenceManager:Landroidx/preference/PreferenceManager;
return-object v0
.end method
.method public getPreferenceScreen()Landroidx/preference/PreferenceScreen;
.locals 1
.annotation runtime Ljava/lang/Deprecated;
.end annotation
iget-object v0, p0, Landroidx/preference/PreferenceFragment;->mPreferenceManager:Landroidx/preference/PreferenceManager;
invoke-virtual {v0}, Landroidx/preference/PreferenceManager;->getPreferenceScreen()Landroidx/preference/PreferenceScreen;
move-result-object v0
return-object v0
.end method
.method public onBindPreferences()V
.locals 0
.annotation build Landroidx/annotation/RestrictTo;
value = {
.enum Landroidx/annotation/RestrictTo$Scope;->LIBRARY:Landroidx/annotation/RestrictTo$Scope;
}
.end annotation
return-void
.end method
.method public onCreate(Landroid/os/Bundle;)V
.locals 4
invoke-super {p0, p1}, Landroid/app/Fragment;->onCreate(Landroid/os/Bundle;)V
new-instance v0, Landroid/util/TypedValue;
invoke-direct {v0}, Landroid/util/TypedValue;-><init>()V
invoke-virtual {p0}, Landroid/app/Fragment;->getActivity()Landroid/app/Activity;
move-result-object v1
invoke-virtual {v1}, Landroid/app/Activity;->getTheme()Landroid/content/res/Resources$Theme;
move-result-object v1
sget v2, Landroidx/preference/R$attr;->preferenceTheme:I
const/4 v3, 0x1
invoke-virtual {v1, v2, v0, v3}, Landroid/content/res/Resources$Theme;->resolveAttribute(ILandroid/util/TypedValue;Z)Z
iget v0, v0, Landroid/util/TypedValue;->resourceId:I
if-nez v0, :cond_0
sget v0, Landroidx/preference/R$style;->PreferenceThemeOverlay:I
:cond_0
new-instance v1, Landroid/view/ContextThemeWrapper;
invoke-virtual {p0}, Landroid/app/Fragment;->getActivity()Landroid/app/Activity;
move-result-object v2
invoke-direct {v1, v2, v0}, Landroid/view/ContextThemeWrapper;-><init>(Landroid/content/Context;I)V
iput-object v1, p0, Landroidx/preference/PreferenceFragment;->mStyledContext:Landroid/content/Context;
new-instance v0, Landroidx/preference/PreferenceManager;
invoke-direct {v0, v1}, Landroidx/preference/PreferenceManager;-><init>(Landroid/content/Context;)V
iput-object v0, p0, Landroidx/preference/PreferenceFragment;->mPreferenceManager:Landroidx/preference/PreferenceManager;
invoke-virtual {v0, p0}, Landroidx/preference/PreferenceManager;->setOnNavigateToScreenListener(Landroidx/preference/PreferenceManager$OnNavigateToScreenListener;)V
invoke-virtual {p0}, Landroid/app/Fragment;->getArguments()Landroid/os/Bundle;
move-result-object v0
if-eqz v0, :cond_1
invoke-virtual {p0}, Landroid/app/Fragment;->getArguments()Landroid/os/Bundle;
move-result-object v0
const-string v1, "androidx.preference.PreferenceFragmentCompat.PREFERENCE_ROOT"
invoke-virtual {v0, v1}, Landroid/os/Bundle;->getString(Ljava/lang/String;)Ljava/lang/String;
move-result-object v0
goto :goto_0
:cond_1
const/4 v0, 0x0
:goto_0
invoke-virtual {p0, p1, v0}, Landroidx/preference/PreferenceFragment;->onCreatePreferences(Landroid/os/Bundle;Ljava/lang/String;)V
return-void
.end method
.method public onCreateAdapter(Landroidx/preference/PreferenceScreen;)Landroidx/recyclerview/widget/RecyclerView$Adapter;
.locals 1
.annotation runtime Ljava/lang/Deprecated;
.end annotation
new-instance v0, Landroidx/preference/PreferenceGroupAdapter;
invoke-direct {v0, p1}, Landroidx/preference/PreferenceGroupAdapter;-><init>(Landroidx/preference/PreferenceGroup;)V
return-object v0
.end method
.method public onCreateLayoutManager()Landroidx/recyclerview/widget/RecyclerView$LayoutManager;
.locals 2
.annotation runtime Ljava/lang/Deprecated;
.end annotation
new-instance v0, Landroidx/recyclerview/widget/LinearLayoutManager;
invoke-virtual {p0}, Landroid/app/Fragment;->getActivity()Landroid/app/Activity;
move-result-object v1
invoke-direct {v0, v1}, Landroidx/recyclerview/widget/LinearLayoutManager;-><init>(Landroid/content/Context;)V
return-object v0
.end method
.method public abstract onCreatePreferences(Landroid/os/Bundle;Ljava/lang/String;)V
.annotation runtime Ljava/lang/Deprecated;
.end annotation
.end method
.method public onCreateRecyclerView(Landroid/view/LayoutInflater;Landroid/view/ViewGroup;Landroid/os/Bundle;)Landroidx/recyclerview/widget/RecyclerView;
.locals 1
.annotation runtime Ljava/lang/Deprecated;
.end annotation
iget-object p3, p0, Landroidx/preference/PreferenceFragment;->mStyledContext:Landroid/content/Context;
invoke-virtual {p3}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;
move-result-object p3
const-string v0, "android.hardware.type.automotive"
invoke-virtual {p3, v0}, Landroid/content/pm/PackageManager;->hasSystemFeature(Ljava/lang/String;)Z
move-result p3
if-eqz p3, :cond_0
sget p3, Landroidx/preference/R$id;->recycler_view:I
invoke-virtual {p2, p3}, Landroid/view/ViewGroup;->findViewById(I)Landroid/view/View;
move-result-object p3
check-cast p3, Landroidx/recyclerview/widget/RecyclerView;
if-eqz p3, :cond_0
return-object p3
:cond_0
sget p3, Landroidx/preference/R$layout;->preference_recyclerview:I
const/4 v0, 0x0
invoke-virtual {p1, p3, p2, v0}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;Z)Landroid/view/View;
move-result-object p1
check-cast p1, Landroidx/recyclerview/widget/RecyclerView;
invoke-virtual {p0}, Landroidx/preference/PreferenceFragment;->onCreateLayoutManager()Landroidx/recyclerview/widget/RecyclerView$LayoutManager;
move-result-object p2
invoke-virtual {p1, p2}, Landroidx/recyclerview/widget/RecyclerView;->setLayoutManager(Landroidx/recyclerview/widget/RecyclerView$LayoutManager;)V
new-instance p2, Landroidx/preference/PreferenceRecyclerViewAccessibilityDelegate;
invoke-direct {p2, p1}, Landroidx/preference/PreferenceRecyclerViewAccessibilityDelegate;-><init>(Landroidx/recyclerview/widget/RecyclerView;)V
invoke-virtual {p1, p2}, Landroidx/recyclerview/widget/RecyclerView;->setAccessibilityDelegateCompat(Landroidx/recyclerview/widget/RecyclerViewAccessibilityDelegate;)V
return-object p1
.end method
.method public onCreateView(Landroid/view/LayoutInflater;Landroid/view/ViewGroup;Landroid/os/Bundle;)Landroid/view/View;
.locals 7
iget-object v0, p0, Landroidx/preference/PreferenceFragment;->mStyledContext:Landroid/content/Context;
sget-object v1, Landroidx/preference/R$styleable;->PreferenceFragment:[I
sget v2, Landroidx/preference/R$attr;->preferenceFragmentStyle:I
const v3, 0x1010506
invoke-static {v0, v2, v3}, Landroidx/core/content/res/TypedArrayUtils;->getAttr(Landroid/content/Context;II)I
move-result v2
const/4 v3, 0x0
const/4 v4, 0x0
invoke-virtual {v0, v3, v1, v2, v4}, Landroid/content/Context;->obtainStyledAttributes(Landroid/util/AttributeSet;[III)Landroid/content/res/TypedArray;
move-result-object v0
sget v1, Landroidx/preference/R$styleable;->PreferenceFragment_android_layout:I
iget v2, p0, Landroidx/preference/PreferenceFragment;->mLayoutResId:I
invoke-virtual {v0, v1, v2}, Landroid/content/res/TypedArray;->getResourceId(II)I
move-result v1
iput v1, p0, Landroidx/preference/PreferenceFragment;->mLayoutResId:I
sget v1, Landroidx/preference/R$styleable;->PreferenceFragment_android_divider:I
invoke-virtual {v0, v1}, Landroid/content/res/TypedArray;->getDrawable(I)Landroid/graphics/drawable/Drawable;
move-result-object v1
sget v2, Landroidx/preference/R$styleable;->PreferenceFragment_android_dividerHeight:I
const/4 v3, -0x1
invoke-virtual {v0, v2, v3}, Landroid/content/res/TypedArray;->getDimensionPixelSize(II)I
move-result v2
sget v5, Landroidx/preference/R$styleable;->PreferenceFragment_allowDividerAfterLastItem:I
const/4 v6, 0x1
invoke-virtual {v0, v5, v6}, Landroid/content/res/TypedArray;->getBoolean(IZ)Z
move-result v5
invoke-virtual {v0}, Landroid/content/res/TypedArray;->recycle()V
iget-object v0, p0, Landroidx/preference/PreferenceFragment;->mStyledContext:Landroid/content/Context;
invoke-virtual {p1, v0}, Landroid/view/LayoutInflater;->cloneInContext(Landroid/content/Context;)Landroid/view/LayoutInflater;
move-result-object p1
iget v0, p0, Landroidx/preference/PreferenceFragment;->mLayoutResId:I
invoke-virtual {p1, v0, p2, v4}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;Z)Landroid/view/View;
move-result-object p2
const v0, 0x102003f
invoke-virtual {p2, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;
move-result-object v0
instance-of v4, v0, Landroid/view/ViewGroup;
if-eqz v4, :cond_3
check-cast v0, Landroid/view/ViewGroup;
invoke-virtual {p0, p1, v0, p3}, Landroidx/preference/PreferenceFragment;->onCreateRecyclerView(Landroid/view/LayoutInflater;Landroid/view/ViewGroup;Landroid/os/Bundle;)Landroidx/recyclerview/widget/RecyclerView;
move-result-object p1
if-eqz p1, :cond_2
iput-object p1, p0, Landroidx/preference/PreferenceFragment;->mList:Landroidx/recyclerview/widget/RecyclerView;
iget-object p3, p0, Landroidx/preference/PreferenceFragment;->mDividerDecoration:Landroidx/preference/PreferenceFragment$DividerDecoration;
invoke-virtual {p1, p3}, Landroidx/recyclerview/widget/RecyclerView;->addItemDecoration(Landroidx/recyclerview/widget/RecyclerView$ItemDecoration;)V
invoke-virtual {p0, v1}, Landroidx/preference/PreferenceFragment;->setDivider(Landroid/graphics/drawable/Drawable;)V
if-eq v2, v3, :cond_0
invoke-virtual {p0, v2}, Landroidx/preference/PreferenceFragment;->setDividerHeight(I)V
:cond_0
iget-object p1, p0, Landroidx/preference/PreferenceFragment;->mDividerDecoration:Landroidx/preference/PreferenceFragment$DividerDecoration;
invoke-virtual {p1, v5}, Landroidx/preference/PreferenceFragment$DividerDecoration;->setAllowDividerAfterLastItem(Z)V
iget-object p1, p0, Landroidx/preference/PreferenceFragment;->mList:Landroidx/recyclerview/widget/RecyclerView;
invoke-virtual {p1}, Landroid/view/ViewGroup;->getParent()Landroid/view/ViewParent;
move-result-object p1
if-nez p1, :cond_1
iget-object p1, p0, Landroidx/preference/PreferenceFragment;->mList:Landroidx/recyclerview/widget/RecyclerView;
invoke-virtual {v0, p1}, Landroid/view/ViewGroup;->addView(Landroid/view/View;)V
:cond_1
iget-object p1, p0, Landroidx/preference/PreferenceFragment;->mHandler:Landroid/os/Handler;
iget-object p3, p0, Landroidx/preference/PreferenceFragment;->mRequestFocus:Ljava/lang/Runnable;
invoke-virtual {p1, p3}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z
return-object p2
:cond_2
new-instance p1, Ljava/lang/RuntimeException;
const-string p2, "Could not create RecyclerView"
invoke-direct {p1, p2}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;)V
throw p1
:cond_3
new-instance p1, Ljava/lang/RuntimeException;
const-string p2, "Content has view with id attribute \'android.R.id.list_container\' that is not a ViewGroup class"
invoke-direct {p1, p2}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;)V
throw p1
.end method
.method public onDestroyView()V
.locals 2
iget-object v0, p0, Landroidx/preference/PreferenceFragment;->mHandler:Landroid/os/Handler;
iget-object v1, p0, Landroidx/preference/PreferenceFragment;->mRequestFocus:Ljava/lang/Runnable;
invoke-virtual {v0, v1}, Landroid/os/Handler;->removeCallbacks(Ljava/lang/Runnable;)V
iget-object v0, p0, Landroidx/preference/PreferenceFragment;->mHandler:Landroid/os/Handler;
const/4 v1, 0x1
invoke-virtual {v0, v1}, Landroid/os/Handler;->removeMessages(I)V
iget-boolean v0, p0, Landroidx/preference/PreferenceFragment;->mHavePrefs:Z
if-eqz v0, :cond_0
invoke-direct {p0}, Landroidx/preference/PreferenceFragment;->unbindPreferences()V
:cond_0
const/4 v0, 0x0
iput-object v0, p0, Landroidx/preference/PreferenceFragment;->mList:Landroidx/recyclerview/widget/RecyclerView;
invoke-super {p0}, Landroid/app/Fragment;->onDestroyView()V
return-void
.end method
.method public onDisplayPreferenceDialog(Landroidx/preference/Preference;)V
.locals 3
.annotation runtime Ljava/lang/Deprecated;
.end annotation
invoke-virtual {p0}, Landroidx/preference/PreferenceFragment;->getCallbackFragment()Landroid/app/Fragment;
move-result-object v0
instance-of v0, v0, Landroidx/preference/PreferenceFragment$OnPreferenceDisplayDialogCallback;
const/4 v1, 0x0
if-eqz v0, :cond_0
invoke-virtual {p0}, Landroidx/preference/PreferenceFragment;->getCallbackFragment()Landroid/app/Fragment;
move-result-object v0
check-cast v0, Landroidx/preference/PreferenceFragment$OnPreferenceDisplayDialogCallback;
invoke-interface {v0, p0, p1}, Landroidx/preference/PreferenceFragment$OnPreferenceDisplayDialogCallback;->onPreferenceDisplayDialog(Landroidx/preference/PreferenceFragment;Landroidx/preference/Preference;)Z
move-result v0
goto :goto_0
:cond_0
const/4 v0, 0x0
:goto_0
if-nez v0, :cond_1
invoke-virtual {p0}, Landroid/app/Fragment;->getActivity()Landroid/app/Activity;
move-result-object v2
instance-of v2, v2, Landroidx/preference/PreferenceFragment$OnPreferenceDisplayDialogCallback;
if-eqz v2, :cond_1
invoke-virtual {p0}, Landroid/app/Fragment;->getActivity()Landroid/app/Activity;
move-result-object v0
check-cast v0, Landroidx/preference/PreferenceFragment$OnPreferenceDisplayDialogCallback;
invoke-interface {v0, p0, p1}, Landroidx/preference/PreferenceFragment$OnPreferenceDisplayDialogCallback;->onPreferenceDisplayDialog(Landroidx/preference/PreferenceFragment;Landroidx/preference/Preference;)Z
move-result v0
:cond_1
if-eqz v0, :cond_2
return-void
:cond_2
invoke-virtual {p0}, Landroid/app/Fragment;->getFragmentManager()Landroid/app/FragmentManager;
move-result-object v0
const-string v2, "androidx.preference.PreferenceFragment.DIALOG"
invoke-virtual {v0, v2}, Landroid/app/FragmentManager;->findFragmentByTag(Ljava/lang/String;)Landroid/app/Fragment;
move-result-object v0
if-eqz v0, :cond_3
return-void
:cond_3
instance-of v0, p1, Landroidx/preference/EditTextPreference;
if-eqz v0, :cond_4
invoke-virtual {p1}, Landroidx/preference/Preference;->getKey()Ljava/lang/String;
move-result-object p1
invoke-static {p1}, Landroidx/preference/EditTextPreferenceDialogFragment;->newInstance(Ljava/lang/String;)Landroidx/preference/EditTextPreferenceDialogFragment;
move-result-object p1
goto :goto_1
:cond_4
instance-of v0, p1, Landroidx/preference/ListPreference;
if-eqz v0, :cond_5
invoke-virtual {p1}, Landroidx/preference/Preference;->getKey()Ljava/lang/String;
move-result-object p1
invoke-static {p1}, Landroidx/preference/ListPreferenceDialogFragment;->newInstance(Ljava/lang/String;)Landroidx/preference/ListPreferenceDialogFragment;
move-result-object p1
goto :goto_1
:cond_5
instance-of v0, p1, Landroidx/preference/MultiSelectListPreference;
if-eqz v0, :cond_6
invoke-virtual {p1}, Landroidx/preference/Preference;->getKey()Ljava/lang/String;
move-result-object p1
invoke-static {p1}, Landroidx/preference/MultiSelectListPreferenceDialogFragment;->newInstance(Ljava/lang/String;)Landroidx/preference/MultiSelectListPreferenceDialogFragment;
move-result-object p1
:goto_1
invoke-virtual {p1, p0, v1}, Landroid/app/DialogFragment;->setTargetFragment(Landroid/app/Fragment;I)V
invoke-virtual {p0}, Landroid/app/Fragment;->getFragmentManager()Landroid/app/FragmentManager;
move-result-object v0
invoke-virtual {p1, v0, v2}, Landroid/app/DialogFragment;->show(Landroid/app/FragmentManager;Ljava/lang/String;)V
return-void
:cond_6
new-instance p1, Ljava/lang/IllegalArgumentException;
const-string v0, "Tried to display dialog for unknown preference type. Did you forget to override onDisplayPreferenceDialog()?"
invoke-direct {p1, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p1
.end method
.method public onNavigateToScreen(Landroidx/preference/PreferenceScreen;)V
.locals 1
.annotation runtime Ljava/lang/Deprecated;
.end annotation
invoke-virtual {p0}, Landroidx/preference/PreferenceFragment;->getCallbackFragment()Landroid/app/Fragment;
move-result-object v0
instance-of v0, v0, Landroidx/preference/PreferenceFragment$OnPreferenceStartScreenCallback;
if-eqz v0, :cond_0
invoke-virtual {p0}, Landroidx/preference/PreferenceFragment;->getCallbackFragment()Landroid/app/Fragment;
move-result-object v0
check-cast v0, Landroidx/preference/PreferenceFragment$OnPreferenceStartScreenCallback;
invoke-interface {v0, p0, p1}, Landroidx/preference/PreferenceFragment$OnPreferenceStartScreenCallback;->onPreferenceStartScreen(Landroidx/preference/PreferenceFragment;Landroidx/preference/PreferenceScreen;)Z
move-result v0
goto :goto_0
:cond_0
const/4 v0, 0x0
:goto_0
if-nez v0, :cond_1
invoke-virtual {p0}, Landroid/app/Fragment;->getActivity()Landroid/app/Activity;
move-result-object v0
instance-of v0, v0, Landroidx/preference/PreferenceFragment$OnPreferenceStartScreenCallback;
if-eqz v0, :cond_1
invoke-virtual {p0}, Landroid/app/Fragment;->getActivity()Landroid/app/Activity;
move-result-object v0
check-cast v0, Landroidx/preference/PreferenceFragment$OnPreferenceStartScreenCallback;
invoke-interface {v0, p0, p1}, Landroidx/preference/PreferenceFragment$OnPreferenceStartScreenCallback;->onPreferenceStartScreen(Landroidx/preference/PreferenceFragment;Landroidx/preference/PreferenceScreen;)Z
:cond_1
return-void
.end method
.method public onPreferenceTreeClick(Landroidx/preference/Preference;)Z
.locals 2
.annotation runtime Ljava/lang/Deprecated;
.end annotation
invoke-virtual {p1}, Landroidx/preference/Preference;->getFragment()Ljava/lang/String;
move-result-object v0
const/4 v1, 0x0
if-eqz v0, :cond_1
invoke-virtual {p0}, Landroidx/preference/PreferenceFragment;->getCallbackFragment()Landroid/app/Fragment;
move-result-object v0
instance-of v0, v0, Landroidx/preference/PreferenceFragment$OnPreferenceStartFragmentCallback;
if-eqz v0, :cond_0
invoke-virtual {p0}, Landroidx/preference/PreferenceFragment;->getCallbackFragment()Landroid/app/Fragment;
move-result-object v0
check-cast v0, Landroidx/preference/PreferenceFragment$OnPreferenceStartFragmentCallback;
invoke-interface {v0, p0, p1}, Landroidx/preference/PreferenceFragment$OnPreferenceStartFragmentCallback;->onPreferenceStartFragment(Landroidx/preference/PreferenceFragment;Landroidx/preference/Preference;)Z
move-result v1
:cond_0
if-nez v1, :cond_1
invoke-virtual {p0}, Landroid/app/Fragment;->getActivity()Landroid/app/Activity;
move-result-object v0
instance-of v0, v0, Landroidx/preference/PreferenceFragment$OnPreferenceStartFragmentCallback;
if-eqz v0, :cond_1
invoke-virtual {p0}, Landroid/app/Fragment;->getActivity()Landroid/app/Activity;
move-result-object v0
check-cast v0, Landroidx/preference/PreferenceFragment$OnPreferenceStartFragmentCallback;
invoke-interface {v0, p0, p1}, Landroidx/preference/PreferenceFragment$OnPreferenceStartFragmentCallback;->onPreferenceStartFragment(Landroidx/preference/PreferenceFragment;Landroidx/preference/Preference;)Z
move-result v1
:cond_1
return v1
.end method
.method public onSaveInstanceState(Landroid/os/Bundle;)V
.locals 2
invoke-super {p0, p1}, Landroid/app/Fragment;->onSaveInstanceState(Landroid/os/Bundle;)V
invoke-virtual {p0}, Landroidx/preference/PreferenceFragment;->getPreferenceScreen()Landroidx/preference/PreferenceScreen;
move-result-object v0
if-eqz v0, :cond_0
new-instance v1, Landroid/os/Bundle;
invoke-direct {v1}, Landroid/os/Bundle;-><init>()V
invoke-virtual {v0, v1}, Landroidx/preference/Preference;->saveHierarchyState(Landroid/os/Bundle;)V
const-string v0, "android:preferences"
invoke-virtual {p1, v0, v1}, Landroid/os/Bundle;->putBundle(Ljava/lang/String;Landroid/os/Bundle;)V
:cond_0
return-void
.end method
.method public onStart()V
.locals 1
invoke-super {p0}, Landroid/app/Fragment;->onStart()V
iget-object v0, p0, Landroidx/preference/PreferenceFragment;->mPreferenceManager:Landroidx/preference/PreferenceManager;
invoke-virtual {v0, p0}, Landroidx/preference/PreferenceManager;->setOnPreferenceTreeClickListener(Landroidx/preference/PreferenceManager$OnPreferenceTreeClickListener;)V
iget-object v0, p0, Landroidx/preference/PreferenceFragment;->mPreferenceManager:Landroidx/preference/PreferenceManager;
invoke-virtual {v0, p0}, Landroidx/preference/PreferenceManager;->setOnDisplayPreferenceDialogListener(Landroidx/preference/PreferenceManager$OnDisplayPreferenceDialogListener;)V
return-void
.end method
.method public onStop()V
.locals 2
invoke-super {p0}, Landroid/app/Fragment;->onStop()V
iget-object v0, p0, Landroidx/preference/PreferenceFragment;->mPreferenceManager:Landroidx/preference/PreferenceManager;
const/4 v1, 0x0
invoke-virtual {v0, v1}, Landroidx/preference/PreferenceManager;->setOnPreferenceTreeClickListener(Landroidx/preference/PreferenceManager$OnPreferenceTreeClickListener;)V
iget-object v0, p0, Landroidx/preference/PreferenceFragment;->mPreferenceManager:Landroidx/preference/PreferenceManager;
invoke-virtual {v0, v1}, Landroidx/preference/PreferenceManager;->setOnDisplayPreferenceDialogListener(Landroidx/preference/PreferenceManager$OnDisplayPreferenceDialogListener;)V
return-void
.end method
.method public onUnbindPreferences()V
.locals 0
.annotation build Landroidx/annotation/RestrictTo;
value = {
.enum Landroidx/annotation/RestrictTo$Scope;->LIBRARY:Landroidx/annotation/RestrictTo$Scope;
}
.end annotation
return-void
.end method
.method public onViewCreated(Landroid/view/View;Landroid/os/Bundle;)V
.locals 0
invoke-super {p0, p1, p2}, Landroid/app/Fragment;->onViewCreated(Landroid/view/View;Landroid/os/Bundle;)V
if-eqz p2, :cond_0
const-string p1, "android:preferences"
invoke-virtual {p2, p1}, Landroid/os/Bundle;->getBundle(Ljava/lang/String;)Landroid/os/Bundle;
move-result-object p1
if-eqz p1, :cond_0
invoke-virtual {p0}, Landroidx/preference/PreferenceFragment;->getPreferenceScreen()Landroidx/preference/PreferenceScreen;
move-result-object p2
if-eqz p2, :cond_0
invoke-virtual {p2, p1}, Landroidx/preference/Preference;->restoreHierarchyState(Landroid/os/Bundle;)V
:cond_0
iget-boolean p1, p0, Landroidx/preference/PreferenceFragment;->mHavePrefs:Z
if-eqz p1, :cond_1
invoke-virtual {p0}, Landroidx/preference/PreferenceFragment;->bindPreferences()V
iget-object p1, p0, Landroidx/preference/PreferenceFragment;->mSelectPreferenceRunnable:Ljava/lang/Runnable;
if-eqz p1, :cond_1
invoke-interface {p1}, Ljava/lang/Runnable;->run()V
const/4 p1, 0x0
iput-object p1, p0, Landroidx/preference/PreferenceFragment;->mSelectPreferenceRunnable:Ljava/lang/Runnable;
:cond_1
const/4 p1, 0x1
iput-boolean p1, p0, Landroidx/preference/PreferenceFragment;->mInitDone:Z
return-void
.end method
.method public scrollToPreference(Landroidx/preference/Preference;)V
.locals 1
.annotation runtime Ljava/lang/Deprecated;
.end annotation
const/4 v0, 0x0
invoke-direct {p0, p1, v0}, Landroidx/preference/PreferenceFragment;->scrollToPreferenceInternal(Landroidx/preference/Preference;Ljava/lang/String;)V
return-void
.end method
.method public scrollToPreference(Ljava/lang/String;)V
.locals 1
.annotation runtime Ljava/lang/Deprecated;
.end annotation
const/4 v0, 0x0
invoke-direct {p0, v0, p1}, Landroidx/preference/PreferenceFragment;->scrollToPreferenceInternal(Landroidx/preference/Preference;Ljava/lang/String;)V
return-void
.end method
.method public setDivider(Landroid/graphics/drawable/Drawable;)V
.locals 1
.annotation runtime Ljava/lang/Deprecated;
.end annotation
iget-object v0, p0, Landroidx/preference/PreferenceFragment;->mDividerDecoration:Landroidx/preference/PreferenceFragment$DividerDecoration;
invoke-virtual {v0, p1}, Landroidx/preference/PreferenceFragment$DividerDecoration;->setDivider(Landroid/graphics/drawable/Drawable;)V
return-void
.end method
.method public setDividerHeight(I)V
.locals 1
.annotation runtime Ljava/lang/Deprecated;
.end annotation
iget-object v0, p0, Landroidx/preference/PreferenceFragment;->mDividerDecoration:Landroidx/preference/PreferenceFragment$DividerDecoration;
invoke-virtual {v0, p1}, Landroidx/preference/PreferenceFragment$DividerDecoration;->setDividerHeight(I)V
return-void
.end method
.method public setPreferenceScreen(Landroidx/preference/PreferenceScreen;)V
.locals 1
.annotation runtime Ljava/lang/Deprecated;
.end annotation
iget-object v0, p0, Landroidx/preference/PreferenceFragment;->mPreferenceManager:Landroidx/preference/PreferenceManager;
invoke-virtual {v0, p1}, Landroidx/preference/PreferenceManager;->setPreferences(Landroidx/preference/PreferenceScreen;)Z
move-result v0
if-eqz v0, :cond_0
if-eqz p1, :cond_0
invoke-virtual {p0}, Landroidx/preference/PreferenceFragment;->onUnbindPreferences()V
const/4 p1, 0x1
iput-boolean p1, p0, Landroidx/preference/PreferenceFragment;->mHavePrefs:Z
iget-boolean p1, p0, Landroidx/preference/PreferenceFragment;->mInitDone:Z
if-eqz p1, :cond_0
invoke-direct {p0}, Landroidx/preference/PreferenceFragment;->postBindPreferences()V
:cond_0
return-void
.end method
.method public setPreferencesFromResource(ILjava/lang/String;)V
.locals 3
.param p1 # I
.annotation build Landroidx/annotation/XmlRes;
.end annotation
.end param
.param p2 # Ljava/lang/String;
.annotation build Landroidx/annotation/Nullable;
.end annotation
.end param
.annotation runtime Ljava/lang/Deprecated;
.end annotation
invoke-direct {p0}, Landroidx/preference/PreferenceFragment;->requirePreferenceManager()V
iget-object v0, p0, Landroidx/preference/PreferenceFragment;->mPreferenceManager:Landroidx/preference/PreferenceManager;
iget-object v1, p0, Landroidx/preference/PreferenceFragment;->mStyledContext:Landroid/content/Context;
const/4 v2, 0x0
invoke-virtual {v0, v1, p1, v2}, Landroidx/preference/PreferenceManager;->inflateFromResource(Landroid/content/Context;ILandroidx/preference/PreferenceScreen;)Landroidx/preference/PreferenceScreen;
move-result-object p1
if-eqz p2, :cond_1
invoke-virtual {p1, p2}, Landroidx/preference/PreferenceGroup;->findPreference(Ljava/lang/CharSequence;)Landroidx/preference/Preference;
move-result-object p1
instance-of v0, p1, Landroidx/preference/PreferenceScreen;
if-eqz v0, :cond_0
goto :goto_0
:cond_0
new-instance p1, Ljava/lang/IllegalArgumentException;
const-string v0, "Preference object with key "
const-string v1, " is not a PreferenceScreen"
invoke-static {v0, p2, v1}, Lf/e/c/a/a;->r(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
move-result-object p2
invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p1
:cond_1
:goto_0
check-cast p1, Landroidx/preference/PreferenceScreen;
invoke-virtual {p0, p1}, Landroidx/preference/PreferenceFragment;->setPreferenceScreen(Landroidx/preference/PreferenceScreen;)V
return-void
.end method