224 lines
5.1 KiB
Smali
224 lines
5.1 KiB
Smali
|
.class final Lrx/internal/util/k$c;
|
||
|
.super Ljava/util/concurrent/atomic/AtomicBoolean;
|
||
|
|
||
|
# interfaces
|
||
|
.implements Lrx/Producer;
|
||
|
.implements Lrx/functions/Action0;
|
||
|
|
||
|
|
||
|
# annotations
|
||
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
||
|
value = Lrx/internal/util/k;
|
||
|
.end annotation
|
||
|
|
||
|
.annotation system Ldalvik/annotation/InnerClass;
|
||
|
accessFlags = 0x18
|
||
|
name = "c"
|
||
|
.end annotation
|
||
|
|
||
|
.annotation system Ldalvik/annotation/Signature;
|
||
|
value = {
|
||
|
"<T:",
|
||
|
"Ljava/lang/Object;",
|
||
|
">",
|
||
|
"Ljava/util/concurrent/atomic/AtomicBoolean;",
|
||
|
"Lrx/Producer;",
|
||
|
"Lrx/functions/Action0;"
|
||
|
}
|
||
|
.end annotation
|
||
|
|
||
|
|
||
|
# static fields
|
||
|
.field private static final serialVersionUID:J = -0x223a1f24fb024573L
|
||
|
|
||
|
|
||
|
# instance fields
|
||
|
.field final actual:Lrx/Subscriber;
|
||
|
.annotation system Ldalvik/annotation/Signature;
|
||
|
value = {
|
||
|
"Lrx/Subscriber<",
|
||
|
"-TT;>;"
|
||
|
}
|
||
|
.end annotation
|
||
|
.end field
|
||
|
|
||
|
.field final onSchedule:Lrx/functions/b;
|
||
|
.annotation system Ldalvik/annotation/Signature;
|
||
|
value = {
|
||
|
"Lrx/functions/b<",
|
||
|
"Lrx/functions/Action0;",
|
||
|
"Lrx/Subscription;",
|
||
|
">;"
|
||
|
}
|
||
|
.end annotation
|
||
|
.end field
|
||
|
|
||
|
.field final value:Ljava/lang/Object;
|
||
|
.annotation system Ldalvik/annotation/Signature;
|
||
|
value = {
|
||
|
"TT;"
|
||
|
}
|
||
|
.end annotation
|
||
|
.end field
|
||
|
|
||
|
|
||
|
# direct methods
|
||
|
.method public constructor <init>(Lrx/Subscriber;Ljava/lang/Object;Lrx/functions/b;)V
|
||
|
.locals 0
|
||
|
.annotation system Ldalvik/annotation/Signature;
|
||
|
value = {
|
||
|
"(",
|
||
|
"Lrx/Subscriber<",
|
||
|
"-TT;>;TT;",
|
||
|
"Lrx/functions/b<",
|
||
|
"Lrx/functions/Action0;",
|
||
|
"Lrx/Subscription;",
|
||
|
">;)V"
|
||
|
}
|
||
|
.end annotation
|
||
|
|
||
|
invoke-direct {p0}, Ljava/util/concurrent/atomic/AtomicBoolean;-><init>()V
|
||
|
|
||
|
iput-object p1, p0, Lrx/internal/util/k$c;->actual:Lrx/Subscriber;
|
||
|
|
||
|
iput-object p2, p0, Lrx/internal/util/k$c;->value:Ljava/lang/Object;
|
||
|
|
||
|
iput-object p3, p0, Lrx/internal/util/k$c;->onSchedule:Lrx/functions/b;
|
||
|
|
||
|
return-void
|
||
|
.end method
|
||
|
|
||
|
|
||
|
# virtual methods
|
||
|
.method public final call()V
|
||
|
.locals 3
|
||
|
|
||
|
iget-object v0, p0, Lrx/internal/util/k$c;->actual:Lrx/Subscriber;
|
||
|
|
||
|
invoke-virtual {v0}, Lrx/Subscriber;->isUnsubscribed()Z
|
||
|
|
||
|
move-result v1
|
||
|
|
||
|
if-eqz v1, :cond_0
|
||
|
|
||
|
return-void
|
||
|
|
||
|
:cond_0
|
||
|
iget-object v1, p0, Lrx/internal/util/k$c;->value:Ljava/lang/Object;
|
||
|
|
||
|
:try_start_0
|
||
|
invoke-virtual {v0, v1}, Lrx/Subscriber;->onNext(Ljava/lang/Object;)V
|
||
|
:try_end_0
|
||
|
.catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_0} :catch_0
|
||
|
|
||
|
invoke-virtual {v0}, Lrx/Subscriber;->isUnsubscribed()Z
|
||
|
|
||
|
move-result v1
|
||
|
|
||
|
if-eqz v1, :cond_1
|
||
|
|
||
|
return-void
|
||
|
|
||
|
:cond_1
|
||
|
invoke-virtual {v0}, Lrx/Subscriber;->onCompleted()V
|
||
|
|
||
|
return-void
|
||
|
|
||
|
:catch_0
|
||
|
move-exception v2
|
||
|
|
||
|
invoke-static {v2, v0, v1}, Lrx/a/b;->a(Ljava/lang/Throwable;Lrx/e;Ljava/lang/Object;)V
|
||
|
|
||
|
return-void
|
||
|
.end method
|
||
|
|
||
|
.method public final request(J)V
|
||
|
.locals 3
|
||
|
|
||
|
const-wide/16 v0, 0x0
|
||
|
|
||
|
cmp-long v2, p1, v0
|
||
|
|
||
|
if-ltz v2, :cond_1
|
||
|
|
||
|
cmp-long v2, p1, v0
|
||
|
|
||
|
if-eqz v2, :cond_0
|
||
|
|
||
|
const/4 p1, 0x0
|
||
|
|
||
|
const/4 p2, 0x1
|
||
|
|
||
|
invoke-virtual {p0, p1, p2}, Lrx/internal/util/k$c;->compareAndSet(ZZ)Z
|
||
|
|
||
|
move-result p1
|
||
|
|
||
|
if-eqz p1, :cond_0
|
||
|
|
||
|
iget-object p1, p0, Lrx/internal/util/k$c;->actual:Lrx/Subscriber;
|
||
|
|
||
|
iget-object p2, p0, Lrx/internal/util/k$c;->onSchedule:Lrx/functions/b;
|
||
|
|
||
|
invoke-interface {p2, p0}, Lrx/functions/b;->call(Ljava/lang/Object;)Ljava/lang/Object;
|
||
|
|
||
|
move-result-object p2
|
||
|
|
||
|
check-cast p2, Lrx/Subscription;
|
||
|
|
||
|
invoke-virtual {p1, p2}, Lrx/Subscriber;->add(Lrx/Subscription;)V
|
||
|
|
||
|
:cond_0
|
||
|
return-void
|
||
|
|
||
|
:cond_1
|
||
|
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
|
||
|
|
||
|
.method public final toString()Ljava/lang/String;
|
||
|
.locals 2
|
||
|
|
||
|
new-instance v0, Ljava/lang/StringBuilder;
|
||
|
|
||
|
const-string v1, "ScalarAsyncProducer["
|
||
|
|
||
|
invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
|
||
|
|
||
|
iget-object v1, p0, Lrx/internal/util/k$c;->value:Ljava/lang/Object;
|
||
|
|
||
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
||
|
|
||
|
const-string v1, ", "
|
||
|
|
||
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
||
|
|
||
|
invoke-virtual {p0}, Lrx/internal/util/k$c;->get()Z
|
||
|
|
||
|
move-result v1
|
||
|
|
||
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;
|
||
|
|
||
|
const-string v1, "]"
|
||
|
|
||
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
||
|
|
||
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
return-object v0
|
||
|
.end method
|