268 lines
4.9 KiB
Smali
268 lines
4.9 KiB
Smali
.class final Lrx/internal/a/o$a;
|
|
.super Ljava/util/concurrent/atomic/AtomicLong;
|
|
|
|
# interfaces
|
|
.implements Lrx/Producer;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
value = Lrx/internal/a/o;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x18
|
|
name = "a"
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"<T:",
|
|
"Ljava/lang/Object;",
|
|
">",
|
|
"Ljava/util/concurrent/atomic/AtomicLong;",
|
|
"Lrx/Producer;"
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field private static final serialVersionUID:J = 0x310c1171070674b3L
|
|
|
|
|
|
# instance fields
|
|
.field final array:[Ljava/lang/Object;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"[TT;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field final child:Lrx/Subscriber;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lrx/Subscriber<",
|
|
"-TT;>;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field index:I
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Lrx/Subscriber;[Ljava/lang/Object;)V
|
|
.locals 0
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Lrx/Subscriber<",
|
|
"-TT;>;[TT;)V"
|
|
}
|
|
.end annotation
|
|
|
|
invoke-direct {p0}, Ljava/util/concurrent/atomic/AtomicLong;-><init>()V
|
|
|
|
iput-object p1, p0, Lrx/internal/a/o$a;->child:Lrx/Subscriber;
|
|
|
|
iput-object p2, p0, Lrx/internal/a/o$a;->array:[Ljava/lang/Object;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private KY()V
|
|
.locals 6
|
|
|
|
iget-object v0, p0, Lrx/internal/a/o$a;->child:Lrx/Subscriber;
|
|
|
|
iget-object v1, p0, Lrx/internal/a/o$a;->array:[Ljava/lang/Object;
|
|
|
|
array-length v2, v1
|
|
|
|
const/4 v3, 0x0
|
|
|
|
:goto_0
|
|
if-ge v3, v2, :cond_1
|
|
|
|
aget-object v4, v1, v3
|
|
|
|
invoke-virtual {v0}, Lrx/Subscriber;->isUnsubscribed()Z
|
|
|
|
move-result v5
|
|
|
|
if-eqz v5, :cond_0
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
invoke-virtual {v0, v4}, Lrx/Subscriber;->onNext(Ljava/lang/Object;)V
|
|
|
|
add-int/lit8 v3, v3, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
invoke-virtual {v0}, Lrx/Subscriber;->isUnsubscribed()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_2
|
|
|
|
return-void
|
|
|
|
:cond_2
|
|
invoke-virtual {v0}, Lrx/Subscriber;->onCompleted()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private bo(J)V
|
|
.locals 10
|
|
|
|
iget-object v0, p0, Lrx/internal/a/o$a;->child:Lrx/Subscriber;
|
|
|
|
iget-object v1, p0, Lrx/internal/a/o$a;->array:[Ljava/lang/Object;
|
|
|
|
array-length v2, v1
|
|
|
|
iget v3, p0, Lrx/internal/a/o$a;->index:I
|
|
|
|
const-wide/16 v4, 0x0
|
|
|
|
:cond_0
|
|
move-wide v6, v4
|
|
|
|
:cond_1
|
|
:goto_0
|
|
cmp-long v8, p1, v4
|
|
|
|
if-eqz v8, :cond_5
|
|
|
|
if-eq v3, v2, :cond_5
|
|
|
|
invoke-virtual {v0}, Lrx/Subscriber;->isUnsubscribed()Z
|
|
|
|
move-result v8
|
|
|
|
if-eqz v8, :cond_2
|
|
|
|
return-void
|
|
|
|
:cond_2
|
|
aget-object v8, v1, v3
|
|
|
|
invoke-virtual {v0, v8}, Lrx/Subscriber;->onNext(Ljava/lang/Object;)V
|
|
|
|
add-int/lit8 v3, v3, 0x1
|
|
|
|
if-ne v3, v2, :cond_4
|
|
|
|
invoke-virtual {v0}, Lrx/Subscriber;->isUnsubscribed()Z
|
|
|
|
move-result p1
|
|
|
|
if-nez p1, :cond_3
|
|
|
|
invoke-virtual {v0}, Lrx/Subscriber;->onCompleted()V
|
|
|
|
:cond_3
|
|
return-void
|
|
|
|
:cond_4
|
|
const-wide/16 v8, 0x1
|
|
|
|
sub-long/2addr p1, v8
|
|
|
|
sub-long/2addr v6, v8
|
|
|
|
goto :goto_0
|
|
|
|
:cond_5
|
|
invoke-virtual {p0}, Lrx/internal/a/o$a;->get()J
|
|
|
|
move-result-wide p1
|
|
|
|
add-long/2addr p1, v6
|
|
|
|
cmp-long v8, p1, v4
|
|
|
|
if-nez v8, :cond_1
|
|
|
|
iput v3, p0, Lrx/internal/a/o$a;->index:I
|
|
|
|
invoke-virtual {p0, v6, v7}, Lrx/internal/a/o$a;->addAndGet(J)J
|
|
|
|
move-result-wide p1
|
|
|
|
cmp-long v6, p1, v4
|
|
|
|
if-nez v6, :cond_0
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final request(J)V
|
|
.locals 5
|
|
|
|
const-wide/16 v0, 0x0
|
|
|
|
cmp-long v2, p1, v0
|
|
|
|
if-ltz v2, :cond_2
|
|
|
|
const-wide v2, 0x7fffffffffffffffL
|
|
|
|
cmp-long v4, p1, v2
|
|
|
|
if-nez v4, :cond_0
|
|
|
|
invoke-static {p0, p1, p2}, Lrx/internal/a/a;->a(Ljava/util/concurrent/atomic/AtomicLong;J)J
|
|
|
|
move-result-wide p1
|
|
|
|
cmp-long v2, p1, v0
|
|
|
|
if-nez v2, :cond_1
|
|
|
|
invoke-direct {p0}, Lrx/internal/a/o$a;->KY()V
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
cmp-long v2, p1, v0
|
|
|
|
if-eqz v2, :cond_1
|
|
|
|
invoke-static {p0, p1, p2}, Lrx/internal/a/a;->a(Ljava/util/concurrent/atomic/AtomicLong;J)J
|
|
|
|
move-result-wide v2
|
|
|
|
cmp-long v4, v2, v0
|
|
|
|
if-nez v4, :cond_1
|
|
|
|
invoke-direct {p0, p1, p2}, Lrx/internal/a/o$a;->bo(J)V
|
|
|
|
:cond_1
|
|
return-void
|
|
|
|
:cond_2
|
|
new-instance v0, Ljava/lang/IllegalArgumentException;
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/String;->valueOf(J)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
const-string p2, "n >= 0 required but it was "
|
|
|
|
invoke-virtual {p2, p1}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-direct {v0, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|