apkfuckery/com.discord/smali_classes2/rx/Subscriber.smali

321 lines
6.3 KiB
Smali
Raw Normal View History

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