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

2075 lines
53 KiB
Smali

.class final Landroidx/recyclerview/widget/AdapterHelper;
.super Ljava/lang/Object;
.source "AdapterHelper.java"
# interfaces
.implements Landroidx/recyclerview/widget/OpReorderer$Callback;
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Landroidx/recyclerview/widget/AdapterHelper$Callback;,
Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;
}
.end annotation
# static fields
.field private static final DEBUG:Z = false
.field static final POSITION_TYPE_INVISIBLE:I = 0x0
.field static final POSITION_TYPE_NEW_OR_LAID_OUT:I = 0x1
.field private static final TAG:Ljava/lang/String; = "AHT"
# instance fields
.field final mCallback:Landroidx/recyclerview/widget/AdapterHelper$Callback;
.field final mDisableRecycler:Z
.field private mExistingUpdateTypes:I
.field mOnItemProcessedCallback:Ljava/lang/Runnable;
.field final mOpReorderer:Landroidx/recyclerview/widget/OpReorderer;
.field final mPendingUpdates:Ljava/util/ArrayList;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/ArrayList<",
"Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;",
">;"
}
.end annotation
.end field
.field final mPostponedList:Ljava/util/ArrayList;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/ArrayList<",
"Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;",
">;"
}
.end annotation
.end field
.field private mUpdateOpPool:Landroidx/core/util/Pools$Pool;
.annotation system Ldalvik/annotation/Signature;
value = {
"Landroidx/core/util/Pools$Pool<",
"Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;",
">;"
}
.end annotation
.end field
# direct methods
.method constructor <init>(Landroidx/recyclerview/widget/AdapterHelper$Callback;)V
.locals 1
const/4 v0, 0x0
.line 72
invoke-direct {p0, p1, v0}, Landroidx/recyclerview/widget/AdapterHelper;-><init>(Landroidx/recyclerview/widget/AdapterHelper$Callback;Z)V
return-void
.end method
.method constructor <init>(Landroidx/recyclerview/widget/AdapterHelper$Callback;Z)V
.locals 2
.line 75
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 55
new-instance v0, Landroidx/core/util/Pools$SimplePool;
const/16 v1, 0x1e
invoke-direct {v0, v1}, Landroidx/core/util/Pools$SimplePool;-><init>(I)V
iput-object v0, p0, Landroidx/recyclerview/widget/AdapterHelper;->mUpdateOpPool:Landroidx/core/util/Pools$Pool;
.line 57
new-instance v0, Ljava/util/ArrayList;
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
iput-object v0, p0, Landroidx/recyclerview/widget/AdapterHelper;->mPendingUpdates:Ljava/util/ArrayList;
.line 59
new-instance v0, Ljava/util/ArrayList;
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
iput-object v0, p0, Landroidx/recyclerview/widget/AdapterHelper;->mPostponedList:Ljava/util/ArrayList;
const/4 v0, 0x0
iput v0, p0, Landroidx/recyclerview/widget/AdapterHelper;->mExistingUpdateTypes:I
iput-object p1, p0, Landroidx/recyclerview/widget/AdapterHelper;->mCallback:Landroidx/recyclerview/widget/AdapterHelper$Callback;
iput-boolean p2, p0, Landroidx/recyclerview/widget/AdapterHelper;->mDisableRecycler:Z
.line 78
new-instance p1, Landroidx/recyclerview/widget/OpReorderer;
invoke-direct {p1, p0}, Landroidx/recyclerview/widget/OpReorderer;-><init>(Landroidx/recyclerview/widget/OpReorderer$Callback;)V
iput-object p1, p0, Landroidx/recyclerview/widget/AdapterHelper;->mOpReorderer:Landroidx/recyclerview/widget/OpReorderer;
return-void
.end method
.method private applyAdd(Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;)V
.locals 0
.line 432
invoke-direct {p0, p1}, Landroidx/recyclerview/widget/AdapterHelper;->postponeAndUpdateViewHolders(Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;)V
return-void
.end method
.method private applyMove(Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;)V
.locals 0
.line 130
invoke-direct {p0, p1}, Landroidx/recyclerview/widget/AdapterHelper;->postponeAndUpdateViewHolders(Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;)V
return-void
.end method
.method private applyRemove(Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;)V
.locals 10
.line 134
iget v0, p1, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->positionStart:I
.line 136
iget v1, p1, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->positionStart:I
iget v2, p1, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->itemCount:I
add-int/2addr v1, v2
.line 138
iget v2, p1, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->positionStart:I
const/4 v3, 0x0
const/4 v4, -0x1
move v5, v3
:goto_0
const/4 v6, 0x0
const/4 v7, 0x2
if-ge v2, v1, :cond_5
iget-object v8, p0, Landroidx/recyclerview/widget/AdapterHelper;->mCallback:Landroidx/recyclerview/widget/AdapterHelper$Callback;
.line 140
invoke-interface {v8, v2}, Landroidx/recyclerview/widget/AdapterHelper$Callback;->findViewHolder(I)Landroidx/recyclerview/widget/RecyclerView$ViewHolder;
move-result-object v8
const/4 v9, 0x1
if-nez v8, :cond_2
.line 141
invoke-direct {p0, v2}, Landroidx/recyclerview/widget/AdapterHelper;->canFindInPreLayout(I)Z
move-result v8
if-eqz v8, :cond_0
goto :goto_2
:cond_0
if-ne v4, v9, :cond_1
.line 162
invoke-virtual {p0, v7, v0, v5, v6}, Landroidx/recyclerview/widget/AdapterHelper;->obtainUpdateOp(IIILjava/lang/Object;)Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;
move-result-object v4
.line 163
invoke-direct {p0, v4}, Landroidx/recyclerview/widget/AdapterHelper;->postponeAndUpdateViewHolders(Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;)V
move v4, v9
goto :goto_1
:cond_1
move v4, v3
:goto_1
move v6, v3
goto :goto_4
:cond_2
:goto_2
if-nez v4, :cond_3
.line 151
invoke-virtual {p0, v7, v0, v5, v6}, Landroidx/recyclerview/widget/AdapterHelper;->obtainUpdateOp(IIILjava/lang/Object;)Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;
move-result-object v4
.line 152
invoke-direct {p0, v4}, Landroidx/recyclerview/widget/AdapterHelper;->dispatchAndUpdateViewHolders(Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;)V
move v4, v9
goto :goto_3
:cond_3
move v4, v3
:goto_3
move v6, v9
:goto_4
if-eqz v4, :cond_4
sub-int/2addr v2, v5
sub-int/2addr v1, v5
move v5, v9
goto :goto_5
:cond_4
add-int/lit8 v5, v5, 0x1
:goto_5
add-int/2addr v2, v9
move v4, v6
goto :goto_0
.line 176
:cond_5
iget v1, p1, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->itemCount:I
if-eq v5, v1, :cond_6
.line 177
invoke-virtual {p0, p1}, Landroidx/recyclerview/widget/AdapterHelper;->recycleUpdateOp(Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;)V
.line 178
invoke-virtual {p0, v7, v0, v5, v6}, Landroidx/recyclerview/widget/AdapterHelper;->obtainUpdateOp(IIILjava/lang/Object;)Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;
move-result-object p1
:cond_6
if-nez v4, :cond_7
.line 181
invoke-direct {p0, p1}, Landroidx/recyclerview/widget/AdapterHelper;->dispatchAndUpdateViewHolders(Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;)V
goto :goto_6
.line 183
:cond_7
invoke-direct {p0, p1}, Landroidx/recyclerview/widget/AdapterHelper;->postponeAndUpdateViewHolders(Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;)V
:goto_6
return-void
.end method
.method private applyUpdate(Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;)V
.locals 9
.line 188
iget v0, p1, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->positionStart:I
.line 190
iget v1, p1, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->positionStart:I
iget v2, p1, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->itemCount:I
add-int/2addr v1, v2
.line 192
iget v2, p1, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->positionStart:I
const/4 v3, 0x0
const/4 v4, -0x1
move v5, v3
:goto_0
const/4 v6, 0x4
if-ge v2, v1, :cond_4
iget-object v7, p0, Landroidx/recyclerview/widget/AdapterHelper;->mCallback:Landroidx/recyclerview/widget/AdapterHelper$Callback;
.line 193
invoke-interface {v7, v2}, Landroidx/recyclerview/widget/AdapterHelper$Callback;->findViewHolder(I)Landroidx/recyclerview/widget/RecyclerView$ViewHolder;
move-result-object v7
const/4 v8, 0x1
if-nez v7, :cond_2
.line 194
invoke-direct {p0, v2}, Landroidx/recyclerview/widget/AdapterHelper;->canFindInPreLayout(I)Z
move-result v7
if-eqz v7, :cond_0
goto :goto_1
:cond_0
if-ne v4, v8, :cond_1
.line 205
iget-object v4, p1, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->payload:Ljava/lang/Object;
invoke-virtual {p0, v6, v0, v5, v4}, Landroidx/recyclerview/widget/AdapterHelper;->obtainUpdateOp(IIILjava/lang/Object;)Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;
move-result-object v0
.line 207
invoke-direct {p0, v0}, Landroidx/recyclerview/widget/AdapterHelper;->postponeAndUpdateViewHolders(Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;)V
move v0, v2
move v5, v3
:cond_1
move v4, v3
goto :goto_2
:cond_2
:goto_1
if-nez v4, :cond_3
.line 196
iget-object v4, p1, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->payload:Ljava/lang/Object;
invoke-virtual {p0, v6, v0, v5, v4}, Landroidx/recyclerview/widget/AdapterHelper;->obtainUpdateOp(IIILjava/lang/Object;)Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;
move-result-object v0
.line 198
invoke-direct {p0, v0}, Landroidx/recyclerview/widget/AdapterHelper;->dispatchAndUpdateViewHolders(Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;)V
move v0, v2
move v5, v3
:cond_3
move v4, v8
:goto_2
add-int/2addr v5, v8
add-int/lit8 v2, v2, 0x1
goto :goto_0
.line 215
:cond_4
iget v1, p1, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->itemCount:I
if-eq v5, v1, :cond_5
.line 216
iget-object v1, p1, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->payload:Ljava/lang/Object;
.line 217
invoke-virtual {p0, p1}, Landroidx/recyclerview/widget/AdapterHelper;->recycleUpdateOp(Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;)V
.line 218
invoke-virtual {p0, v6, v0, v5, v1}, Landroidx/recyclerview/widget/AdapterHelper;->obtainUpdateOp(IIILjava/lang/Object;)Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;
move-result-object p1
:cond_5
if-nez v4, :cond_6
.line 221
invoke-direct {p0, p1}, Landroidx/recyclerview/widget/AdapterHelper;->dispatchAndUpdateViewHolders(Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;)V
goto :goto_3
.line 223
:cond_6
invoke-direct {p0, p1}, Landroidx/recyclerview/widget/AdapterHelper;->postponeAndUpdateViewHolders(Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;)V
:goto_3
return-void
.end method
.method private canFindInPreLayout(I)Z
.locals 7
iget-object v0, p0, Landroidx/recyclerview/widget/AdapterHelper;->mPostponedList:Ljava/util/ArrayList;
.line 411
invoke-virtual {v0}, Ljava/util/ArrayList;->size()I
move-result v0
const/4 v1, 0x0
move v2, v1
:goto_0
if-ge v2, v0, :cond_3
iget-object v3, p0, Landroidx/recyclerview/widget/AdapterHelper;->mPostponedList:Ljava/util/ArrayList;
.line 413
invoke-virtual {v3, v2}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
move-result-object v3
check-cast v3, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;
.line 414
iget v4, v3, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->cmd:I
const/16 v5, 0x8
const/4 v6, 0x1
if-ne v4, v5, :cond_0
.line 415
iget v3, v3, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->itemCount:I
add-int/lit8 v4, v2, 0x1
invoke-virtual {p0, v3, v4}, Landroidx/recyclerview/widget/AdapterHelper;->findPositionOffset(II)I
move-result v3
if-ne v3, p1, :cond_2
return v6
.line 418
:cond_0
iget v4, v3, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->cmd:I
if-ne v4, v6, :cond_2
.line 420
iget v4, v3, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->positionStart:I
iget v5, v3, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->itemCount:I
add-int/2addr v4, v5
.line 421
iget v3, v3, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->positionStart:I
:goto_1
if-ge v3, v4, :cond_2
add-int/lit8 v5, v2, 0x1
.line 422
invoke-virtual {p0, v3, v5}, Landroidx/recyclerview/widget/AdapterHelper;->findPositionOffset(II)I
move-result v5
if-ne v5, p1, :cond_1
return v6
:cond_1
add-int/lit8 v3, v3, 0x1
goto :goto_1
:cond_2
add-int/lit8 v2, v2, 0x1
goto :goto_0
:cond_3
return v1
.end method
.method private dispatchAndUpdateViewHolders(Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;)V
.locals 11
.line 231
iget v0, p1, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->cmd:I
const/4 v1, 0x1
if-eq v0, v1, :cond_8
iget v0, p1, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->cmd:I
const/16 v2, 0x8
if-eq v0, v2, :cond_8
.line 245
iget v0, p1, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->positionStart:I
iget v2, p1, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->cmd:I
invoke-direct {p0, v0, v2}, Landroidx/recyclerview/widget/AdapterHelper;->updatePositionWithPostponed(II)I
move-result v0
.line 250
iget v2, p1, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->positionStart:I
.line 252
iget v3, p1, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->cmd:I
const/4 v4, 0x2
const/4 v5, 0x4
if-eq v3, v4, :cond_1
if-ne v3, v5, :cond_0
move v3, v1
goto :goto_0
.line 260
:cond_0
new-instance p0, Ljava/lang/IllegalArgumentException;
new-instance v0, Ljava/lang/StringBuilder;
const-string v1, "op should be remove or update."
invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-virtual {v0, 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/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p0
:cond_1
const/4 v3, 0x0
:goto_0
move v6, v1
move v7, v6
.line 262
:goto_1
iget v8, p1, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->itemCount:I
if-ge v6, v8, :cond_6
.line 263
iget v8, p1, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->positionStart:I
mul-int v9, v3, v6
add-int/2addr v8, v9
.line 264
iget v9, p1, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->cmd:I
invoke-direct {p0, v8, v9}, Landroidx/recyclerview/widget/AdapterHelper;->updatePositionWithPostponed(II)I
move-result v8
.line 269
iget v9, p1, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->cmd:I
if-eq v9, v4, :cond_3
if-eq v9, v5, :cond_2
goto :goto_3
:cond_2
add-int/lit8 v9, v0, 0x1
if-ne v8, v9, :cond_4
goto :goto_2
:cond_3
if-ne v8, v0, :cond_4
:goto_2
add-int/lit8 v7, v7, 0x1
goto :goto_4
.line 281
:cond_4
:goto_3
iget v9, p1, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->cmd:I
iget-object v10, p1, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->payload:Ljava/lang/Object;
invoke-virtual {p0, v9, v0, v7, v10}, Landroidx/recyclerview/widget/AdapterHelper;->obtainUpdateOp(IIILjava/lang/Object;)Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;
move-result-object v0
.line 285
invoke-virtual {p0, v0, v2}, Landroidx/recyclerview/widget/AdapterHelper;->dispatchFirstPassAndUpdateViewHolders(Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;I)V
.line 286
invoke-virtual {p0, v0}, Landroidx/recyclerview/widget/AdapterHelper;->recycleUpdateOp(Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;)V
.line 287
iget v0, p1, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->cmd:I
if-ne v0, v5, :cond_5
add-int/2addr v2, v7
:cond_5
move v7, v1
move v0, v8
:goto_4
add-int/lit8 v6, v6, 0x1
goto :goto_1
.line 294
:cond_6
iget-object v1, p1, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->payload:Ljava/lang/Object;
.line 295
invoke-virtual {p0, p1}, Landroidx/recyclerview/widget/AdapterHelper;->recycleUpdateOp(Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;)V
if-lez v7, :cond_7
.line 297
iget p1, p1, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->cmd:I
invoke-virtual {p0, p1, v0, v7, v1}, Landroidx/recyclerview/widget/AdapterHelper;->obtainUpdateOp(IIILjava/lang/Object;)Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;
move-result-object p1
.line 301
invoke-virtual {p0, p1, v2}, Landroidx/recyclerview/widget/AdapterHelper;->dispatchFirstPassAndUpdateViewHolders(Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;I)V
.line 302
invoke-virtual {p0, p1}, Landroidx/recyclerview/widget/AdapterHelper;->recycleUpdateOp(Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;)V
:cond_7
return-void
.line 232
:cond_8
new-instance p0, Ljava/lang/IllegalArgumentException;
const-string p1, "should not dispatch add or move for pre layout"
invoke-direct {p0, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p0
.end method
.method private postponeAndUpdateViewHolders(Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;)V
.locals 2
iget-object v0, p0, Landroidx/recyclerview/widget/AdapterHelper;->mPostponedList:Ljava/util/ArrayList;
.line 439
invoke-virtual {v0, p1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
.line 440
iget v0, p1, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->cmd:I
const/4 v1, 0x1
if-eq v0, v1, :cond_3
const/4 v1, 0x2
if-eq v0, v1, :cond_2
const/4 v1, 0x4
if-eq v0, v1, :cond_1
const/16 v1, 0x8
if-ne v0, v1, :cond_0
iget-object p0, p0, Landroidx/recyclerview/widget/AdapterHelper;->mCallback:Landroidx/recyclerview/widget/AdapterHelper$Callback;
.line 445
iget v0, p1, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->positionStart:I
iget p1, p1, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->itemCount:I
invoke-interface {p0, v0, p1}, Landroidx/recyclerview/widget/AdapterHelper$Callback;->offsetPositionsForMove(II)V
goto :goto_0
.line 455
:cond_0
new-instance p0, Ljava/lang/IllegalArgumentException;
new-instance v0, Ljava/lang/StringBuilder;
const-string v1, "Unknown update op type for "
invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-virtual {v0, 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/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p0
:cond_1
iget-object p0, p0, Landroidx/recyclerview/widget/AdapterHelper;->mCallback:Landroidx/recyclerview/widget/AdapterHelper$Callback;
.line 452
iget v0, p1, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->positionStart:I
iget v1, p1, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->itemCount:I
iget-object p1, p1, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->payload:Ljava/lang/Object;
invoke-interface {p0, v0, v1, p1}, Landroidx/recyclerview/widget/AdapterHelper$Callback;->markViewHoldersUpdated(IILjava/lang/Object;)V
goto :goto_0
:cond_2
iget-object p0, p0, Landroidx/recyclerview/widget/AdapterHelper;->mCallback:Landroidx/recyclerview/widget/AdapterHelper$Callback;
.line 448
iget v0, p1, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->positionStart:I
iget p1, p1, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->itemCount:I
invoke-interface {p0, v0, p1}, Landroidx/recyclerview/widget/AdapterHelper$Callback;->offsetPositionsForRemovingLaidOutOrNewView(II)V
goto :goto_0
:cond_3
iget-object p0, p0, Landroidx/recyclerview/widget/AdapterHelper;->mCallback:Landroidx/recyclerview/widget/AdapterHelper$Callback;
.line 442
iget v0, p1, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->positionStart:I
iget p1, p1, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->itemCount:I
invoke-interface {p0, v0, p1}, Landroidx/recyclerview/widget/AdapterHelper$Callback;->offsetPositionsForAdd(II)V
:goto_0
return-void
.end method
.method private updatePositionWithPostponed(II)I
.locals 6
iget-object v0, p0, Landroidx/recyclerview/widget/AdapterHelper;->mPostponedList:Ljava/util/ArrayList;
.line 330
invoke-virtual {v0}, Ljava/util/ArrayList;->size()I
move-result v0
const/4 v1, 0x1
sub-int/2addr v0, v1
:goto_0
const/16 v2, 0x8
if-ltz v0, :cond_d
iget-object v3, p0, Landroidx/recyclerview/widget/AdapterHelper;->mPostponedList:Ljava/util/ArrayList;
.line 332
invoke-virtual {v3, v0}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
move-result-object v3
check-cast v3, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;
.line 333
iget v4, v3, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->cmd:I
const/4 v5, 0x2
if-ne v4, v2, :cond_8
.line 335
iget v2, v3, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->positionStart:I
iget v4, v3, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->itemCount:I
if-ge v2, v4, :cond_0
.line 336
iget v2, v3, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->positionStart:I
.line 337
iget v4, v3, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->itemCount:I
goto :goto_1
.line 339
:cond_0
iget v2, v3, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->itemCount:I
.line 340
iget v4, v3, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->positionStart:I
:goto_1
if-lt p1, v2, :cond_6
if-gt p1, v4, :cond_6
.line 344
iget v4, v3, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->positionStart:I
if-ne v2, v4, :cond_3
if-ne p2, v1, :cond_1
.line 346
iget v2, v3, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->itemCount:I
add-int/2addr v2, v1
iput v2, v3, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->itemCount:I
goto :goto_2
:cond_1
if-ne p2, v5, :cond_2
.line 348
iget v2, v3, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->itemCount:I
sub-int/2addr v2, v1
iput v2, v3, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->itemCount:I
:cond_2
:goto_2
add-int/lit8 p1, p1, 0x1
goto :goto_4
:cond_3
if-ne p2, v1, :cond_4
.line 354
iget v2, v3, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->positionStart:I
add-int/2addr v2, v1
iput v2, v3, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->positionStart:I
goto :goto_3
:cond_4
if-ne p2, v5, :cond_5
.line 356
iget v2, v3, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->positionStart:I
sub-int/2addr v2, v1
iput v2, v3, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->positionStart:I
:cond_5
:goto_3
add-int/lit8 p1, p1, -0x1
goto :goto_4
.line 361
:cond_6
iget v2, v3, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->positionStart:I
if-ge p1, v2, :cond_c
if-ne p2, v1, :cond_7
.line 364
iget v2, v3, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->positionStart:I
add-int/2addr v2, v1
iput v2, v3, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->positionStart:I
.line 365
iget v2, v3, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->itemCount:I
add-int/2addr v2, v1
iput v2, v3, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->itemCount:I
goto :goto_4
:cond_7
if-ne p2, v5, :cond_c
.line 367
iget v2, v3, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->positionStart:I
sub-int/2addr v2, v1
iput v2, v3, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->positionStart:I
.line 368
iget v2, v3, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->itemCount:I
sub-int/2addr v2, v1
iput v2, v3, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->itemCount:I
goto :goto_4
.line 372
:cond_8
iget v2, v3, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->positionStart:I
if-gt v2, p1, :cond_a
.line 373
iget v2, v3, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->cmd:I
if-ne v2, v1, :cond_9
.line 374
iget v2, v3, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->itemCount:I
sub-int/2addr p1, v2
goto :goto_4
.line 375
:cond_9
iget v2, v3, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->cmd:I
if-ne v2, v5, :cond_c
.line 376
iget v2, v3, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->itemCount:I
add-int/2addr p1, v2
goto :goto_4
:cond_a
if-ne p2, v1, :cond_b
.line 380
iget v2, v3, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->positionStart:I
add-int/2addr v2, v1
iput v2, v3, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->positionStart:I
goto :goto_4
:cond_b
if-ne p2, v5, :cond_c
.line 382
iget v2, v3, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->positionStart:I
sub-int/2addr v2, v1
iput v2, v3, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->positionStart:I
:cond_c
:goto_4
add-int/lit8 v0, v0, -0x1
goto/16 :goto_0
:cond_d
iget-object p2, p0, Landroidx/recyclerview/widget/AdapterHelper;->mPostponedList:Ljava/util/ArrayList;
.line 395
invoke-virtual {p2}, Ljava/util/ArrayList;->size()I
move-result p2
sub-int/2addr p2, v1
:goto_5
if-ltz p2, :cond_11
iget-object v0, p0, Landroidx/recyclerview/widget/AdapterHelper;->mPostponedList:Ljava/util/ArrayList;
.line 396
invoke-virtual {v0, p2}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;
.line 397
iget v1, v0, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->cmd:I
if-ne v1, v2, :cond_f
.line 398
iget v1, v0, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->itemCount:I
iget v3, v0, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->positionStart:I
if-eq v1, v3, :cond_e
iget v1, v0, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->itemCount:I
if-gez v1, :cond_10
:cond_e
iget-object v1, p0, Landroidx/recyclerview/widget/AdapterHelper;->mPostponedList:Ljava/util/ArrayList;
.line 399
invoke-virtual {v1, p2}, Ljava/util/ArrayList;->remove(I)Ljava/lang/Object;
.line 400
invoke-virtual {p0, v0}, Landroidx/recyclerview/widget/AdapterHelper;->recycleUpdateOp(Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;)V
goto :goto_6
.line 402
:cond_f
iget v1, v0, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->itemCount:I
if-gtz v1, :cond_10
iget-object v1, p0, Landroidx/recyclerview/widget/AdapterHelper;->mPostponedList:Ljava/util/ArrayList;
.line 403
invoke-virtual {v1, p2}, Ljava/util/ArrayList;->remove(I)Ljava/lang/Object;
.line 404
invoke-virtual {p0, v0}, Landroidx/recyclerview/widget/AdapterHelper;->recycleUpdateOp(Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;)V
:cond_10
:goto_6
add-int/lit8 p2, p2, -0x1
goto :goto_5
:cond_11
return p1
.end method
# virtual methods
.method varargs addUpdateOp([Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;)Landroidx/recyclerview/widget/AdapterHelper;
.locals 1
iget-object v0, p0, Landroidx/recyclerview/widget/AdapterHelper;->mPendingUpdates:Ljava/util/ArrayList;
.line 82
invoke-static {v0, p1}, Ljava/util/Collections;->addAll(Ljava/util/Collection;[Ljava/lang/Object;)Z
return-object p0
.end method
.method public applyPendingUpdatesToPosition(I)I
.locals 5
iget-object v0, p0, Landroidx/recyclerview/widget/AdapterHelper;->mPendingUpdates:Ljava/util/ArrayList;
.line 588
invoke-virtual {v0}, Ljava/util/ArrayList;->size()I
move-result v0
const/4 v1, 0x0
:goto_0
if-ge v1, v0, :cond_7
iget-object v2, p0, Landroidx/recyclerview/widget/AdapterHelper;->mPendingUpdates:Ljava/util/ArrayList;
.line 590
invoke-virtual {v2, v1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
move-result-object v2
check-cast v2, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;
.line 591
iget v3, v2, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->cmd:I
const/4 v4, 0x1
if-eq v3, v4, :cond_5
const/4 v4, 0x2
if-eq v3, v4, :cond_3
const/16 v4, 0x8
if-eq v3, v4, :cond_0
goto :goto_1
.line 607
:cond_0
iget v3, v2, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->positionStart:I
if-ne v3, p1, :cond_1
.line 608
iget p1, v2, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->itemCount:I
goto :goto_1
.line 610
:cond_1
iget v3, v2, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->positionStart:I
if-ge v3, p1, :cond_2
add-int/lit8 p1, p1, -0x1
.line 613
:cond_2
iget v2, v2, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->itemCount:I
if-gt v2, p1, :cond_6
add-int/lit8 p1, p1, 0x1
goto :goto_1
.line 598
:cond_3
iget v3, v2, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->positionStart:I
if-gt v3, p1, :cond_6
.line 599
iget v3, v2, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->positionStart:I
iget v4, v2, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->itemCount:I
add-int/2addr v3, v4
if-le v3, p1, :cond_4
const/4 p0, -0x1
return p0
.line 603
:cond_4
iget v2, v2, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->itemCount:I
sub-int/2addr p1, v2
goto :goto_1
.line 593
:cond_5
iget v3, v2, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->positionStart:I
if-gt v3, p1, :cond_6
.line 594
iget v2, v2, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->itemCount:I
add-int/2addr p1, v2
:cond_6
:goto_1
add-int/lit8 v1, v1, 0x1
goto :goto_0
:cond_7
return p1
.end method
.method consumePostponedUpdates()V
.locals 5
iget-object v0, p0, Landroidx/recyclerview/widget/AdapterHelper;->mPostponedList:Ljava/util/ArrayList;
.line 119
invoke-virtual {v0}, Ljava/util/ArrayList;->size()I
move-result v0
const/4 v1, 0x0
move v2, v1
:goto_0
if-ge v2, v0, :cond_0
iget-object v3, p0, Landroidx/recyclerview/widget/AdapterHelper;->mCallback:Landroidx/recyclerview/widget/AdapterHelper$Callback;
iget-object v4, p0, Landroidx/recyclerview/widget/AdapterHelper;->mPostponedList:Ljava/util/ArrayList;
.line 121
invoke-virtual {v4, v2}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
move-result-object v4
check-cast v4, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;
invoke-interface {v3, v4}, Landroidx/recyclerview/widget/AdapterHelper$Callback;->onDispatchSecondPass(Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;)V
add-int/lit8 v2, v2, 0x1
goto :goto_0
:cond_0
iget-object v0, p0, Landroidx/recyclerview/widget/AdapterHelper;->mPostponedList:Ljava/util/ArrayList;
.line 123
invoke-virtual {p0, v0}, Landroidx/recyclerview/widget/AdapterHelper;->recycleUpdateOpsAndClearList(Ljava/util/List;)V
iput v1, p0, Landroidx/recyclerview/widget/AdapterHelper;->mExistingUpdateTypes:I
return-void
.end method
.method consumeUpdatesInOnePass()V
.locals 7
.line 557
invoke-virtual {p0}, Landroidx/recyclerview/widget/AdapterHelper;->consumePostponedUpdates()V
iget-object v0, p0, Landroidx/recyclerview/widget/AdapterHelper;->mPendingUpdates:Ljava/util/ArrayList;
.line 558
invoke-virtual {v0}, Ljava/util/ArrayList;->size()I
move-result v0
const/4 v1, 0x0
move v2, v1
:goto_0
if-ge v2, v0, :cond_5
iget-object v3, p0, Landroidx/recyclerview/widget/AdapterHelper;->mPendingUpdates:Ljava/util/ArrayList;
.line 560
invoke-virtual {v3, v2}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
move-result-object v3
check-cast v3, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;
.line 561
iget v4, v3, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->cmd:I
const/4 v5, 0x1
if-eq v4, v5, :cond_3
const/4 v5, 0x2
if-eq v4, v5, :cond_2
const/4 v5, 0x4
if-eq v4, v5, :cond_1
const/16 v5, 0x8
if-eq v4, v5, :cond_0
goto :goto_1
:cond_0
iget-object v4, p0, Landroidx/recyclerview/widget/AdapterHelper;->mCallback:Landroidx/recyclerview/widget/AdapterHelper$Callback;
.line 575
invoke-interface {v4, v3}, Landroidx/recyclerview/widget/AdapterHelper$Callback;->onDispatchSecondPass(Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;)V
iget-object v4, p0, Landroidx/recyclerview/widget/AdapterHelper;->mCallback:Landroidx/recyclerview/widget/AdapterHelper$Callback;
.line 576
iget v5, v3, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->positionStart:I
iget v3, v3, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->itemCount:I
invoke-interface {v4, v5, v3}, Landroidx/recyclerview/widget/AdapterHelper$Callback;->offsetPositionsForMove(II)V
goto :goto_1
:cond_1
iget-object v4, p0, Landroidx/recyclerview/widget/AdapterHelper;->mCallback:Landroidx/recyclerview/widget/AdapterHelper$Callback;
.line 571
invoke-interface {v4, v3}, Landroidx/recyclerview/widget/AdapterHelper$Callback;->onDispatchSecondPass(Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;)V
iget-object v4, p0, Landroidx/recyclerview/widget/AdapterHelper;->mCallback:Landroidx/recyclerview/widget/AdapterHelper$Callback;
.line 572
iget v5, v3, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->positionStart:I
iget v6, v3, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->itemCount:I
iget-object v3, v3, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->payload:Ljava/lang/Object;
invoke-interface {v4, v5, v6, v3}, Landroidx/recyclerview/widget/AdapterHelper$Callback;->markViewHoldersUpdated(IILjava/lang/Object;)V
goto :goto_1
:cond_2
iget-object v4, p0, Landroidx/recyclerview/widget/AdapterHelper;->mCallback:Landroidx/recyclerview/widget/AdapterHelper$Callback;
.line 567
invoke-interface {v4, v3}, Landroidx/recyclerview/widget/AdapterHelper$Callback;->onDispatchSecondPass(Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;)V
iget-object v4, p0, Landroidx/recyclerview/widget/AdapterHelper;->mCallback:Landroidx/recyclerview/widget/AdapterHelper$Callback;
.line 568
iget v5, v3, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->positionStart:I
iget v3, v3, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->itemCount:I
invoke-interface {v4, v5, v3}, Landroidx/recyclerview/widget/AdapterHelper$Callback;->offsetPositionsForRemovingInvisible(II)V
goto :goto_1
:cond_3
iget-object v4, p0, Landroidx/recyclerview/widget/AdapterHelper;->mCallback:Landroidx/recyclerview/widget/AdapterHelper$Callback;
.line 563
invoke-interface {v4, v3}, Landroidx/recyclerview/widget/AdapterHelper$Callback;->onDispatchSecondPass(Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;)V
iget-object v4, p0, Landroidx/recyclerview/widget/AdapterHelper;->mCallback:Landroidx/recyclerview/widget/AdapterHelper$Callback;
.line 564
iget v5, v3, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->positionStart:I
iget v3, v3, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->itemCount:I
invoke-interface {v4, v5, v3}, Landroidx/recyclerview/widget/AdapterHelper$Callback;->offsetPositionsForAdd(II)V
:goto_1
iget-object v3, p0, Landroidx/recyclerview/widget/AdapterHelper;->mOnItemProcessedCallback:Ljava/lang/Runnable;
if-eqz v3, :cond_4
.line 580
invoke-interface {v3}, Ljava/lang/Runnable;->run()V
:cond_4
add-int/lit8 v2, v2, 0x1
goto :goto_0
:cond_5
iget-object v0, p0, Landroidx/recyclerview/widget/AdapterHelper;->mPendingUpdates:Ljava/util/ArrayList;
.line 583
invoke-virtual {p0, v0}, Landroidx/recyclerview/widget/AdapterHelper;->recycleUpdateOpsAndClearList(Ljava/util/List;)V
iput v1, p0, Landroidx/recyclerview/widget/AdapterHelper;->mExistingUpdateTypes:I
return-void
.end method
.method dispatchFirstPassAndUpdateViewHolders(Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;I)V
.locals 2
iget-object v0, p0, Landroidx/recyclerview/widget/AdapterHelper;->mCallback:Landroidx/recyclerview/widget/AdapterHelper$Callback;
.line 315
invoke-interface {v0, p1}, Landroidx/recyclerview/widget/AdapterHelper$Callback;->onDispatchFirstPass(Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;)V
.line 316
iget v0, p1, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->cmd:I
const/4 v1, 0x2
if-eq v0, v1, :cond_1
const/4 v1, 0x4
if-ne v0, v1, :cond_0
iget-object p0, p0, Landroidx/recyclerview/widget/AdapterHelper;->mCallback:Landroidx/recyclerview/widget/AdapterHelper$Callback;
.line 321
iget v0, p1, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->itemCount:I
iget-object p1, p1, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->payload:Ljava/lang/Object;
invoke-interface {p0, p2, v0, p1}, Landroidx/recyclerview/widget/AdapterHelper$Callback;->markViewHoldersUpdated(IILjava/lang/Object;)V
goto :goto_0
.line 324
:cond_0
new-instance p0, Ljava/lang/IllegalArgumentException;
const-string p1, "only remove and update ops can be dispatched in first pass"
invoke-direct {p0, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p0
:cond_1
iget-object p0, p0, Landroidx/recyclerview/widget/AdapterHelper;->mCallback:Landroidx/recyclerview/widget/AdapterHelper$Callback;
.line 318
iget p1, p1, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->itemCount:I
invoke-interface {p0, p2, p1}, Landroidx/recyclerview/widget/AdapterHelper$Callback;->offsetPositionsForRemovingInvisible(II)V
:goto_0
return-void
.end method
.method findPositionOffset(I)I
.locals 1
const/4 v0, 0x0
.line 468
invoke-virtual {p0, p1, v0}, Landroidx/recyclerview/widget/AdapterHelper;->findPositionOffset(II)I
move-result p0
return p0
.end method
.method findPositionOffset(II)I
.locals 4
iget-object v0, p0, Landroidx/recyclerview/widget/AdapterHelper;->mPostponedList:Ljava/util/ArrayList;
.line 472
invoke-virtual {v0}, Ljava/util/ArrayList;->size()I
move-result v0
:goto_0
if-ge p2, v0, :cond_6
iget-object v1, p0, Landroidx/recyclerview/widget/AdapterHelper;->mPostponedList:Ljava/util/ArrayList;
.line 474
invoke-virtual {v1, p2}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
move-result-object v1
check-cast v1, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;
.line 475
iget v2, v1, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->cmd:I
const/16 v3, 0x8
if-ne v2, v3, :cond_2
.line 476
iget v2, v1, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->positionStart:I
if-ne v2, p1, :cond_0
.line 477
iget p1, v1, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->itemCount:I
goto :goto_1
.line 479
:cond_0
iget v2, v1, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->positionStart:I
if-ge v2, p1, :cond_1
add-int/lit8 p1, p1, -0x1
.line 482
:cond_1
iget v1, v1, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->itemCount:I
if-gt v1, p1, :cond_5
add-int/lit8 p1, p1, 0x1
goto :goto_1
.line 486
:cond_2
iget v2, v1, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->positionStart:I
if-gt v2, p1, :cond_5
.line 487
iget v2, v1, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->cmd:I
const/4 v3, 0x2
if-ne v2, v3, :cond_4
.line 488
iget v2, v1, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->positionStart:I
iget v3, v1, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->itemCount:I
add-int/2addr v2, v3
if-ge p1, v2, :cond_3
const/4 p0, -0x1
return p0
.line 491
:cond_3
iget v1, v1, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->itemCount:I
sub-int/2addr p1, v1
goto :goto_1
.line 492
:cond_4
iget v2, v1, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->cmd:I
const/4 v3, 0x1
if-ne v2, v3, :cond_5
.line 493
iget v1, v1, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->itemCount:I
add-int/2addr p1, v1
:cond_5
:goto_1
add-int/lit8 p2, p2, 0x1
goto :goto_0
:cond_6
return p1
.end method
.method hasAnyUpdateTypes(I)Z
.locals 0
iget p0, p0, Landroidx/recyclerview/widget/AdapterHelper;->mExistingUpdateTypes:I
and-int/2addr p0, p1
if-eqz p0, :cond_0
const/4 p0, 0x1
goto :goto_0
:cond_0
const/4 p0, 0x0
:goto_0
return p0
.end method
.method hasPendingUpdates()Z
.locals 0
iget-object p0, p0, Landroidx/recyclerview/widget/AdapterHelper;->mPendingUpdates:Ljava/util/ArrayList;
.line 460
invoke-virtual {p0}, Ljava/util/ArrayList;->size()I
move-result p0
if-lez p0, :cond_0
const/4 p0, 0x1
goto :goto_0
:cond_0
const/4 p0, 0x0
:goto_0
return p0
.end method
.method hasUpdates()Z
.locals 1
iget-object v0, p0, Landroidx/recyclerview/widget/AdapterHelper;->mPostponedList:Ljava/util/ArrayList;
.line 624
invoke-virtual {v0}, Ljava/util/ArrayList;->isEmpty()Z
move-result v0
if-nez v0, :cond_0
iget-object p0, p0, Landroidx/recyclerview/widget/AdapterHelper;->mPendingUpdates:Ljava/util/ArrayList;
invoke-virtual {p0}, Ljava/util/ArrayList;->isEmpty()Z
move-result p0
if-nez p0, :cond_0
const/4 p0, 0x1
goto :goto_0
:cond_0
const/4 p0, 0x0
:goto_0
return p0
.end method
.method public obtainUpdateOp(IIILjava/lang/Object;)Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;
.locals 0
iget-object p0, p0, Landroidx/recyclerview/widget/AdapterHelper;->mUpdateOpPool:Landroidx/core/util/Pools$Pool;
.line 727
invoke-interface {p0}, Landroidx/core/util/Pools$Pool;->acquire()Ljava/lang/Object;
move-result-object p0
check-cast p0, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;
if-nez p0, :cond_0
.line 729
new-instance p0, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;
invoke-direct {p0, p1, p2, p3, p4}, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;-><init>(IIILjava/lang/Object;)V
goto :goto_0
.line 731
:cond_0
iput p1, p0, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->cmd:I
.line 732
iput p2, p0, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->positionStart:I
.line 733
iput p3, p0, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->itemCount:I
.line 734
iput-object p4, p0, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->payload:Ljava/lang/Object;
:goto_0
return-object p0
.end method
.method onItemRangeChanged(IILjava/lang/Object;)Z
.locals 4
const/4 v0, 0x0
const/4 v1, 0x1
if-ge p2, v1, :cond_0
return v0
:cond_0
iget-object v2, p0, Landroidx/recyclerview/widget/AdapterHelper;->mPendingUpdates:Ljava/util/ArrayList;
const/4 v3, 0x4
.line 507
invoke-virtual {p0, v3, p1, p2, p3}, Landroidx/recyclerview/widget/AdapterHelper;->obtainUpdateOp(IIILjava/lang/Object;)Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;
move-result-object p1
invoke-virtual {v2, p1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
iget p1, p0, Landroidx/recyclerview/widget/AdapterHelper;->mExistingUpdateTypes:I
or-int/2addr p1, v3
iput p1, p0, Landroidx/recyclerview/widget/AdapterHelper;->mExistingUpdateTypes:I
iget-object p0, p0, Landroidx/recyclerview/widget/AdapterHelper;->mPendingUpdates:Ljava/util/ArrayList;
.line 509
invoke-virtual {p0}, Ljava/util/ArrayList;->size()I
move-result p0
if-ne p0, v1, :cond_1
move v0, v1
:cond_1
return v0
.end method
.method onItemRangeInserted(II)Z
.locals 4
const/4 v0, 0x0
const/4 v1, 0x1
if-ge p2, v1, :cond_0
return v0
:cond_0
iget-object v2, p0, Landroidx/recyclerview/widget/AdapterHelper;->mPendingUpdates:Ljava/util/ArrayList;
const/4 v3, 0x0
.line 519
invoke-virtual {p0, v1, p1, p2, v3}, Landroidx/recyclerview/widget/AdapterHelper;->obtainUpdateOp(IIILjava/lang/Object;)Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;
move-result-object p1
invoke-virtual {v2, p1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
iget p1, p0, Landroidx/recyclerview/widget/AdapterHelper;->mExistingUpdateTypes:I
or-int/2addr p1, v1
iput p1, p0, Landroidx/recyclerview/widget/AdapterHelper;->mExistingUpdateTypes:I
iget-object p0, p0, Landroidx/recyclerview/widget/AdapterHelper;->mPendingUpdates:Ljava/util/ArrayList;
.line 521
invoke-virtual {p0}, Ljava/util/ArrayList;->size()I
move-result p0
if-ne p0, v1, :cond_1
move v0, v1
:cond_1
return v0
.end method
.method onItemRangeMoved(III)Z
.locals 4
const/4 v0, 0x0
if-ne p1, p2, :cond_0
return v0
:cond_0
const/4 v1, 0x1
if-ne p3, v1, :cond_2
iget-object p3, p0, Landroidx/recyclerview/widget/AdapterHelper;->mPendingUpdates:Ljava/util/ArrayList;
const/4 v2, 0x0
const/16 v3, 0x8
.line 546
invoke-virtual {p0, v3, p1, p2, v2}, Landroidx/recyclerview/widget/AdapterHelper;->obtainUpdateOp(IIILjava/lang/Object;)Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;
move-result-object p1
invoke-virtual {p3, p1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
iget p1, p0, Landroidx/recyclerview/widget/AdapterHelper;->mExistingUpdateTypes:I
or-int/2addr p1, v3
iput p1, p0, Landroidx/recyclerview/widget/AdapterHelper;->mExistingUpdateTypes:I
iget-object p0, p0, Landroidx/recyclerview/widget/AdapterHelper;->mPendingUpdates:Ljava/util/ArrayList;
.line 548
invoke-virtual {p0}, Ljava/util/ArrayList;->size()I
move-result p0
if-ne p0, v1, :cond_1
move v0, v1
:cond_1
return v0
.line 544
:cond_2
new-instance p0, Ljava/lang/IllegalArgumentException;
const-string p1, "Moving more than 1 item is not supported yet"
invoke-direct {p0, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p0
.end method
.method onItemRangeRemoved(II)Z
.locals 5
const/4 v0, 0x0
const/4 v1, 0x1
if-ge p2, v1, :cond_0
return v0
:cond_0
iget-object v2, p0, Landroidx/recyclerview/widget/AdapterHelper;->mPendingUpdates:Ljava/util/ArrayList;
const/4 v3, 0x0
const/4 v4, 0x2
.line 531
invoke-virtual {p0, v4, p1, p2, v3}, Landroidx/recyclerview/widget/AdapterHelper;->obtainUpdateOp(IIILjava/lang/Object;)Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;
move-result-object p1
invoke-virtual {v2, p1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
iget p1, p0, Landroidx/recyclerview/widget/AdapterHelper;->mExistingUpdateTypes:I
or-int/2addr p1, v4
iput p1, p0, Landroidx/recyclerview/widget/AdapterHelper;->mExistingUpdateTypes:I
iget-object p0, p0, Landroidx/recyclerview/widget/AdapterHelper;->mPendingUpdates:Ljava/util/ArrayList;
.line 533
invoke-virtual {p0}, Ljava/util/ArrayList;->size()I
move-result p0
if-ne p0, v1, :cond_1
move v0, v1
:cond_1
return v0
.end method
.method preProcess()V
.locals 5
iget-object v0, p0, Landroidx/recyclerview/widget/AdapterHelper;->mOpReorderer:Landroidx/recyclerview/widget/OpReorderer;
iget-object v1, p0, Landroidx/recyclerview/widget/AdapterHelper;->mPendingUpdates:Ljava/util/ArrayList;
.line 93
invoke-virtual {v0, v1}, Landroidx/recyclerview/widget/OpReorderer;->reorderOps(Ljava/util/List;)V
iget-object v0, p0, Landroidx/recyclerview/widget/AdapterHelper;->mPendingUpdates:Ljava/util/ArrayList;
.line 94
invoke-virtual {v0}, Ljava/util/ArrayList;->size()I
move-result v0
const/4 v1, 0x0
:goto_0
if-ge v1, v0, :cond_5
iget-object v2, p0, Landroidx/recyclerview/widget/AdapterHelper;->mPendingUpdates:Ljava/util/ArrayList;
.line 96
invoke-virtual {v2, v1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
move-result-object v2
check-cast v2, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;
.line 97
iget v3, v2, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->cmd:I
const/4 v4, 0x1
if-eq v3, v4, :cond_3
const/4 v4, 0x2
if-eq v3, v4, :cond_2
const/4 v4, 0x4
if-eq v3, v4, :cond_1
const/16 v4, 0x8
if-eq v3, v4, :cond_0
goto :goto_1
.line 108
:cond_0
invoke-direct {p0, v2}, Landroidx/recyclerview/widget/AdapterHelper;->applyMove(Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;)V
goto :goto_1
.line 105
:cond_1
invoke-direct {p0, v2}, Landroidx/recyclerview/widget/AdapterHelper;->applyUpdate(Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;)V
goto :goto_1
.line 102
:cond_2
invoke-direct {p0, v2}, Landroidx/recyclerview/widget/AdapterHelper;->applyRemove(Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;)V
goto :goto_1
.line 99
:cond_3
invoke-direct {p0, v2}, Landroidx/recyclerview/widget/AdapterHelper;->applyAdd(Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;)V
:goto_1
iget-object v2, p0, Landroidx/recyclerview/widget/AdapterHelper;->mOnItemProcessedCallback:Ljava/lang/Runnable;
if-eqz v2, :cond_4
.line 112
invoke-interface {v2}, Ljava/lang/Runnable;->run()V
:cond_4
add-int/lit8 v1, v1, 0x1
goto :goto_0
:cond_5
iget-object p0, p0, Landroidx/recyclerview/widget/AdapterHelper;->mPendingUpdates:Ljava/util/ArrayList;
.line 115
invoke-virtual {p0}, Ljava/util/ArrayList;->clear()V
return-void
.end method
.method public recycleUpdateOp(Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;)V
.locals 1
iget-boolean v0, p0, Landroidx/recyclerview/widget/AdapterHelper;->mDisableRecycler:Z
if-nez v0, :cond_0
const/4 v0, 0x0
.line 742
iput-object v0, p1, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;->payload:Ljava/lang/Object;
iget-object p0, p0, Landroidx/recyclerview/widget/AdapterHelper;->mUpdateOpPool:Landroidx/core/util/Pools$Pool;
.line 743
invoke-interface {p0, p1}, Landroidx/core/util/Pools$Pool;->release(Ljava/lang/Object;)Z
:cond_0
return-void
.end method
.method recycleUpdateOpsAndClearList(Ljava/util/List;)V
.locals 3
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/util/List<",
"Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;",
">;)V"
}
.end annotation
.line 748
invoke-interface {p1}, Ljava/util/List;->size()I
move-result v0
const/4 v1, 0x0
:goto_0
if-ge v1, v0, :cond_0
.line 750
invoke-interface {p1, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;
move-result-object v2
check-cast v2, Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;
invoke-virtual {p0, v2}, Landroidx/recyclerview/widget/AdapterHelper;->recycleUpdateOp(Landroidx/recyclerview/widget/AdapterHelper$UpdateOp;)V
add-int/lit8 v1, v1, 0x1
goto :goto_0
.line 752
:cond_0
invoke-interface {p1}, Ljava/util/List;->clear()V
return-void
.end method
.method reset()V
.locals 1
iget-object v0, p0, Landroidx/recyclerview/widget/AdapterHelper;->mPendingUpdates:Ljava/util/ArrayList;
.line 87
invoke-virtual {p0, v0}, Landroidx/recyclerview/widget/AdapterHelper;->recycleUpdateOpsAndClearList(Ljava/util/List;)V
iget-object v0, p0, Landroidx/recyclerview/widget/AdapterHelper;->mPostponedList:Ljava/util/ArrayList;
.line 88
invoke-virtual {p0, v0}, Landroidx/recyclerview/widget/AdapterHelper;->recycleUpdateOpsAndClearList(Ljava/util/List;)V
const/4 v0, 0x0
iput v0, p0, Landroidx/recyclerview/widget/AdapterHelper;->mExistingUpdateTypes:I
return-void
.end method