apkfuckery/com.discord/smali/androidx/preference/PreferenceFragmentCompat$ScrollToPreferenceObserver.smali

138 lines
4.7 KiB
Smali
Raw Normal View History

2019-12-06 03:29:40 +00:00
.class public Landroidx/preference/PreferenceFragmentCompat$ScrollToPreferenceObserver;
2019-11-15 02:21:15 +00:00
.super Landroidx/recyclerview/widget/RecyclerView$AdapterDataObserver;
.source "PreferenceFragmentCompat.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Landroidx/preference/PreferenceFragmentCompat;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
2019-12-06 03:29:40 +00:00
accessFlags = 0x9
2019-11-15 02:21:15 +00:00
name = "ScrollToPreferenceObserver"
.end annotation
# instance fields
2019-12-06 03:29:40 +00:00
.field public final mAdapter:Landroidx/recyclerview/widget/RecyclerView$Adapter;
2019-11-15 02:21:15 +00:00
2019-12-06 03:29:40 +00:00
.field public final mKey:Ljava/lang/String;
2019-11-15 02:21:15 +00:00
2019-12-06 03:29:40 +00:00
.field public final mList:Landroidx/recyclerview/widget/RecyclerView;
2019-11-15 02:21:15 +00:00
2019-12-06 03:29:40 +00:00
.field public final mPreference:Landroidx/preference/Preference;
2019-11-15 02:21:15 +00:00
# direct methods
.method public constructor <init>(Landroidx/recyclerview/widget/RecyclerView$Adapter;Landroidx/recyclerview/widget/RecyclerView;Landroidx/preference/Preference;Ljava/lang/String;)V
.locals 0
invoke-direct {p0}, Landroidx/recyclerview/widget/RecyclerView$AdapterDataObserver;-><init>()V
iput-object p1, p0, Landroidx/preference/PreferenceFragmentCompat$ScrollToPreferenceObserver;->mAdapter:Landroidx/recyclerview/widget/RecyclerView$Adapter;
iput-object p2, p0, Landroidx/preference/PreferenceFragmentCompat$ScrollToPreferenceObserver;->mList:Landroidx/recyclerview/widget/RecyclerView;
iput-object p3, p0, Landroidx/preference/PreferenceFragmentCompat$ScrollToPreferenceObserver;->mPreference:Landroidx/preference/Preference;
iput-object p4, p0, Landroidx/preference/PreferenceFragmentCompat$ScrollToPreferenceObserver;->mKey:Ljava/lang/String;
return-void
.end method
.method private scrollToPreference()V
.locals 2
iget-object v0, p0, Landroidx/preference/PreferenceFragmentCompat$ScrollToPreferenceObserver;->mAdapter:Landroidx/recyclerview/widget/RecyclerView$Adapter;
invoke-virtual {v0, p0}, Landroidx/recyclerview/widget/RecyclerView$Adapter;->unregisterAdapterDataObserver(Landroidx/recyclerview/widget/RecyclerView$AdapterDataObserver;)V
iget-object v0, p0, Landroidx/preference/PreferenceFragmentCompat$ScrollToPreferenceObserver;->mPreference:Landroidx/preference/Preference;
if-eqz v0, :cond_0
iget-object v1, p0, Landroidx/preference/PreferenceFragmentCompat$ScrollToPreferenceObserver;->mAdapter:Landroidx/recyclerview/widget/RecyclerView$Adapter;
check-cast v1, Landroidx/preference/PreferenceGroup$PreferencePositionCallback;
invoke-interface {v1, v0}, Landroidx/preference/PreferenceGroup$PreferencePositionCallback;->getPreferenceAdapterPosition(Landroidx/preference/Preference;)I
move-result v0
goto :goto_0
:cond_0
iget-object v0, p0, Landroidx/preference/PreferenceFragmentCompat$ScrollToPreferenceObserver;->mAdapter:Landroidx/recyclerview/widget/RecyclerView$Adapter;
check-cast v0, Landroidx/preference/PreferenceGroup$PreferencePositionCallback;
iget-object v1, p0, Landroidx/preference/PreferenceFragmentCompat$ScrollToPreferenceObserver;->mKey:Ljava/lang/String;
invoke-interface {v0, v1}, Landroidx/preference/PreferenceGroup$PreferencePositionCallback;->getPreferenceAdapterPosition(Ljava/lang/String;)I
move-result v0
:goto_0
const/4 v1, -0x1
if-eq v0, v1, :cond_1
iget-object v1, p0, Landroidx/preference/PreferenceFragmentCompat$ScrollToPreferenceObserver;->mList:Landroidx/recyclerview/widget/RecyclerView;
invoke-virtual {v1, v0}, Landroidx/recyclerview/widget/RecyclerView;->scrollToPosition(I)V
:cond_1
return-void
.end method
# virtual methods
.method public onChanged()V
.locals 0
invoke-direct {p0}, Landroidx/preference/PreferenceFragmentCompat$ScrollToPreferenceObserver;->scrollToPreference()V
return-void
.end method
.method public onItemRangeChanged(II)V
.locals 0
invoke-direct {p0}, Landroidx/preference/PreferenceFragmentCompat$ScrollToPreferenceObserver;->scrollToPreference()V
return-void
.end method
.method public onItemRangeChanged(IILjava/lang/Object;)V
.locals 0
invoke-direct {p0}, Landroidx/preference/PreferenceFragmentCompat$ScrollToPreferenceObserver;->scrollToPreference()V
return-void
.end method
.method public onItemRangeInserted(II)V
.locals 0
invoke-direct {p0}, Landroidx/preference/PreferenceFragmentCompat$ScrollToPreferenceObserver;->scrollToPreference()V
return-void
.end method
.method public onItemRangeMoved(III)V
.locals 0
invoke-direct {p0}, Landroidx/preference/PreferenceFragmentCompat$ScrollToPreferenceObserver;->scrollToPreference()V
return-void
.end method
.method public onItemRangeRemoved(II)V
.locals 0
invoke-direct {p0}, Landroidx/preference/PreferenceFragmentCompat$ScrollToPreferenceObserver;->scrollToPreference()V
return-void
.end method