439 lines
8.6 KiB
Smali
439 lines
8.6 KiB
Smali
.class public Lio/reactivex/internal/subscriptions/DeferredScalarSubscription;
|
|
.super Lio/reactivex/internal/subscriptions/BasicIntQueueSubscription;
|
|
.source "DeferredScalarSubscription.java"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"<T:",
|
|
"Ljava/lang/Object;",
|
|
">",
|
|
"Lio/reactivex/internal/subscriptions/BasicIntQueueSubscription<",
|
|
"TT;>;"
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field public static final CANCELLED:I = 0x4
|
|
|
|
.field public static final FUSED_CONSUMED:I = 0x20
|
|
|
|
.field public static final FUSED_EMPTY:I = 0x8
|
|
|
|
.field public static final FUSED_READY:I = 0x10
|
|
|
|
.field public static final HAS_REQUEST_HAS_VALUE:I = 0x3
|
|
|
|
.field public static final HAS_REQUEST_NO_VALUE:I = 0x2
|
|
|
|
.field public static final NO_REQUEST_HAS_VALUE:I = 0x1
|
|
|
|
.field public static final NO_REQUEST_NO_VALUE:I = 0x0
|
|
|
|
.field private static final serialVersionUID:J = -0x1ddae1b13717dd41L
|
|
|
|
|
|
# instance fields
|
|
.field public final downstream:Lok/d;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lok/d<",
|
|
"-TT;>;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public value:Ljava/lang/Object;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"TT;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Lok/d;)V
|
|
.locals 0
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Lok/d<",
|
|
"-TT;>;)V"
|
|
}
|
|
.end annotation
|
|
|
|
.line 1
|
|
invoke-direct {p0}, Lio/reactivex/internal/subscriptions/BasicIntQueueSubscription;-><init>()V
|
|
|
|
.line 2
|
|
iput-object p1, p0, Lio/reactivex/internal/subscriptions/DeferredScalarSubscription;->downstream:Lok/d;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public cancel()V
|
|
.locals 1
|
|
|
|
const/4 v0, 0x4
|
|
|
|
.line 1
|
|
invoke-virtual {p0, v0}, Ljava/util/concurrent/atomic/AtomicInteger;->set(I)V
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 2
|
|
iput-object v0, p0, Lio/reactivex/internal/subscriptions/DeferredScalarSubscription;->value:Ljava/lang/Object;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final clear()V
|
|
.locals 1
|
|
|
|
const/16 v0, 0x20
|
|
|
|
.line 1
|
|
invoke-virtual {p0, v0}, Ljava/util/concurrent/atomic/AtomicInteger;->lazySet(I)V
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 2
|
|
iput-object v0, p0, Lio/reactivex/internal/subscriptions/DeferredScalarSubscription;->value:Ljava/lang/Object;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final complete(Ljava/lang/Object;)V
|
|
.locals 3
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(TT;)V"
|
|
}
|
|
.end annotation
|
|
|
|
.line 1
|
|
invoke-virtual {p0}, Ljava/util/concurrent/atomic/AtomicInteger;->get()I
|
|
|
|
move-result v0
|
|
|
|
:cond_0
|
|
const/16 v1, 0x8
|
|
|
|
const/4 v2, 0x4
|
|
|
|
if-ne v0, v1, :cond_2
|
|
|
|
.line 2
|
|
iput-object p1, p0, Lio/reactivex/internal/subscriptions/DeferredScalarSubscription;->value:Ljava/lang/Object;
|
|
|
|
const/16 v0, 0x10
|
|
|
|
.line 3
|
|
invoke-virtual {p0, v0}, Ljava/util/concurrent/atomic/AtomicInteger;->lazySet(I)V
|
|
|
|
.line 4
|
|
iget-object v0, p0, Lio/reactivex/internal/subscriptions/DeferredScalarSubscription;->downstream:Lok/d;
|
|
|
|
.line 5
|
|
invoke-interface {v0, p1}, Lok/d;->onNext(Ljava/lang/Object;)V
|
|
|
|
.line 6
|
|
invoke-virtual {p0}, Ljava/util/concurrent/atomic/AtomicInteger;->get()I
|
|
|
|
move-result p1
|
|
|
|
if-eq p1, v2, :cond_1
|
|
|
|
.line 7
|
|
invoke-interface {v0}, Lok/d;->onComplete()V
|
|
|
|
:cond_1
|
|
return-void
|
|
|
|
:cond_2
|
|
and-int/lit8 v1, v0, -0x3
|
|
|
|
if-eqz v1, :cond_3
|
|
|
|
return-void
|
|
|
|
:cond_3
|
|
const/4 v1, 0x2
|
|
|
|
if-ne v0, v1, :cond_5
|
|
|
|
const/4 v0, 0x3
|
|
|
|
.line 8
|
|
invoke-virtual {p0, v0}, Ljava/util/concurrent/atomic/AtomicInteger;->lazySet(I)V
|
|
|
|
.line 9
|
|
iget-object v0, p0, Lio/reactivex/internal/subscriptions/DeferredScalarSubscription;->downstream:Lok/d;
|
|
|
|
.line 10
|
|
invoke-interface {v0, p1}, Lok/d;->onNext(Ljava/lang/Object;)V
|
|
|
|
.line 11
|
|
invoke-virtual {p0}, Ljava/util/concurrent/atomic/AtomicInteger;->get()I
|
|
|
|
move-result p1
|
|
|
|
if-eq p1, v2, :cond_4
|
|
|
|
.line 12
|
|
invoke-interface {v0}, Lok/d;->onComplete()V
|
|
|
|
:cond_4
|
|
return-void
|
|
|
|
.line 13
|
|
:cond_5
|
|
iput-object p1, p0, Lio/reactivex/internal/subscriptions/DeferredScalarSubscription;->value:Ljava/lang/Object;
|
|
|
|
const/4 v0, 0x0
|
|
|
|
const/4 v1, 0x1
|
|
|
|
.line 14
|
|
invoke-virtual {p0, v0, v1}, Ljava/util/concurrent/atomic/AtomicInteger;->compareAndSet(II)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_6
|
|
|
|
return-void
|
|
|
|
.line 15
|
|
:cond_6
|
|
invoke-virtual {p0}, Ljava/util/concurrent/atomic/AtomicInteger;->get()I
|
|
|
|
move-result v0
|
|
|
|
if-ne v0, v2, :cond_0
|
|
|
|
const/4 p1, 0x0
|
|
|
|
.line 16
|
|
iput-object p1, p0, Lio/reactivex/internal/subscriptions/DeferredScalarSubscription;->value:Ljava/lang/Object;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final isCancelled()Z
|
|
.locals 2
|
|
|
|
.line 1
|
|
invoke-virtual {p0}, Ljava/util/concurrent/atomic/AtomicInteger;->get()I
|
|
|
|
move-result v0
|
|
|
|
const/4 v1, 0x4
|
|
|
|
if-ne v0, v1, :cond_0
|
|
|
|
const/4 v0, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
:goto_0
|
|
return v0
|
|
.end method
|
|
|
|
.method public final isEmpty()Z
|
|
.locals 2
|
|
|
|
.line 1
|
|
invoke-virtual {p0}, Ljava/util/concurrent/atomic/AtomicInteger;->get()I
|
|
|
|
move-result v0
|
|
|
|
const/16 v1, 0x10
|
|
|
|
if-eq v0, v1, :cond_0
|
|
|
|
const/4 v0, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
:goto_0
|
|
return v0
|
|
.end method
|
|
|
|
.method public final poll()Ljava/lang/Object;
|
|
.locals 3
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()TT;"
|
|
}
|
|
.end annotation
|
|
|
|
.annotation build Lio/reactivex/annotations/Nullable;
|
|
.end annotation
|
|
|
|
.line 1
|
|
invoke-virtual {p0}, Ljava/util/concurrent/atomic/AtomicInteger;->get()I
|
|
|
|
move-result v0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
const/16 v2, 0x10
|
|
|
|
if-ne v0, v2, :cond_0
|
|
|
|
const/16 v0, 0x20
|
|
|
|
.line 2
|
|
invoke-virtual {p0, v0}, Ljava/util/concurrent/atomic/AtomicInteger;->lazySet(I)V
|
|
|
|
.line 3
|
|
iget-object v0, p0, Lio/reactivex/internal/subscriptions/DeferredScalarSubscription;->value:Ljava/lang/Object;
|
|
|
|
.line 4
|
|
iput-object v1, p0, Lio/reactivex/internal/subscriptions/DeferredScalarSubscription;->value:Ljava/lang/Object;
|
|
|
|
return-object v0
|
|
|
|
:cond_0
|
|
return-object v1
|
|
.end method
|
|
|
|
.method public final request(J)V
|
|
.locals 1
|
|
|
|
.line 1
|
|
invoke-static {p1, p2}, Lio/reactivex/internal/subscriptions/SubscriptionHelper;->validate(J)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_4
|
|
|
|
.line 2
|
|
:cond_0
|
|
invoke-virtual {p0}, Ljava/util/concurrent/atomic/AtomicInteger;->get()I
|
|
|
|
move-result p1
|
|
|
|
and-int/lit8 p2, p1, -0x2
|
|
|
|
if-eqz p2, :cond_1
|
|
|
|
return-void
|
|
|
|
:cond_1
|
|
const/4 p2, 0x1
|
|
|
|
if-ne p1, p2, :cond_3
|
|
|
|
const/4 p1, 0x3
|
|
|
|
.line 3
|
|
invoke-virtual {p0, p2, p1}, Ljava/util/concurrent/atomic/AtomicInteger;->compareAndSet(II)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
.line 4
|
|
iget-object p1, p0, Lio/reactivex/internal/subscriptions/DeferredScalarSubscription;->value:Ljava/lang/Object;
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
const/4 p2, 0x0
|
|
|
|
.line 5
|
|
iput-object p2, p0, Lio/reactivex/internal/subscriptions/DeferredScalarSubscription;->value:Ljava/lang/Object;
|
|
|
|
.line 6
|
|
iget-object p2, p0, Lio/reactivex/internal/subscriptions/DeferredScalarSubscription;->downstream:Lok/d;
|
|
|
|
.line 7
|
|
invoke-interface {p2, p1}, Lok/d;->onNext(Ljava/lang/Object;)V
|
|
|
|
.line 8
|
|
invoke-virtual {p0}, Ljava/util/concurrent/atomic/AtomicInteger;->get()I
|
|
|
|
move-result p1
|
|
|
|
const/4 v0, 0x4
|
|
|
|
if-eq p1, v0, :cond_2
|
|
|
|
.line 9
|
|
invoke-interface {p2}, Lok/d;->onComplete()V
|
|
|
|
:cond_2
|
|
return-void
|
|
|
|
:cond_3
|
|
const/4 p1, 0x0
|
|
|
|
const/4 p2, 0x2
|
|
|
|
.line 10
|
|
invoke-virtual {p0, p1, p2}, Ljava/util/concurrent/atomic/AtomicInteger;->compareAndSet(II)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
:cond_4
|
|
return-void
|
|
.end method
|
|
|
|
.method public final requestFusion(I)I
|
|
.locals 1
|
|
|
|
const/4 v0, 0x2
|
|
|
|
and-int/2addr p1, v0
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
const/16 p1, 0x8
|
|
|
|
.line 1
|
|
invoke-virtual {p0, p1}, Ljava/util/concurrent/atomic/AtomicInteger;->lazySet(I)V
|
|
|
|
return v0
|
|
|
|
:cond_0
|
|
const/4 p1, 0x0
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method public final tryCancel()Z
|
|
.locals 2
|
|
|
|
const/4 v0, 0x4
|
|
|
|
.line 1
|
|
invoke-virtual {p0, v0}, Ljava/util/concurrent/atomic/AtomicInteger;->getAndSet(I)I
|
|
|
|
move-result v1
|
|
|
|
if-eq v1, v0, :cond_0
|
|
|
|
const/4 v0, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
:goto_0
|
|
return v0
|
|
.end method
|