Rabbit-R1/original r1/smali/smali_classes2/androidx/recyclerview/widget/RecyclerView$Adapter.smali
2024-05-21 17:08:36 -04:00

736 lines
21 KiB
Smali

.class public abstract Landroidx/recyclerview/widget/RecyclerView$Adapter;
.super Ljava/lang/Object;
.source "RecyclerView.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Landroidx/recyclerview/widget/RecyclerView;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x409
name = "Adapter"
.end annotation
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Landroidx/recyclerview/widget/RecyclerView$Adapter$StateRestorationPolicy;
}
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"<VH:",
"Landroidx/recyclerview/widget/RecyclerView$ViewHolder;",
">",
"Ljava/lang/Object;"
}
.end annotation
# instance fields
.field private mHasStableIds:Z
.field private final mObservable:Landroidx/recyclerview/widget/RecyclerView$AdapterDataObservable;
.field private mStateRestorationPolicy:Landroidx/recyclerview/widget/RecyclerView$Adapter$StateRestorationPolicy;
# direct methods
.method public constructor <init>()V
.locals 1
.line 7666
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 7667
new-instance v0, Landroidx/recyclerview/widget/RecyclerView$AdapterDataObservable;
invoke-direct {v0}, Landroidx/recyclerview/widget/RecyclerView$AdapterDataObservable;-><init>()V
iput-object v0, p0, Landroidx/recyclerview/widget/RecyclerView$Adapter;->mObservable:Landroidx/recyclerview/widget/RecyclerView$AdapterDataObservable;
const/4 v0, 0x0
iput-boolean v0, p0, Landroidx/recyclerview/widget/RecyclerView$Adapter;->mHasStableIds:Z
.line 7669
sget-object v0, Landroidx/recyclerview/widget/RecyclerView$Adapter$StateRestorationPolicy;->ALLOW:Landroidx/recyclerview/widget/RecyclerView$Adapter$StateRestorationPolicy;
iput-object v0, p0, Landroidx/recyclerview/widget/RecyclerView$Adapter;->mStateRestorationPolicy:Landroidx/recyclerview/widget/RecyclerView$Adapter$StateRestorationPolicy;
return-void
.end method
# virtual methods
.method public final bindViewHolder(Landroidx/recyclerview/widget/RecyclerView$ViewHolder;I)V
.locals 4
.annotation system Ldalvik/annotation/Signature;
value = {
"(TVH;I)V"
}
.end annotation
.line 7818
iget-object v0, p1, Landroidx/recyclerview/widget/RecyclerView$ViewHolder;->mBindingAdapter:Landroidx/recyclerview/widget/RecyclerView$Adapter;
const/4 v1, 0x1
if-nez v0, :cond_0
move v0, v1
goto :goto_0
:cond_0
const/4 v0, 0x0
:goto_0
if-eqz v0, :cond_2
.line 7820
iput p2, p1, Landroidx/recyclerview/widget/RecyclerView$ViewHolder;->mPosition:I
.line 7821
invoke-virtual {p0}, Landroidx/recyclerview/widget/RecyclerView$Adapter;->hasStableIds()Z
move-result v2
if-eqz v2, :cond_1
.line 7822
invoke-virtual {p0, p2}, Landroidx/recyclerview/widget/RecyclerView$Adapter;->getItemId(I)J
move-result-wide v2
iput-wide v2, p1, Landroidx/recyclerview/widget/RecyclerView$ViewHolder;->mItemId:J
:cond_1
const/16 v2, 0x207
.line 7824
invoke-virtual {p1, v1, v2}, Landroidx/recyclerview/widget/RecyclerView$ViewHolder;->setFlags(II)V
const-string v2, "RV OnBindView"
.line 7827
invoke-static {v2}, Landroidx/core/os/TraceCompat;->beginSection(Ljava/lang/String;)V
.line 7829
:cond_2
iput-object p0, p1, Landroidx/recyclerview/widget/RecyclerView$ViewHolder;->mBindingAdapter:Landroidx/recyclerview/widget/RecyclerView$Adapter;
.line 7830
sget-boolean v2, Landroidx/recyclerview/widget/RecyclerView;->sDebugAssertionsEnabled:Z
if-eqz v2, :cond_6
.line 7831
iget-object v2, p1, Landroidx/recyclerview/widget/RecyclerView$ViewHolder;->itemView:Landroid/view/View;
invoke-virtual {v2}, Landroid/view/View;->getParent()Landroid/view/ViewParent;
move-result-object v2
if-nez v2, :cond_4
iget-object v2, p1, Landroidx/recyclerview/widget/RecyclerView$ViewHolder;->itemView:Landroid/view/View;
.line 7832
invoke-static {v2}, Landroidx/core/view/ViewCompat;->isAttachedToWindow(Landroid/view/View;)Z
move-result v2
.line 7833
invoke-virtual {p1}, Landroidx/recyclerview/widget/RecyclerView$ViewHolder;->isTmpDetached()Z
move-result v3
if-ne v2, v3, :cond_3
goto :goto_1
.line 7834
:cond_3
new-instance p0, Ljava/lang/IllegalStateException;
new-instance p2, Ljava/lang/StringBuilder;
const-string v0, "Temp-detached state out of sync with reality. holder.isTmpDetached(): "
invoke-direct {p2, v0}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
.line 7835
invoke-virtual {p1}, Landroidx/recyclerview/widget/RecyclerView$ViewHolder;->isTmpDetached()Z
move-result v0
invoke-virtual {p2, v0}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;
move-result-object p2
const-string v0, ", attached to window: "
invoke-virtual {p2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object p2
iget-object v0, p1, Landroidx/recyclerview/widget/RecyclerView$ViewHolder;->itemView:Landroid/view/View;
.line 7837
invoke-static {v0}, Landroidx/core/view/ViewCompat;->isAttachedToWindow(Landroid/view/View;)Z
move-result v0
invoke-virtual {p2, v0}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;
move-result-object p2
const-string v0, ", holder: "
invoke-virtual {p2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object p2
invoke-virtual {p2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
move-result-object p1
invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
invoke-direct {p0, p1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw p0
.line 7840
:cond_4
:goto_1
iget-object v2, p1, Landroidx/recyclerview/widget/RecyclerView$ViewHolder;->itemView:Landroid/view/View;
invoke-virtual {v2}, Landroid/view/View;->getParent()Landroid/view/ViewParent;
move-result-object v2
if-nez v2, :cond_6
iget-object v2, p1, Landroidx/recyclerview/widget/RecyclerView$ViewHolder;->itemView:Landroid/view/View;
.line 7841
invoke-static {v2}, Landroidx/core/view/ViewCompat;->isAttachedToWindow(Landroid/view/View;)Z
move-result v2
if-nez v2, :cond_5
goto :goto_2
.line 7842
:cond_5
new-instance p0, Ljava/lang/IllegalStateException;
new-instance p2, Ljava/lang/StringBuilder;
const-string v0, "Attempting to bind attached holder with no parent (AKA temp detached): "
invoke-direct {p2, v0}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-virtual {p2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
move-result-object p1
invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
invoke-direct {p0, p1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw p0
.line 7847
:cond_6
:goto_2
invoke-virtual {p1}, Landroidx/recyclerview/widget/RecyclerView$ViewHolder;->getUnmodifiedPayloads()Ljava/util/List;
move-result-object v2
invoke-virtual {p0, p1, p2, v2}, Landroidx/recyclerview/widget/RecyclerView$Adapter;->onBindViewHolder(Landroidx/recyclerview/widget/RecyclerView$ViewHolder;ILjava/util/List;)V
if-eqz v0, :cond_8
.line 7849
invoke-virtual {p1}, Landroidx/recyclerview/widget/RecyclerView$ViewHolder;->clearPayload()V
.line 7850
iget-object p0, p1, Landroidx/recyclerview/widget/RecyclerView$ViewHolder;->itemView:Landroid/view/View;
invoke-virtual {p0}, Landroid/view/View;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;
move-result-object p0
.line 7851
instance-of p1, p0, Landroidx/recyclerview/widget/RecyclerView$LayoutParams;
if-eqz p1, :cond_7
.line 7852
check-cast p0, Landroidx/recyclerview/widget/RecyclerView$LayoutParams;
iput-boolean v1, p0, Landroidx/recyclerview/widget/RecyclerView$LayoutParams;->mInsetsDirty:Z
.line 7854
:cond_7
invoke-static {}, Landroidx/core/os/TraceCompat;->endSection()V
:cond_8
return-void
.end method
.method canRestoreState()Z
.locals 4
.line 8323
sget-object v0, Landroidx/recyclerview/widget/RecyclerView$7;->$SwitchMap$androidx$recyclerview$widget$RecyclerView$Adapter$StateRestorationPolicy:[I
iget-object v1, p0, Landroidx/recyclerview/widget/RecyclerView$Adapter;->mStateRestorationPolicy:Landroidx/recyclerview/widget/RecyclerView$Adapter$StateRestorationPolicy;
invoke-virtual {v1}, Landroidx/recyclerview/widget/RecyclerView$Adapter$StateRestorationPolicy;->ordinal()I
move-result v1
aget v0, v0, v1
const/4 v1, 0x0
const/4 v2, 0x1
if-eq v0, v2, :cond_1
const/4 v3, 0x2
if-eq v0, v3, :cond_0
return v2
.line 8327
:cond_0
invoke-virtual {p0}, Landroidx/recyclerview/widget/RecyclerView$Adapter;->getItemCount()I
move-result p0
if-lez p0, :cond_1
move v1, v2
:cond_1
return v1
.end method
.method public final createViewHolder(Landroid/view/ViewGroup;I)Landroidx/recyclerview/widget/RecyclerView$ViewHolder;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Landroid/view/ViewGroup;",
"I)TVH;"
}
.end annotation
:try_start_0
const-string v0, "RV CreateView"
.line 7787
invoke-static {v0}, Landroidx/core/os/TraceCompat;->beginSection(Ljava/lang/String;)V
.line 7788
invoke-virtual {p0, p1, p2}, Landroidx/recyclerview/widget/RecyclerView$Adapter;->onCreateViewHolder(Landroid/view/ViewGroup;I)Landroidx/recyclerview/widget/RecyclerView$ViewHolder;
move-result-object p0
.line 7789
iget-object p1, p0, Landroidx/recyclerview/widget/RecyclerView$ViewHolder;->itemView:Landroid/view/View;
invoke-virtual {p1}, Landroid/view/View;->getParent()Landroid/view/ViewParent;
move-result-object p1
if-nez p1, :cond_0
.line 7794
iput p2, p0, Landroidx/recyclerview/widget/RecyclerView$ViewHolder;->mItemViewType:I
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 7797
invoke-static {}, Landroidx/core/os/TraceCompat;->endSection()V
return-object p0
.line 7790
:cond_0
:try_start_1
new-instance p0, Ljava/lang/IllegalStateException;
const-string p1, "ViewHolder views must not be attached when created. Ensure that you are not passing \'true\' to the attachToRoot parameter of LayoutInflater.inflate(..., boolean attachToRoot)"
invoke-direct {p0, p1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw p0
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
:catchall_0
move-exception p0
.line 7797
invoke-static {}, Landroidx/core/os/TraceCompat;->endSection()V
.line 7798
throw p0
.end method
.method public findRelativeAdapterPositionIn(Landroidx/recyclerview/widget/RecyclerView$Adapter;Landroidx/recyclerview/widget/RecyclerView$ViewHolder;I)I
.locals 0
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Landroidx/recyclerview/widget/RecyclerView$Adapter<",
"+",
"Landroidx/recyclerview/widget/RecyclerView$ViewHolder;",
">;",
"Landroidx/recyclerview/widget/RecyclerView$ViewHolder;",
"I)I"
}
.end annotation
if-ne p1, p0, :cond_0
return p3
:cond_0
const/4 p0, -0x1
return p0
.end method
.method public abstract getItemCount()I
.end method
.method public getItemId(I)J
.locals 0
const-wide/16 p0, -0x1
return-wide p0
.end method
.method public getItemViewType(I)I
.locals 0
const/4 p0, 0x0
return p0
.end method
.method public final getStateRestorationPolicy()Landroidx/recyclerview/widget/RecyclerView$Adapter$StateRestorationPolicy;
.locals 0
iget-object p0, p0, Landroidx/recyclerview/widget/RecyclerView$Adapter;->mStateRestorationPolicy:Landroidx/recyclerview/widget/RecyclerView$Adapter$StateRestorationPolicy;
return-object p0
.end method
.method public final hasObservers()Z
.locals 0
iget-object p0, p0, Landroidx/recyclerview/widget/RecyclerView$Adapter;->mObservable:Landroidx/recyclerview/widget/RecyclerView$AdapterDataObservable;
.line 8009
invoke-virtual {p0}, Landroidx/recyclerview/widget/RecyclerView$AdapterDataObservable;->hasObservers()Z
move-result p0
return p0
.end method
.method public final hasStableIds()Z
.locals 0
iget-boolean p0, p0, Landroidx/recyclerview/widget/RecyclerView$Adapter;->mHasStableIds:Z
return p0
.end method
.method public final notifyDataSetChanged()V
.locals 0
iget-object p0, p0, Landroidx/recyclerview/widget/RecyclerView$Adapter;->mObservable:Landroidx/recyclerview/widget/RecyclerView$AdapterDataObservable;
.line 8094
invoke-virtual {p0}, Landroidx/recyclerview/widget/RecyclerView$AdapterDataObservable;->notifyChanged()V
return-void
.end method
.method public final notifyItemChanged(I)V
.locals 1
iget-object p0, p0, Landroidx/recyclerview/widget/RecyclerView$Adapter;->mObservable:Landroidx/recyclerview/widget/RecyclerView$AdapterDataObservable;
const/4 v0, 0x1
.line 8109
invoke-virtual {p0, p1, v0}, Landroidx/recyclerview/widget/RecyclerView$AdapterDataObservable;->notifyItemRangeChanged(II)V
return-void
.end method
.method public final notifyItemChanged(ILjava/lang/Object;)V
.locals 1
iget-object p0, p0, Landroidx/recyclerview/widget/RecyclerView$Adapter;->mObservable:Landroidx/recyclerview/widget/RecyclerView$AdapterDataObservable;
const/4 v0, 0x1
.line 8136
invoke-virtual {p0, p1, v0, p2}, Landroidx/recyclerview/widget/RecyclerView$AdapterDataObservable;->notifyItemRangeChanged(IILjava/lang/Object;)V
return-void
.end method
.method public final notifyItemInserted(I)V
.locals 1
iget-object p0, p0, Landroidx/recyclerview/widget/RecyclerView$Adapter;->mObservable:Landroidx/recyclerview/widget/RecyclerView$AdapterDataObservable;
const/4 v0, 0x1
.line 8199
invoke-virtual {p0, p1, v0}, Landroidx/recyclerview/widget/RecyclerView$AdapterDataObservable;->notifyItemRangeInserted(II)V
return-void
.end method
.method public final notifyItemMoved(II)V
.locals 0
iget-object p0, p0, Landroidx/recyclerview/widget/RecyclerView$Adapter;->mObservable:Landroidx/recyclerview/widget/RecyclerView$AdapterDataObservable;
.line 8214
invoke-virtual {p0, p1, p2}, Landroidx/recyclerview/widget/RecyclerView$AdapterDataObservable;->notifyItemMoved(II)V
return-void
.end method
.method public final notifyItemRangeChanged(II)V
.locals 0
iget-object p0, p0, Landroidx/recyclerview/widget/RecyclerView$Adapter;->mObservable:Landroidx/recyclerview/widget/RecyclerView$AdapterDataObservable;
.line 8153
invoke-virtual {p0, p1, p2}, Landroidx/recyclerview/widget/RecyclerView$AdapterDataObservable;->notifyItemRangeChanged(II)V
return-void
.end method
.method public final notifyItemRangeChanged(IILjava/lang/Object;)V
.locals 0
iget-object p0, p0, Landroidx/recyclerview/widget/RecyclerView$Adapter;->mObservable:Landroidx/recyclerview/widget/RecyclerView$AdapterDataObservable;
.line 8183
invoke-virtual {p0, p1, p2, p3}, Landroidx/recyclerview/widget/RecyclerView$AdapterDataObservable;->notifyItemRangeChanged(IILjava/lang/Object;)V
return-void
.end method
.method public final notifyItemRangeInserted(II)V
.locals 0
iget-object p0, p0, Landroidx/recyclerview/widget/RecyclerView$Adapter;->mObservable:Landroidx/recyclerview/widget/RecyclerView$AdapterDataObservable;
.line 8232
invoke-virtual {p0, p1, p2}, Landroidx/recyclerview/widget/RecyclerView$AdapterDataObservable;->notifyItemRangeInserted(II)V
return-void
.end method
.method public final notifyItemRangeRemoved(II)V
.locals 0
iget-object p0, p0, Landroidx/recyclerview/widget/RecyclerView$Adapter;->mObservable:Landroidx/recyclerview/widget/RecyclerView$AdapterDataObservable;
.line 8265
invoke-virtual {p0, p1, p2}, Landroidx/recyclerview/widget/RecyclerView$AdapterDataObservable;->notifyItemRangeRemoved(II)V
return-void
.end method
.method public final notifyItemRemoved(I)V
.locals 1
iget-object p0, p0, Landroidx/recyclerview/widget/RecyclerView$Adapter;->mObservable:Landroidx/recyclerview/widget/RecyclerView$AdapterDataObservable;
const/4 v0, 0x1
.line 8248
invoke-virtual {p0, p1, v0}, Landroidx/recyclerview/widget/RecyclerView$AdapterDataObservable;->notifyItemRangeRemoved(II)V
return-void
.end method
.method public onAttachedToRecyclerView(Landroidx/recyclerview/widget/RecyclerView;)V
.locals 0
return-void
.end method
.method public abstract onBindViewHolder(Landroidx/recyclerview/widget/RecyclerView$ViewHolder;I)V
.annotation system Ldalvik/annotation/Signature;
value = {
"(TVH;I)V"
}
.end annotation
.end method
.method public onBindViewHolder(Landroidx/recyclerview/widget/RecyclerView$ViewHolder;ILjava/util/List;)V
.locals 0
.annotation system Ldalvik/annotation/Signature;
value = {
"(TVH;I",
"Ljava/util/List<",
"Ljava/lang/Object;",
">;)V"
}
.end annotation
.line 7747
invoke-virtual {p0, p1, p2}, Landroidx/recyclerview/widget/RecyclerView$Adapter;->onBindViewHolder(Landroidx/recyclerview/widget/RecyclerView$ViewHolder;I)V
return-void
.end method
.method public abstract onCreateViewHolder(Landroid/view/ViewGroup;I)Landroidx/recyclerview/widget/RecyclerView$ViewHolder;
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Landroid/view/ViewGroup;",
"I)TVH;"
}
.end annotation
.end method
.method public onDetachedFromRecyclerView(Landroidx/recyclerview/widget/RecyclerView;)V
.locals 0
return-void
.end method
.method public onFailedToRecycleView(Landroidx/recyclerview/widget/RecyclerView$ViewHolder;)Z
.locals 0
.annotation system Ldalvik/annotation/Signature;
value = {
"(TVH;)Z"
}
.end annotation
const/4 p0, 0x0
return p0
.end method
.method public onViewAttachedToWindow(Landroidx/recyclerview/widget/RecyclerView$ViewHolder;)V
.locals 0
.annotation system Ldalvik/annotation/Signature;
value = {
"(TVH;)V"
}
.end annotation
return-void
.end method
.method public onViewDetachedFromWindow(Landroidx/recyclerview/widget/RecyclerView$ViewHolder;)V
.locals 0
.annotation system Ldalvik/annotation/Signature;
value = {
"(TVH;)V"
}
.end annotation
return-void
.end method
.method public onViewRecycled(Landroidx/recyclerview/widget/RecyclerView$ViewHolder;)V
.locals 0
.annotation system Ldalvik/annotation/Signature;
value = {
"(TVH;)V"
}
.end annotation
return-void
.end method
.method public registerAdapterDataObserver(Landroidx/recyclerview/widget/RecyclerView$AdapterDataObserver;)V
.locals 0
iget-object p0, p0, Landroidx/recyclerview/widget/RecyclerView$Adapter;->mObservable:Landroidx/recyclerview/widget/RecyclerView$AdapterDataObservable;
.line 8028
invoke-virtual {p0, p1}, Landroidx/recyclerview/widget/RecyclerView$AdapterDataObservable;->registerObserver(Ljava/lang/Object;)V
return-void
.end method
.method public setHasStableIds(Z)V
.locals 1
.line 7883
invoke-virtual {p0}, Landroidx/recyclerview/widget/RecyclerView$Adapter;->hasObservers()Z
move-result v0
if-nez v0, :cond_0
iput-boolean p1, p0, Landroidx/recyclerview/widget/RecyclerView$Adapter;->mHasStableIds:Z
return-void
.line 7884
:cond_0
new-instance p0, Ljava/lang/IllegalStateException;
const-string p1, "Cannot change whether this adapter has stable IDs while the adapter has registered observers."
invoke-direct {p0, p1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw p0
.end method
.method public setStateRestorationPolicy(Landroidx/recyclerview/widget/RecyclerView$Adapter$StateRestorationPolicy;)V
.locals 0
iput-object p1, p0, Landroidx/recyclerview/widget/RecyclerView$Adapter;->mStateRestorationPolicy:Landroidx/recyclerview/widget/RecyclerView$Adapter$StateRestorationPolicy;
iget-object p0, p0, Landroidx/recyclerview/widget/RecyclerView$Adapter;->mObservable:Landroidx/recyclerview/widget/RecyclerView$AdapterDataObservable;
.line 8300
invoke-virtual {p0}, Landroidx/recyclerview/widget/RecyclerView$AdapterDataObservable;->notifyStateRestorationPolicyChanged()V
return-void
.end method
.method public unregisterAdapterDataObserver(Landroidx/recyclerview/widget/RecyclerView$AdapterDataObserver;)V
.locals 0
iget-object p0, p0, Landroidx/recyclerview/widget/RecyclerView$Adapter;->mObservable:Landroidx/recyclerview/widget/RecyclerView$AdapterDataObservable;
.line 8041
invoke-virtual {p0, p1}, Landroidx/recyclerview/widget/RecyclerView$AdapterDataObservable;->unregisterObserver(Ljava/lang/Object;)V
return-void
.end method