2020-11-12 02:11:44 +00:00
|
|
|
.class public abstract Lrx/Subscriber;
|
|
|
|
.super Ljava/lang/Object;
|
|
|
|
.source "Subscriber.java"
|
|
|
|
|
|
|
|
# interfaces
|
2020-11-21 22:11:07 +00:00
|
|
|
.implements Lh0/g;
|
2020-11-12 02:11:44 +00:00
|
|
|
.implements Lrx/Subscription;
|
|
|
|
|
|
|
|
|
|
|
|
# annotations
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"<T:",
|
|
|
|
"Ljava/lang/Object;",
|
|
|
|
">",
|
|
|
|
"Ljava/lang/Object;",
|
2020-11-21 22:11:07 +00:00
|
|
|
"Lh0/g<",
|
2020-11-12 02:11:44 +00:00
|
|
|
"TT;>;",
|
|
|
|
"Lrx/Subscription;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
|
|
|
|
# static fields
|
2020-11-21 22:11:07 +00:00
|
|
|
.field private static final NOT_SET:J = -0x8000000000000000L
|
2020-11-12 02:11:44 +00:00
|
|
|
|
|
|
|
|
|
|
|
# instance fields
|
2020-11-21 22:11:07 +00:00
|
|
|
.field private producer:Lrx/Producer;
|
2020-11-12 02:11:44 +00:00
|
|
|
|
2020-11-21 22:11:07 +00:00
|
|
|
.field private requested:J
|
2020-11-12 02:11:44 +00:00
|
|
|
|
2020-11-21 22:11:07 +00:00
|
|
|
.field private final subscriber:Lrx/Subscriber;
|
2020-11-12 02:11:44 +00:00
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"Lrx/Subscriber<",
|
|
|
|
"*>;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
2020-11-21 22:11:07 +00:00
|
|
|
.field private final subscriptions:Lrx/internal/util/SubscriptionList;
|
2020-11-12 02:11:44 +00:00
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
|
|
|
.method public constructor <init>()V
|
|
|
|
.locals 2
|
|
|
|
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
const/4 v1, 0x0
|
|
|
|
|
|
|
|
invoke-direct {p0, v0, v1}, Lrx/Subscriber;-><init>(Lrx/Subscriber;Z)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public constructor <init>(Lrx/Subscriber;)V
|
|
|
|
.locals 1
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(",
|
|
|
|
"Lrx/Subscriber<",
|
|
|
|
"*>;)V"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
const/4 v0, 0x1
|
|
|
|
|
|
|
|
invoke-direct {p0, p1, v0}, Lrx/Subscriber;-><init>(Lrx/Subscriber;Z)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public constructor <init>(Lrx/Subscriber;Z)V
|
|
|
|
.locals 2
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(",
|
|
|
|
"Lrx/Subscriber<",
|
|
|
|
"*>;Z)V"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
|
|
|
|
const-wide/high16 v0, -0x8000000000000000L
|
|
|
|
|
|
|
|
iput-wide v0, p0, Lrx/Subscriber;->requested:J
|
|
|
|
|
|
|
|
iput-object p1, p0, Lrx/Subscriber;->subscriber:Lrx/Subscriber;
|
|
|
|
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
|
|
|
|
iget-object p1, p1, Lrx/Subscriber;->subscriptions:Lrx/internal/util/SubscriptionList;
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
new-instance p1, Lrx/internal/util/SubscriptionList;
|
|
|
|
|
|
|
|
invoke-direct {p1}, Lrx/internal/util/SubscriptionList;-><init>()V
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
iput-object p1, p0, Lrx/Subscriber;->subscriptions:Lrx/internal/util/SubscriptionList;
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private addToRequested(J)V
|
|
|
|
.locals 5
|
|
|
|
|
|
|
|
iget-wide v0, p0, Lrx/Subscriber;->requested:J
|
|
|
|
|
|
|
|
const-wide/high16 v2, -0x8000000000000000L
|
|
|
|
|
|
|
|
cmp-long v4, v0, v2
|
|
|
|
|
|
|
|
if-nez v4, :cond_0
|
|
|
|
|
|
|
|
iput-wide p1, p0, Lrx/Subscriber;->requested:J
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
add-long/2addr v0, p1
|
|
|
|
|
|
|
|
const-wide/16 p1, 0x0
|
|
|
|
|
|
|
|
cmp-long v2, v0, p1
|
|
|
|
|
|
|
|
if-gez v2, :cond_1
|
|
|
|
|
|
|
|
const-wide p1, 0x7fffffffffffffffL
|
|
|
|
|
|
|
|
iput-wide p1, p0, Lrx/Subscriber;->requested:J
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
iput-wide v0, p0, Lrx/Subscriber;->requested:J
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
|
|
|
|
# virtual methods
|
|
|
|
.method public final add(Lrx/Subscription;)V
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
iget-object v0, p0, Lrx/Subscriber;->subscriptions:Lrx/internal/util/SubscriptionList;
|
|
|
|
|
|
|
|
invoke-virtual {v0, p1}, Lrx/internal/util/SubscriptionList;->a(Lrx/Subscription;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final isUnsubscribed()Z
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
iget-object v0, p0, Lrx/Subscriber;->subscriptions:Lrx/internal/util/SubscriptionList;
|
|
|
|
|
|
|
|
iget-boolean v0, v0, Lrx/internal/util/SubscriptionList;->e:Z
|
|
|
|
|
|
|
|
return v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public onStart()V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
monitor-enter p0
|
|
|
|
|
|
|
|
:try_start_0
|
|
|
|
iget-object v0, p0, Lrx/Subscriber;->producer:Lrx/Producer;
|
|
|
|
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
|
|
|
|
monitor-exit p0
|
|
|
|
:try_end_0
|
|
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
|
2020-11-21 22:11:07 +00:00
|
|
|
invoke-interface {v0, p1, p2}, Lrx/Producer;->l(J)V
|
2020-11-12 02:11:44 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
:try_start_1
|
|
|
|
invoke-direct {p0, p1, p2}, Lrx/Subscriber;->addToRequested(J)V
|
|
|
|
|
|
|
|
monitor-exit p0
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:catchall_0
|
|
|
|
move-exception p1
|
|
|
|
|
|
|
|
monitor-exit p0
|
|
|
|
:try_end_1
|
|
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
|
|
|
|
throw p1
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
new-instance v0, Ljava/lang/IllegalArgumentException;
|
|
|
|
|
|
|
|
const-string v1, "number requested cannot be negative: "
|
|
|
|
|
2020-11-21 22:11:07 +00:00
|
|
|
invoke-static {v1, p1, p2}, Lf/e/c/a/a;->o(Ljava/lang/String;J)Ljava/lang/String;
|
2020-11-12 02:11:44 +00:00
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-direct {v0, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
throw v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public setProducer(Lrx/Producer;)V
|
2020-11-21 22:11:07 +00:00
|
|
|
.locals 6
|
2020-11-12 02:11:44 +00:00
|
|
|
|
|
|
|
monitor-enter p0
|
|
|
|
|
|
|
|
:try_start_0
|
|
|
|
iget-wide v0, p0, Lrx/Subscriber;->requested:J
|
|
|
|
|
|
|
|
iput-object p1, p0, Lrx/Subscriber;->producer:Lrx/Producer;
|
|
|
|
|
2020-11-21 22:11:07 +00:00
|
|
|
iget-object v2, p0, Lrx/Subscriber;->subscriber:Lrx/Subscriber;
|
2020-11-12 02:11:44 +00:00
|
|
|
|
2020-11-21 22:11:07 +00:00
|
|
|
const-wide/high16 v3, -0x8000000000000000L
|
2020-11-12 02:11:44 +00:00
|
|
|
|
2020-11-21 22:11:07 +00:00
|
|
|
if-eqz v2, :cond_0
|
2020-11-12 02:11:44 +00:00
|
|
|
|
2020-11-21 22:11:07 +00:00
|
|
|
cmp-long v5, v0, v3
|
2020-11-12 02:11:44 +00:00
|
|
|
|
2020-11-21 22:11:07 +00:00
|
|
|
if-nez v5, :cond_0
|
2020-11-12 02:11:44 +00:00
|
|
|
|
2020-11-21 22:11:07 +00:00
|
|
|
const/4 v5, 0x1
|
2020-11-12 02:11:44 +00:00
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
2020-11-21 22:11:07 +00:00
|
|
|
const/4 v5, 0x0
|
2020-11-12 02:11:44 +00:00
|
|
|
|
|
|
|
:goto_0
|
|
|
|
monitor-exit p0
|
|
|
|
:try_end_0
|
|
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
|
2020-11-21 22:11:07 +00:00
|
|
|
if-eqz v5, :cond_1
|
2020-11-12 02:11:44 +00:00
|
|
|
|
2020-11-21 22:11:07 +00:00
|
|
|
invoke-virtual {v2, p1}, Lrx/Subscriber;->setProducer(Lrx/Producer;)V
|
2020-11-12 02:11:44 +00:00
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:cond_1
|
2020-11-21 22:11:07 +00:00
|
|
|
cmp-long v2, v0, v3
|
2020-11-12 02:11:44 +00:00
|
|
|
|
2020-11-21 22:11:07 +00:00
|
|
|
if-nez v2, :cond_2
|
2020-11-12 02:11:44 +00:00
|
|
|
|
|
|
|
const-wide v0, 0x7fffffffffffffffL
|
|
|
|
|
2020-11-21 22:11:07 +00:00
|
|
|
invoke-interface {p1, v0, v1}, Lrx/Producer;->l(J)V
|
2020-11-12 02:11:44 +00:00
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:cond_2
|
2020-11-21 22:11:07 +00:00
|
|
|
invoke-interface {p1, v0, v1}, Lrx/Producer;->l(J)V
|
2020-11-12 02:11:44 +00:00
|
|
|
|
|
|
|
:goto_1
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:catchall_0
|
|
|
|
move-exception p1
|
|
|
|
|
|
|
|
:try_start_1
|
|
|
|
monitor-exit p0
|
|
|
|
:try_end_1
|
|
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
|
|
|
|
throw p1
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final unsubscribe()V
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
iget-object v0, p0, Lrx/Subscriber;->subscriptions:Lrx/internal/util/SubscriptionList;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lrx/internal/util/SubscriptionList;->unsubscribe()V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|