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

193 lines
5.3 KiB
Smali

.class final Landroidx/viewpager2/widget/CompositeOnPageChangeCallback;
.super Landroidx/viewpager2/widget/ViewPager2$OnPageChangeCallback;
.source "CompositeOnPageChangeCallback.java"
# instance fields
.field private final mCallbacks:Ljava/util/List;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/List<",
"Landroidx/viewpager2/widget/ViewPager2$OnPageChangeCallback;",
">;"
}
.end annotation
.end field
# direct methods
.method constructor <init>(I)V
.locals 1
.line 34
invoke-direct {p0}, Landroidx/viewpager2/widget/ViewPager2$OnPageChangeCallback;-><init>()V
.line 35
new-instance v0, Ljava/util/ArrayList;
invoke-direct {v0, p1}, Ljava/util/ArrayList;-><init>(I)V
iput-object v0, p0, Landroidx/viewpager2/widget/CompositeOnPageChangeCallback;->mCallbacks:Ljava/util/List;
return-void
.end method
.method private throwCallbackListModifiedWhileInUse(Ljava/util/ConcurrentModificationException;)V
.locals 1
.line 95
new-instance p0, Ljava/lang/IllegalStateException;
const-string v0, "Adding and removing callbacks during dispatch to callbacks is not supported"
invoke-direct {p0, v0, p1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
throw p0
.end method
# virtual methods
.method addOnPageChangeCallback(Landroidx/viewpager2/widget/ViewPager2$OnPageChangeCallback;)V
.locals 0
iget-object p0, p0, Landroidx/viewpager2/widget/CompositeOnPageChangeCallback;->mCallbacks:Ljava/util/List;
.line 42
invoke-interface {p0, p1}, Ljava/util/List;->add(Ljava/lang/Object;)Z
return-void
.end method
.method public onPageScrollStateChanged(I)V
.locals 2
:try_start_0
iget-object v0, p0, Landroidx/viewpager2/widget/CompositeOnPageChangeCallback;->mCallbacks:Ljava/util/List;
.line 86
invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;
move-result-object v0
:goto_0
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
move-result v1
if-eqz v1, :cond_0
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v1
check-cast v1, Landroidx/viewpager2/widget/ViewPager2$OnPageChangeCallback;
.line 87
invoke-virtual {v1, p1}, Landroidx/viewpager2/widget/ViewPager2$OnPageChangeCallback;->onPageScrollStateChanged(I)V
:try_end_0
.catch Ljava/util/ConcurrentModificationException; {:try_start_0 .. :try_end_0} :catch_0
goto :goto_0
:catch_0
move-exception p1
.line 90
invoke-direct {p0, p1}, Landroidx/viewpager2/widget/CompositeOnPageChangeCallback;->throwCallbackListModifiedWhileInUse(Ljava/util/ConcurrentModificationException;)V
:cond_0
return-void
.end method
.method public onPageScrolled(IFI)V
.locals 2
:try_start_0
iget-object v0, p0, Landroidx/viewpager2/widget/CompositeOnPageChangeCallback;->mCallbacks:Ljava/util/List;
.line 58
invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;
move-result-object v0
:goto_0
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
move-result v1
if-eqz v1, :cond_0
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v1
check-cast v1, Landroidx/viewpager2/widget/ViewPager2$OnPageChangeCallback;
.line 59
invoke-virtual {v1, p1, p2, p3}, Landroidx/viewpager2/widget/ViewPager2$OnPageChangeCallback;->onPageScrolled(IFI)V
:try_end_0
.catch Ljava/util/ConcurrentModificationException; {:try_start_0 .. :try_end_0} :catch_0
goto :goto_0
:catch_0
move-exception p1
.line 62
invoke-direct {p0, p1}, Landroidx/viewpager2/widget/CompositeOnPageChangeCallback;->throwCallbackListModifiedWhileInUse(Ljava/util/ConcurrentModificationException;)V
:cond_0
return-void
.end method
.method public onPageSelected(I)V
.locals 2
:try_start_0
iget-object v0, p0, Landroidx/viewpager2/widget/CompositeOnPageChangeCallback;->mCallbacks:Ljava/util/List;
.line 72
invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;
move-result-object v0
:goto_0
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
move-result v1
if-eqz v1, :cond_0
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v1
check-cast v1, Landroidx/viewpager2/widget/ViewPager2$OnPageChangeCallback;
.line 73
invoke-virtual {v1, p1}, Landroidx/viewpager2/widget/ViewPager2$OnPageChangeCallback;->onPageSelected(I)V
:try_end_0
.catch Ljava/util/ConcurrentModificationException; {:try_start_0 .. :try_end_0} :catch_0
goto :goto_0
:catch_0
move-exception p1
.line 76
invoke-direct {p0, p1}, Landroidx/viewpager2/widget/CompositeOnPageChangeCallback;->throwCallbackListModifiedWhileInUse(Ljava/util/ConcurrentModificationException;)V
:cond_0
return-void
.end method
.method removeOnPageChangeCallback(Landroidx/viewpager2/widget/ViewPager2$OnPageChangeCallback;)V
.locals 0
iget-object p0, p0, Landroidx/viewpager2/widget/CompositeOnPageChangeCallback;->mCallbacks:Ljava/util/List;
.line 49
invoke-interface {p0, p1}, Ljava/util/List;->remove(Ljava/lang/Object;)Z
return-void
.end method