apkfuckery/com.discord/smali/androidx/preference/PreferenceFragmentCompat.smali
2019-11-15 03:21:15 +01:00

1226 lines
41 KiB
Smali

.class public abstract Landroidx/preference/PreferenceFragmentCompat;
.super Landroidx/fragment/app/Fragment;
.source "PreferenceFragmentCompat.java"
# interfaces
.implements Landroidx/preference/DialogPreference$TargetFragment;
.implements Landroidx/preference/PreferenceManager$OnDisplayPreferenceDialogListener;
.implements Landroidx/preference/PreferenceManager$OnNavigateToScreenListener;
.implements Landroidx/preference/PreferenceManager$OnPreferenceTreeClickListener;
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Landroidx/preference/PreferenceFragmentCompat$DividerDecoration;,
Landroidx/preference/PreferenceFragmentCompat$ScrollToPreferenceObserver;,
Landroidx/preference/PreferenceFragmentCompat$OnPreferenceDisplayDialogCallback;,
Landroidx/preference/PreferenceFragmentCompat$OnPreferenceStartScreenCallback;,
Landroidx/preference/PreferenceFragmentCompat$OnPreferenceStartFragmentCallback;
}
.end annotation
# static fields
.field public static final ARG_PREFERENCE_ROOT:Ljava/lang/String; = "androidx.preference.PreferenceFragmentCompat.PREFERENCE_ROOT"
.field private static final DIALOG_FRAGMENT_TAG:Ljava/lang/String; = "androidx.preference.PreferenceFragment.DIALOG"
.field private static final MSG_BIND_PREFERENCES:I = 0x1
.field private static final PREFERENCES_TAG:Ljava/lang/String; = "android:preferences"
.field private static final TAG:Ljava/lang/String; = "PreferenceFragment"
# instance fields
.field private final mDividerDecoration:Landroidx/preference/PreferenceFragmentCompat$DividerDecoration;
.field private mHandler:Landroid/os/Handler;
.field private mHavePrefs:Z
.field private mInitDone:Z
.field private mLayoutResId:I
.field mList:Landroidx/recyclerview/widget/RecyclerView;
.field private mPreferenceManager:Landroidx/preference/PreferenceManager;
.field private final mRequestFocus:Ljava/lang/Runnable;
.field private mSelectPreferenceRunnable:Ljava/lang/Runnable;
# direct methods
.method public constructor <init>()V
.locals 1
invoke-direct {p0}, Landroidx/fragment/app/Fragment;-><init>()V
new-instance v0, Landroidx/preference/PreferenceFragmentCompat$DividerDecoration;
invoke-direct {v0, p0}, Landroidx/preference/PreferenceFragmentCompat$DividerDecoration;-><init>(Landroidx/preference/PreferenceFragmentCompat;)V
iput-object v0, p0, Landroidx/preference/PreferenceFragmentCompat;->mDividerDecoration:Landroidx/preference/PreferenceFragmentCompat$DividerDecoration;
sget v0, Landroidx/preference/R$layout;->preference_list_fragment:I
iput v0, p0, Landroidx/preference/PreferenceFragmentCompat;->mLayoutResId:I
new-instance v0, Landroidx/preference/PreferenceFragmentCompat$1;
invoke-direct {v0, p0}, Landroidx/preference/PreferenceFragmentCompat$1;-><init>(Landroidx/preference/PreferenceFragmentCompat;)V
iput-object v0, p0, Landroidx/preference/PreferenceFragmentCompat;->mHandler:Landroid/os/Handler;
new-instance v0, Landroidx/preference/PreferenceFragmentCompat$2;
invoke-direct {v0, p0}, Landroidx/preference/PreferenceFragmentCompat$2;-><init>(Landroidx/preference/PreferenceFragmentCompat;)V
iput-object v0, p0, Landroidx/preference/PreferenceFragmentCompat;->mRequestFocus:Ljava/lang/Runnable;
return-void
.end method
.method private postBindPreferences()V
.locals 2
iget-object v0, p0, Landroidx/preference/PreferenceFragmentCompat;->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/PreferenceFragmentCompat;->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/PreferenceFragmentCompat;->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/PreferenceFragmentCompat$3;
invoke-direct {v0, p0, p1, p2}, Landroidx/preference/PreferenceFragmentCompat$3;-><init>(Landroidx/preference/PreferenceFragmentCompat;Landroidx/preference/Preference;Ljava/lang/String;)V
iget-object p1, p0, Landroidx/preference/PreferenceFragmentCompat;->mList:Landroidx/recyclerview/widget/RecyclerView;
if-nez p1, :cond_0
iput-object v0, p0, Landroidx/preference/PreferenceFragmentCompat;->mSelectPreferenceRunnable:Ljava/lang/Runnable;
return-void
:cond_0
invoke-interface {v0}, Ljava/lang/Runnable;->run()V
return-void
.end method
.method private unbindPreferences()V
.locals 2
invoke-virtual {p0}, Landroidx/preference/PreferenceFragmentCompat;->getListView()Landroidx/recyclerview/widget/RecyclerView;
move-result-object v0
const/4 v1, 0x0
invoke-virtual {v0, v1}, Landroidx/recyclerview/widget/RecyclerView;->setAdapter(Landroidx/recyclerview/widget/RecyclerView$Adapter;)V
invoke-virtual {p0}, Landroidx/preference/PreferenceFragmentCompat;->getPreferenceScreen()Landroidx/preference/PreferenceScreen;
move-result-object v0
if-eqz v0, :cond_0
invoke-virtual {v0}, Landroidx/preference/PreferenceScreen;->onDetached()V
:cond_0
invoke-virtual {p0}, Landroidx/preference/PreferenceFragmentCompat;->onUnbindPreferences()V
return-void
.end method
# virtual methods
.method public addPreferencesFromResource(I)V
.locals 3
invoke-direct {p0}, Landroidx/preference/PreferenceFragmentCompat;->requirePreferenceManager()V
iget-object v0, p0, Landroidx/preference/PreferenceFragmentCompat;->mPreferenceManager:Landroidx/preference/PreferenceManager;
invoke-virtual {p0}, Landroidx/preference/PreferenceFragmentCompat;->getContext()Landroid/content/Context;
move-result-object v1
invoke-virtual {p0}, Landroidx/preference/PreferenceFragmentCompat;->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/PreferenceFragmentCompat;->setPreferenceScreen(Landroidx/preference/PreferenceScreen;)V
return-void
.end method
.method bindPreferences()V
.locals 3
invoke-virtual {p0}, Landroidx/preference/PreferenceFragmentCompat;->getPreferenceScreen()Landroidx/preference/PreferenceScreen;
move-result-object v0
if-eqz v0, :cond_0
invoke-virtual {p0}, Landroidx/preference/PreferenceFragmentCompat;->getListView()Landroidx/recyclerview/widget/RecyclerView;
move-result-object v1
invoke-virtual {p0, v0}, Landroidx/preference/PreferenceFragmentCompat;->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/PreferenceScreen;->onAttached()V
:cond_0
invoke-virtual {p0}, Landroidx/preference/PreferenceFragmentCompat;->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
iget-object v0, p0, Landroidx/preference/PreferenceFragmentCompat;->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()Landroidx/fragment/app/Fragment;
.locals 1
const/4 v0, 0x0
return-object v0
.end method
.method public final getListView()Landroidx/recyclerview/widget/RecyclerView;
.locals 1
iget-object v0, p0, Landroidx/preference/PreferenceFragmentCompat;->mList:Landroidx/recyclerview/widget/RecyclerView;
return-object v0
.end method
.method public getPreferenceManager()Landroidx/preference/PreferenceManager;
.locals 1
iget-object v0, p0, Landroidx/preference/PreferenceFragmentCompat;->mPreferenceManager:Landroidx/preference/PreferenceManager;
return-object v0
.end method
.method public getPreferenceScreen()Landroidx/preference/PreferenceScreen;
.locals 1
iget-object v0, p0, Landroidx/preference/PreferenceFragmentCompat;->mPreferenceManager:Landroidx/preference/PreferenceManager;
invoke-virtual {v0}, Landroidx/preference/PreferenceManager;->getPreferenceScreen()Landroidx/preference/PreferenceScreen;
move-result-object v0
return-object v0
.end method
.method protected onBindPreferences()V
.locals 0
return-void
.end method
.method public onCreate(Landroid/os/Bundle;)V
.locals 4
invoke-super {p0, p1}, Landroidx/fragment/app/Fragment;->onCreate(Landroid/os/Bundle;)V
new-instance v0, Landroid/util/TypedValue;
invoke-direct {v0}, Landroid/util/TypedValue;-><init>()V
invoke-virtual {p0}, Landroidx/preference/PreferenceFragmentCompat;->getActivity()Landroidx/fragment/app/FragmentActivity;
move-result-object v1
invoke-virtual {v1}, Landroidx/fragment/app/FragmentActivity;->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
invoke-virtual {p0}, Landroidx/preference/PreferenceFragmentCompat;->getActivity()Landroidx/fragment/app/FragmentActivity;
move-result-object v1
invoke-virtual {v1}, Landroidx/fragment/app/FragmentActivity;->getTheme()Landroid/content/res/Resources$Theme;
move-result-object v1
const/4 v2, 0x0
invoke-virtual {v1, v0, v2}, Landroid/content/res/Resources$Theme;->applyStyle(IZ)V
new-instance v0, Landroidx/preference/PreferenceManager;
invoke-virtual {p0}, Landroidx/preference/PreferenceFragmentCompat;->getContext()Landroid/content/Context;
move-result-object v1
invoke-direct {v0, v1}, Landroidx/preference/PreferenceManager;-><init>(Landroid/content/Context;)V
iput-object v0, p0, Landroidx/preference/PreferenceFragmentCompat;->mPreferenceManager:Landroidx/preference/PreferenceManager;
iget-object v0, p0, Landroidx/preference/PreferenceFragmentCompat;->mPreferenceManager:Landroidx/preference/PreferenceManager;
invoke-virtual {v0, p0}, Landroidx/preference/PreferenceManager;->setOnNavigateToScreenListener(Landroidx/preference/PreferenceManager$OnNavigateToScreenListener;)V
invoke-virtual {p0}, Landroidx/preference/PreferenceFragmentCompat;->getArguments()Landroid/os/Bundle;
move-result-object v0
if-eqz v0, :cond_1
invoke-virtual {p0}, Landroidx/preference/PreferenceFragmentCompat;->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/PreferenceFragmentCompat;->onCreatePreferences(Landroid/os/Bundle;Ljava/lang/String;)V
return-void
.end method
.method protected onCreateAdapter(Landroidx/preference/PreferenceScreen;)Landroidx/recyclerview/widget/RecyclerView$Adapter;
.locals 1
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
new-instance v0, Landroidx/recyclerview/widget/LinearLayoutManager;
invoke-virtual {p0}, Landroidx/preference/PreferenceFragmentCompat;->getContext()Landroid/content/Context;
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
.end method
.method public onCreateRecyclerView(Landroid/view/LayoutInflater;Landroid/view/ViewGroup;Landroid/os/Bundle;)Landroidx/recyclerview/widget/RecyclerView;
.locals 1
invoke-virtual {p0}, Landroidx/preference/PreferenceFragmentCompat;->getContext()Landroid/content/Context;
move-result-object p3
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/PreferenceFragmentCompat;->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
invoke-virtual {p0}, Landroidx/preference/PreferenceFragmentCompat;->getContext()Landroid/content/Context;
move-result-object v0
sget-object v1, Landroidx/preference/R$styleable;->PreferenceFragmentCompat:[I
sget v2, Landroidx/preference/R$attr;->preferenceFragmentCompatStyle:I
const/4 v3, 0x0
const/4 v4, 0x0
invoke-virtual {v0, v4, v1, v2, v3}, Landroid/content/Context;->obtainStyledAttributes(Landroid/util/AttributeSet;[III)Landroid/content/res/TypedArray;
move-result-object v0
sget v1, Landroidx/preference/R$styleable;->PreferenceFragmentCompat_android_layout:I
iget v2, p0, Landroidx/preference/PreferenceFragmentCompat;->mLayoutResId:I
invoke-virtual {v0, v1, v2}, Landroid/content/res/TypedArray;->getResourceId(II)I
move-result v1
iput v1, p0, Landroidx/preference/PreferenceFragmentCompat;->mLayoutResId:I
sget v1, Landroidx/preference/R$styleable;->PreferenceFragmentCompat_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;->PreferenceFragmentCompat_android_dividerHeight:I
const/4 v4, -0x1
invoke-virtual {v0, v2, v4}, Landroid/content/res/TypedArray;->getDimensionPixelSize(II)I
move-result v2
sget v5, Landroidx/preference/R$styleable;->PreferenceFragmentCompat_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
invoke-virtual {p0}, Landroidx/preference/PreferenceFragmentCompat;->getContext()Landroid/content/Context;
move-result-object v0
invoke-virtual {p1, v0}, Landroid/view/LayoutInflater;->cloneInContext(Landroid/content/Context;)Landroid/view/LayoutInflater;
move-result-object p1
iget v0, p0, Landroidx/preference/PreferenceFragmentCompat;->mLayoutResId:I
invoke-virtual {p1, v0, p2, v3}, 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 v3, v0, Landroid/view/ViewGroup;
if-eqz v3, :cond_3
check-cast v0, Landroid/view/ViewGroup;
invoke-virtual {p0, p1, v0, p3}, Landroidx/preference/PreferenceFragmentCompat;->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/PreferenceFragmentCompat;->mList:Landroidx/recyclerview/widget/RecyclerView;
iget-object p3, p0, Landroidx/preference/PreferenceFragmentCompat;->mDividerDecoration:Landroidx/preference/PreferenceFragmentCompat$DividerDecoration;
invoke-virtual {p1, p3}, Landroidx/recyclerview/widget/RecyclerView;->addItemDecoration(Landroidx/recyclerview/widget/RecyclerView$ItemDecoration;)V
invoke-virtual {p0, v1}, Landroidx/preference/PreferenceFragmentCompat;->setDivider(Landroid/graphics/drawable/Drawable;)V
if-eq v2, v4, :cond_0
invoke-virtual {p0, v2}, Landroidx/preference/PreferenceFragmentCompat;->setDividerHeight(I)V
:cond_0
iget-object p1, p0, Landroidx/preference/PreferenceFragmentCompat;->mDividerDecoration:Landroidx/preference/PreferenceFragmentCompat$DividerDecoration;
invoke-virtual {p1, v5}, Landroidx/preference/PreferenceFragmentCompat$DividerDecoration;->setAllowDividerAfterLastItem(Z)V
iget-object p1, p0, Landroidx/preference/PreferenceFragmentCompat;->mList:Landroidx/recyclerview/widget/RecyclerView;
invoke-virtual {p1}, Landroidx/recyclerview/widget/RecyclerView;->getParent()Landroid/view/ViewParent;
move-result-object p1
if-nez p1, :cond_1
iget-object p1, p0, Landroidx/preference/PreferenceFragmentCompat;->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/PreferenceFragmentCompat;->mHandler:Landroid/os/Handler;
iget-object p3, p0, Landroidx/preference/PreferenceFragmentCompat;->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/IllegalStateException;
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/IllegalStateException;-><init>(Ljava/lang/String;)V
throw p1
.end method
.method public onDestroyView()V
.locals 2
iget-object v0, p0, Landroidx/preference/PreferenceFragmentCompat;->mHandler:Landroid/os/Handler;
iget-object v1, p0, Landroidx/preference/PreferenceFragmentCompat;->mRequestFocus:Ljava/lang/Runnable;
invoke-virtual {v0, v1}, Landroid/os/Handler;->removeCallbacks(Ljava/lang/Runnable;)V
iget-object v0, p0, Landroidx/preference/PreferenceFragmentCompat;->mHandler:Landroid/os/Handler;
const/4 v1, 0x1
invoke-virtual {v0, v1}, Landroid/os/Handler;->removeMessages(I)V
iget-boolean v0, p0, Landroidx/preference/PreferenceFragmentCompat;->mHavePrefs:Z
if-eqz v0, :cond_0
invoke-direct {p0}, Landroidx/preference/PreferenceFragmentCompat;->unbindPreferences()V
:cond_0
const/4 v0, 0x0
iput-object v0, p0, Landroidx/preference/PreferenceFragmentCompat;->mList:Landroidx/recyclerview/widget/RecyclerView;
invoke-super {p0}, Landroidx/fragment/app/Fragment;->onDestroyView()V
return-void
.end method
.method public onDisplayPreferenceDialog(Landroidx/preference/Preference;)V
.locals 3
invoke-virtual {p0}, Landroidx/preference/PreferenceFragmentCompat;->getCallbackFragment()Landroidx/fragment/app/Fragment;
move-result-object v0
instance-of v0, v0, Landroidx/preference/PreferenceFragmentCompat$OnPreferenceDisplayDialogCallback;
const/4 v1, 0x0
if-eqz v0, :cond_0
invoke-virtual {p0}, Landroidx/preference/PreferenceFragmentCompat;->getCallbackFragment()Landroidx/fragment/app/Fragment;
move-result-object v0
check-cast v0, Landroidx/preference/PreferenceFragmentCompat$OnPreferenceDisplayDialogCallback;
invoke-interface {v0, p0, p1}, Landroidx/preference/PreferenceFragmentCompat$OnPreferenceDisplayDialogCallback;->onPreferenceDisplayDialog(Landroidx/preference/PreferenceFragmentCompat;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}, Landroidx/preference/PreferenceFragmentCompat;->getActivity()Landroidx/fragment/app/FragmentActivity;
move-result-object v2
instance-of v2, v2, Landroidx/preference/PreferenceFragmentCompat$OnPreferenceDisplayDialogCallback;
if-eqz v2, :cond_1
invoke-virtual {p0}, Landroidx/preference/PreferenceFragmentCompat;->getActivity()Landroidx/fragment/app/FragmentActivity;
move-result-object v0
check-cast v0, Landroidx/preference/PreferenceFragmentCompat$OnPreferenceDisplayDialogCallback;
invoke-interface {v0, p0, p1}, Landroidx/preference/PreferenceFragmentCompat$OnPreferenceDisplayDialogCallback;->onPreferenceDisplayDialog(Landroidx/preference/PreferenceFragmentCompat;Landroidx/preference/Preference;)Z
move-result v0
:cond_1
if-eqz v0, :cond_2
return-void
:cond_2
invoke-virtual {p0}, Landroidx/preference/PreferenceFragmentCompat;->getFragmentManager()Landroidx/fragment/app/FragmentManager;
move-result-object v0
const-string v2, "androidx.preference.PreferenceFragment.DIALOG"
invoke-virtual {v0, v2}, Landroidx/fragment/app/FragmentManager;->findFragmentByTag(Ljava/lang/String;)Landroidx/fragment/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/EditTextPreferenceDialogFragmentCompat;->newInstance(Ljava/lang/String;)Landroidx/preference/EditTextPreferenceDialogFragmentCompat;
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/ListPreferenceDialogFragmentCompat;->newInstance(Ljava/lang/String;)Landroidx/preference/ListPreferenceDialogFragmentCompat;
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/MultiSelectListPreferenceDialogFragmentCompat;->newInstance(Ljava/lang/String;)Landroidx/preference/MultiSelectListPreferenceDialogFragmentCompat;
move-result-object p1
:goto_1
invoke-virtual {p1, p0, v1}, Landroidx/fragment/app/DialogFragment;->setTargetFragment(Landroidx/fragment/app/Fragment;I)V
invoke-virtual {p0}, Landroidx/preference/PreferenceFragmentCompat;->getFragmentManager()Landroidx/fragment/app/FragmentManager;
move-result-object v0
invoke-virtual {p1, v0, v2}, Landroidx/fragment/app/DialogFragment;->show(Landroidx/fragment/app/FragmentManager;Ljava/lang/String;)V
return-void
:cond_6
new-instance v0, Ljava/lang/IllegalArgumentException;
new-instance v1, Ljava/lang/StringBuilder;
const-string v2, "Cannot display dialog for an unknown Preference type: "
invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-virtual {p1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
move-result-object p1
invoke-virtual {p1}, Ljava/lang/Class;->getSimpleName()Ljava/lang/String;
move-result-object p1
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string p1, ". Make sure to implement onPreferenceDisplayDialog() to handle displaying a custom dialog for this Preference."
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
invoke-direct {v0, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw v0
.end method
.method public onNavigateToScreen(Landroidx/preference/PreferenceScreen;)V
.locals 1
invoke-virtual {p0}, Landroidx/preference/PreferenceFragmentCompat;->getCallbackFragment()Landroidx/fragment/app/Fragment;
move-result-object v0
instance-of v0, v0, Landroidx/preference/PreferenceFragmentCompat$OnPreferenceStartScreenCallback;
if-eqz v0, :cond_0
invoke-virtual {p0}, Landroidx/preference/PreferenceFragmentCompat;->getCallbackFragment()Landroidx/fragment/app/Fragment;
move-result-object v0
check-cast v0, Landroidx/preference/PreferenceFragmentCompat$OnPreferenceStartScreenCallback;
invoke-interface {v0, p0, p1}, Landroidx/preference/PreferenceFragmentCompat$OnPreferenceStartScreenCallback;->onPreferenceStartScreen(Landroidx/preference/PreferenceFragmentCompat;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}, Landroidx/preference/PreferenceFragmentCompat;->getActivity()Landroidx/fragment/app/FragmentActivity;
move-result-object v0
instance-of v0, v0, Landroidx/preference/PreferenceFragmentCompat$OnPreferenceStartScreenCallback;
if-eqz v0, :cond_1
invoke-virtual {p0}, Landroidx/preference/PreferenceFragmentCompat;->getActivity()Landroidx/fragment/app/FragmentActivity;
move-result-object v0
check-cast v0, Landroidx/preference/PreferenceFragmentCompat$OnPreferenceStartScreenCallback;
invoke-interface {v0, p0, p1}, Landroidx/preference/PreferenceFragmentCompat$OnPreferenceStartScreenCallback;->onPreferenceStartScreen(Landroidx/preference/PreferenceFragmentCompat;Landroidx/preference/PreferenceScreen;)Z
:cond_1
return-void
.end method
.method public onPreferenceTreeClick(Landroidx/preference/Preference;)Z
.locals 5
invoke-virtual {p1}, Landroidx/preference/Preference;->getFragment()Ljava/lang/String;
move-result-object v0
const/4 v1, 0x0
if-eqz v0, :cond_3
invoke-virtual {p0}, Landroidx/preference/PreferenceFragmentCompat;->getCallbackFragment()Landroidx/fragment/app/Fragment;
move-result-object v0
instance-of v0, v0, Landroidx/preference/PreferenceFragmentCompat$OnPreferenceStartFragmentCallback;
if-eqz v0, :cond_0
invoke-virtual {p0}, Landroidx/preference/PreferenceFragmentCompat;->getCallbackFragment()Landroidx/fragment/app/Fragment;
move-result-object v0
check-cast v0, Landroidx/preference/PreferenceFragmentCompat$OnPreferenceStartFragmentCallback;
invoke-interface {v0, p0, p1}, Landroidx/preference/PreferenceFragmentCompat$OnPreferenceStartFragmentCallback;->onPreferenceStartFragment(Landroidx/preference/PreferenceFragmentCompat;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}, Landroidx/preference/PreferenceFragmentCompat;->getActivity()Landroidx/fragment/app/FragmentActivity;
move-result-object v2
instance-of v2, v2, Landroidx/preference/PreferenceFragmentCompat$OnPreferenceStartFragmentCallback;
if-eqz v2, :cond_1
invoke-virtual {p0}, Landroidx/preference/PreferenceFragmentCompat;->getActivity()Landroidx/fragment/app/FragmentActivity;
move-result-object v0
check-cast v0, Landroidx/preference/PreferenceFragmentCompat$OnPreferenceStartFragmentCallback;
invoke-interface {v0, p0, p1}, Landroidx/preference/PreferenceFragmentCompat$OnPreferenceStartFragmentCallback;->onPreferenceStartFragment(Landroidx/preference/PreferenceFragmentCompat;Landroidx/preference/Preference;)Z
move-result v0
:cond_1
if-nez v0, :cond_2
const-string v0, "PreferenceFragment"
const-string v2, "onPreferenceStartFragment is not implemented in the parent activity - attempting to use a fallback implementation. You should implement this method so that you can configure the new fragment that will be displayed, and set a transition between the fragments."
invoke-static {v0, v2}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
invoke-virtual {p0}, Landroidx/preference/PreferenceFragmentCompat;->requireActivity()Landroidx/fragment/app/FragmentActivity;
move-result-object v0
invoke-virtual {v0}, Landroidx/fragment/app/FragmentActivity;->getSupportFragmentManager()Landroidx/fragment/app/FragmentManager;
move-result-object v0
invoke-virtual {p1}, Landroidx/preference/Preference;->getExtras()Landroid/os/Bundle;
move-result-object v2
invoke-virtual {v0}, Landroidx/fragment/app/FragmentManager;->getFragmentFactory()Landroidx/fragment/app/FragmentFactory;
move-result-object v3
invoke-virtual {p0}, Landroidx/preference/PreferenceFragmentCompat;->requireActivity()Landroidx/fragment/app/FragmentActivity;
move-result-object v4
invoke-virtual {v4}, Landroidx/fragment/app/FragmentActivity;->getClassLoader()Ljava/lang/ClassLoader;
move-result-object v4
invoke-virtual {p1}, Landroidx/preference/Preference;->getFragment()Ljava/lang/String;
move-result-object p1
invoke-virtual {v3, v4, p1}, Landroidx/fragment/app/FragmentFactory;->instantiate(Ljava/lang/ClassLoader;Ljava/lang/String;)Landroidx/fragment/app/Fragment;
move-result-object p1
invoke-virtual {p1, v2}, Landroidx/fragment/app/Fragment;->setArguments(Landroid/os/Bundle;)V
invoke-virtual {p1, p0, v1}, Landroidx/fragment/app/Fragment;->setTargetFragment(Landroidx/fragment/app/Fragment;I)V
invoke-virtual {v0}, Landroidx/fragment/app/FragmentManager;->beginTransaction()Landroidx/fragment/app/FragmentTransaction;
move-result-object v0
invoke-virtual {p0}, Landroidx/preference/PreferenceFragmentCompat;->getView()Landroid/view/View;
move-result-object v1
invoke-virtual {v1}, Landroid/view/View;->getParent()Landroid/view/ViewParent;
move-result-object v1
check-cast v1, Landroid/view/View;
invoke-virtual {v1}, Landroid/view/View;->getId()I
move-result v1
invoke-virtual {v0, v1, p1}, Landroidx/fragment/app/FragmentTransaction;->replace(ILandroidx/fragment/app/Fragment;)Landroidx/fragment/app/FragmentTransaction;
move-result-object p1
const/4 v0, 0x0
invoke-virtual {p1, v0}, Landroidx/fragment/app/FragmentTransaction;->addToBackStack(Ljava/lang/String;)Landroidx/fragment/app/FragmentTransaction;
move-result-object p1
invoke-virtual {p1}, Landroidx/fragment/app/FragmentTransaction;->commit()I
:cond_2
const/4 p1, 0x1
return p1
:cond_3
return v1
.end method
.method public onSaveInstanceState(Landroid/os/Bundle;)V
.locals 2
invoke-super {p0, p1}, Landroidx/fragment/app/Fragment;->onSaveInstanceState(Landroid/os/Bundle;)V
invoke-virtual {p0}, Landroidx/preference/PreferenceFragmentCompat;->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/PreferenceScreen;->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}, Landroidx/fragment/app/Fragment;->onStart()V
iget-object v0, p0, Landroidx/preference/PreferenceFragmentCompat;->mPreferenceManager:Landroidx/preference/PreferenceManager;
invoke-virtual {v0, p0}, Landroidx/preference/PreferenceManager;->setOnPreferenceTreeClickListener(Landroidx/preference/PreferenceManager$OnPreferenceTreeClickListener;)V
iget-object v0, p0, Landroidx/preference/PreferenceFragmentCompat;->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}, Landroidx/fragment/app/Fragment;->onStop()V
iget-object v0, p0, Landroidx/preference/PreferenceFragmentCompat;->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/PreferenceFragmentCompat;->mPreferenceManager:Landroidx/preference/PreferenceManager;
invoke-virtual {v0, v1}, Landroidx/preference/PreferenceManager;->setOnDisplayPreferenceDialogListener(Landroidx/preference/PreferenceManager$OnDisplayPreferenceDialogListener;)V
return-void
.end method
.method protected onUnbindPreferences()V
.locals 0
return-void
.end method
.method public onViewCreated(Landroid/view/View;Landroid/os/Bundle;)V
.locals 0
invoke-super {p0, p1, p2}, Landroidx/fragment/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/PreferenceFragmentCompat;->getPreferenceScreen()Landroidx/preference/PreferenceScreen;
move-result-object p2
if-eqz p2, :cond_0
invoke-virtual {p2, p1}, Landroidx/preference/PreferenceScreen;->restoreHierarchyState(Landroid/os/Bundle;)V
:cond_0
iget-boolean p1, p0, Landroidx/preference/PreferenceFragmentCompat;->mHavePrefs:Z
if-eqz p1, :cond_1
invoke-virtual {p0}, Landroidx/preference/PreferenceFragmentCompat;->bindPreferences()V
iget-object p1, p0, Landroidx/preference/PreferenceFragmentCompat;->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/PreferenceFragmentCompat;->mSelectPreferenceRunnable:Ljava/lang/Runnable;
:cond_1
const/4 p1, 0x1
iput-boolean p1, p0, Landroidx/preference/PreferenceFragmentCompat;->mInitDone:Z
return-void
.end method
.method public scrollToPreference(Landroidx/preference/Preference;)V
.locals 1
const/4 v0, 0x0
invoke-direct {p0, p1, v0}, Landroidx/preference/PreferenceFragmentCompat;->scrollToPreferenceInternal(Landroidx/preference/Preference;Ljava/lang/String;)V
return-void
.end method
.method public scrollToPreference(Ljava/lang/String;)V
.locals 1
const/4 v0, 0x0
invoke-direct {p0, v0, p1}, Landroidx/preference/PreferenceFragmentCompat;->scrollToPreferenceInternal(Landroidx/preference/Preference;Ljava/lang/String;)V
return-void
.end method
.method public setDivider(Landroid/graphics/drawable/Drawable;)V
.locals 1
iget-object v0, p0, Landroidx/preference/PreferenceFragmentCompat;->mDividerDecoration:Landroidx/preference/PreferenceFragmentCompat$DividerDecoration;
invoke-virtual {v0, p1}, Landroidx/preference/PreferenceFragmentCompat$DividerDecoration;->setDivider(Landroid/graphics/drawable/Drawable;)V
return-void
.end method
.method public setDividerHeight(I)V
.locals 1
iget-object v0, p0, Landroidx/preference/PreferenceFragmentCompat;->mDividerDecoration:Landroidx/preference/PreferenceFragmentCompat$DividerDecoration;
invoke-virtual {v0, p1}, Landroidx/preference/PreferenceFragmentCompat$DividerDecoration;->setDividerHeight(I)V
return-void
.end method
.method public setPreferenceScreen(Landroidx/preference/PreferenceScreen;)V
.locals 1
iget-object v0, p0, Landroidx/preference/PreferenceFragmentCompat;->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/PreferenceFragmentCompat;->onUnbindPreferences()V
const/4 p1, 0x1
iput-boolean p1, p0, Landroidx/preference/PreferenceFragmentCompat;->mHavePrefs:Z
iget-boolean p1, p0, Landroidx/preference/PreferenceFragmentCompat;->mInitDone:Z
if-eqz p1, :cond_0
invoke-direct {p0}, Landroidx/preference/PreferenceFragmentCompat;->postBindPreferences()V
:cond_0
return-void
.end method
.method public setPreferencesFromResource(ILjava/lang/String;)V
.locals 3
invoke-direct {p0}, Landroidx/preference/PreferenceFragmentCompat;->requirePreferenceManager()V
iget-object v0, p0, Landroidx/preference/PreferenceFragmentCompat;->mPreferenceManager:Landroidx/preference/PreferenceManager;
invoke-virtual {p0}, Landroidx/preference/PreferenceFragmentCompat;->getContext()Landroid/content/Context;
move-result-object v1
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/PreferenceScreen;->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;
new-instance v0, Ljava/lang/StringBuilder;
const-string v1, "Preference object with key "
invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-virtual {v0, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string p2, " is not a PreferenceScreen"
invoke-virtual {v0, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()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/PreferenceFragmentCompat;->setPreferenceScreen(Landroidx/preference/PreferenceScreen;)V
return-void
.end method