222 lines
4.9 KiB
Smali
222 lines
4.9 KiB
Smali
.class public final Lio/reactivex/rxjava3/internal/subscriptions/ArrayCompositeSubscription;
|
|
.super Ljava/util/concurrent/atomic/AtomicReferenceArray;
|
|
.source "ArrayCompositeSubscription.java"
|
|
|
|
# interfaces
|
|
.implements Lio/reactivex/rxjava3/disposables/c;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/concurrent/atomic/AtomicReferenceArray<",
|
|
"Lok/e;",
|
|
">;",
|
|
"Lio/reactivex/rxjava3/disposables/c;"
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field private static final serialVersionUID:J = 0x261d229f8c0b4b20L
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(I)V
|
|
.locals 0
|
|
.annotation system Ldalvik/annotation/MethodParameters;
|
|
accessFlags = {
|
|
0x0
|
|
}
|
|
names = {
|
|
"capacity"
|
|
}
|
|
.end annotation
|
|
|
|
.line 1
|
|
invoke-direct {p0, p1}, Ljava/util/concurrent/atomic/AtomicReferenceArray;-><init>(I)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public dispose()V
|
|
.locals 4
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 1
|
|
invoke-virtual {p0, v0}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->get(I)Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
sget-object v2, Lio/reactivex/rxjava3/internal/subscriptions/SubscriptionHelper;->CANCELLED:Lio/reactivex/rxjava3/internal/subscriptions/SubscriptionHelper;
|
|
|
|
if-eq v1, v2, :cond_1
|
|
|
|
.line 2
|
|
invoke-virtual {p0}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->length()I
|
|
|
|
move-result v1
|
|
|
|
:goto_0
|
|
if-ge v0, v1, :cond_1
|
|
|
|
.line 3
|
|
invoke-virtual {p0, v0}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->get(I)Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Lok/e;
|
|
|
|
.line 4
|
|
sget-object v3, Lio/reactivex/rxjava3/internal/subscriptions/SubscriptionHelper;->CANCELLED:Lio/reactivex/rxjava3/internal/subscriptions/SubscriptionHelper;
|
|
|
|
if-eq v2, v3, :cond_0
|
|
|
|
.line 5
|
|
invoke-virtual {p0, v0, v3}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->getAndSet(ILjava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Lok/e;
|
|
|
|
if-eq v2, v3, :cond_0
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
.line 6
|
|
invoke-interface {v2}, Lok/e;->cancel()V
|
|
|
|
:cond_0
|
|
add-int/lit8 v0, v0, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
return-void
|
|
.end method
|
|
|
|
.method public isDisposed()Z
|
|
.locals 3
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 1
|
|
invoke-virtual {p0, v0}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->get(I)Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
sget-object v2, Lio/reactivex/rxjava3/internal/subscriptions/SubscriptionHelper;->CANCELLED:Lio/reactivex/rxjava3/internal/subscriptions/SubscriptionHelper;
|
|
|
|
if-ne v1, v2, :cond_0
|
|
|
|
const/4 v0, 0x1
|
|
|
|
:cond_0
|
|
return v0
|
|
.end method
|
|
|
|
.method public replaceResource(ILok/e;)Lok/e;
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/MethodParameters;
|
|
accessFlags = {
|
|
0x0,
|
|
0x0
|
|
}
|
|
names = {
|
|
"index",
|
|
"resource"
|
|
}
|
|
.end annotation
|
|
|
|
.line 1
|
|
:cond_0
|
|
invoke-virtual {p0, p1}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->get(I)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Lok/e;
|
|
|
|
.line 2
|
|
sget-object v1, Lio/reactivex/rxjava3/internal/subscriptions/SubscriptionHelper;->CANCELLED:Lio/reactivex/rxjava3/internal/subscriptions/SubscriptionHelper;
|
|
|
|
if-ne v0, v1, :cond_2
|
|
|
|
if-eqz p2, :cond_1
|
|
|
|
.line 3
|
|
invoke-interface {p2}, Lok/e;->cancel()V
|
|
|
|
:cond_1
|
|
const/4 p1, 0x0
|
|
|
|
return-object p1
|
|
|
|
.line 4
|
|
:cond_2
|
|
invoke-virtual {p0, p1, v0, p2}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->compareAndSet(ILjava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public setResource(ILok/e;)Z
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/MethodParameters;
|
|
accessFlags = {
|
|
0x0,
|
|
0x0
|
|
}
|
|
names = {
|
|
"index",
|
|
"resource"
|
|
}
|
|
.end annotation
|
|
|
|
.line 1
|
|
:cond_0
|
|
invoke-virtual {p0, p1}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->get(I)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Lok/e;
|
|
|
|
.line 2
|
|
sget-object v1, Lio/reactivex/rxjava3/internal/subscriptions/SubscriptionHelper;->CANCELLED:Lio/reactivex/rxjava3/internal/subscriptions/SubscriptionHelper;
|
|
|
|
if-ne v0, v1, :cond_2
|
|
|
|
if-eqz p2, :cond_1
|
|
|
|
.line 3
|
|
invoke-interface {p2}, Lok/e;->cancel()V
|
|
|
|
:cond_1
|
|
const/4 p1, 0x0
|
|
|
|
return p1
|
|
|
|
.line 4
|
|
:cond_2
|
|
invoke-virtual {p0, p1, v0, p2}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->compareAndSet(ILjava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
if-eqz v0, :cond_3
|
|
|
|
.line 5
|
|
invoke-interface {v0}, Lok/e;->cancel()V
|
|
|
|
:cond_3
|
|
const/4 p1, 0x1
|
|
|
|
return p1
|
|
.end method
|