apkfuckery/com.discord/smali_classes2/rx/subjects/PublishSubject$a.smali

262 lines
5.4 KiB
Smali
Raw Normal View History

2019-12-06 03:29:40 +00:00
.class public final Lrx/subjects/PublishSubject$a;
2019-07-24 11:27:29 +00:00
.super Ljava/util/concurrent/atomic/AtomicLong;
.source "PublishSubject.java"
# interfaces
.implements Lrx/Producer;
.implements Lrx/Subscription;
2020-05-11 18:18:42 +00:00
.implements Lf0/g;
2019-07-24 11:27:29 +00:00
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lrx/subjects/PublishSubject;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
2019-12-06 03:29:40 +00:00
accessFlags = 0x19
2019-07-24 11:27:29 +00:00
name = "a"
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">",
"Ljava/util/concurrent/atomic/AtomicLong;",
"Lrx/Producer;",
"Lrx/Subscription;",
2020-05-11 18:18:42 +00:00
"Lf0/g<",
2019-07-24 11:27:29 +00:00
"TT;>;"
}
.end annotation
# static fields
2019-12-06 03:29:40 +00:00
.field public static final serialVersionUID:J = 0x59896c1df8e78b00L
2019-07-24 11:27:29 +00:00
# instance fields
2019-12-06 03:29:40 +00:00
.field public final actual:Lrx/Subscriber;
2019-07-24 11:27:29 +00:00
.annotation system Ldalvik/annotation/Signature;
value = {
"Lrx/Subscriber<",
"-TT;>;"
}
.end annotation
.end field
2019-12-06 03:29:40 +00:00
.field public final parent:Lrx/subjects/PublishSubject$b;
2019-07-24 11:27:29 +00:00
.annotation system Ldalvik/annotation/Signature;
value = {
"Lrx/subjects/PublishSubject$b<",
"TT;>;"
}
.end annotation
.end field
2019-12-06 03:29:40 +00:00
.field public produced:J
2019-07-24 11:27:29 +00:00
# direct methods
.method public constructor <init>(Lrx/subjects/PublishSubject$b;Lrx/Subscriber;)V
.locals 0
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lrx/subjects/PublishSubject$b<",
"TT;>;",
"Lrx/Subscriber<",
"-TT;>;)V"
}
.end annotation
invoke-direct {p0}, Ljava/util/concurrent/atomic/AtomicLong;-><init>()V
iput-object p1, p0, Lrx/subjects/PublishSubject$a;->parent:Lrx/subjects/PublishSubject$b;
iput-object p2, p0, Lrx/subjects/PublishSubject$a;->actual:Lrx/Subscriber;
return-void
.end method
# virtual methods
2019-12-06 03:29:40 +00:00
.method public a(J)V
2019-07-24 11:27:29 +00:00
.locals 5
2020-05-11 18:18:42 +00:00
invoke-static {p1, p2}, Le/o/a/j/a;->a(J)Z
2019-12-06 03:29:40 +00:00
move-result v0
if-eqz v0, :cond_2
:cond_0
invoke-virtual {p0}, Ljava/util/concurrent/atomic/AtomicLong;->get()J
move-result-wide v0
const-wide/high16 v2, -0x8000000000000000L
cmp-long v4, v0, v2
if-nez v4, :cond_1
return-void
:cond_1
2020-05-11 18:18:42 +00:00
invoke-static {v0, v1, p1, p2}, Le/o/a/j/a;->a(JJ)J
2019-12-06 03:29:40 +00:00
move-result-wide v2
invoke-virtual {p0, v0, v1, v2, v3}, Ljava/util/concurrent/atomic/AtomicLong;->compareAndSet(JJ)Z
move-result v0
if-eqz v0, :cond_0
:cond_2
return-void
.end method
.method public isUnsubscribed()Z
.locals 5
invoke-virtual {p0}, Ljava/util/concurrent/atomic/AtomicLong;->get()J
2019-07-24 11:27:29 +00:00
move-result-wide v0
const-wide/high16 v2, -0x8000000000000000L
cmp-long v4, v0, v2
if-nez v4, :cond_0
const/4 v0, 0x1
2019-12-06 03:29:40 +00:00
goto :goto_0
2019-07-24 11:27:29 +00:00
:cond_0
const/4 v0, 0x0
2019-12-06 03:29:40 +00:00
:goto_0
2019-07-24 11:27:29 +00:00
return v0
.end method
2019-12-06 03:29:40 +00:00
.method public onCompleted()V
2019-07-24 11:27:29 +00:00
.locals 5
2019-12-06 03:29:40 +00:00
invoke-virtual {p0}, Ljava/util/concurrent/atomic/AtomicLong;->get()J
2019-07-24 11:27:29 +00:00
move-result-wide v0
const-wide/high16 v2, -0x8000000000000000L
cmp-long v4, v0, v2
if-eqz v4, :cond_0
iget-object v0, p0, Lrx/subjects/PublishSubject$a;->actual:Lrx/Subscriber;
2020-05-11 18:18:42 +00:00
invoke-interface {v0}, Lf0/g;->onCompleted()V
2019-07-24 11:27:29 +00:00
:cond_0
return-void
.end method
2019-12-06 03:29:40 +00:00
.method public onError(Ljava/lang/Throwable;)V
2019-07-24 11:27:29 +00:00
.locals 5
2019-12-06 03:29:40 +00:00
invoke-virtual {p0}, Ljava/util/concurrent/atomic/AtomicLong;->get()J
2019-07-24 11:27:29 +00:00
move-result-wide v0
const-wide/high16 v2, -0x8000000000000000L
cmp-long v4, v0, v2
if-eqz v4, :cond_0
iget-object v0, p0, Lrx/subjects/PublishSubject$a;->actual:Lrx/Subscriber;
2020-05-11 18:18:42 +00:00
invoke-interface {v0, p1}, Lf0/g;->onError(Ljava/lang/Throwable;)V
2019-07-24 11:27:29 +00:00
:cond_0
return-void
.end method
2019-12-06 03:29:40 +00:00
.method public onNext(Ljava/lang/Object;)V
2019-07-24 11:27:29 +00:00
.locals 5
.annotation system Ldalvik/annotation/Signature;
value = {
"(TT;)V"
}
.end annotation
2019-12-06 03:29:40 +00:00
invoke-virtual {p0}, Ljava/util/concurrent/atomic/AtomicLong;->get()J
2019-07-24 11:27:29 +00:00
move-result-wide v0
const-wide/high16 v2, -0x8000000000000000L
cmp-long v4, v0, v2
if-eqz v4, :cond_1
iget-wide v2, p0, Lrx/subjects/PublishSubject$a;->produced:J
cmp-long v4, v0, v2
if-eqz v4, :cond_0
const-wide/16 v0, 0x1
add-long/2addr v2, v0
iput-wide v2, p0, Lrx/subjects/PublishSubject$a;->produced:J
iget-object v0, p0, Lrx/subjects/PublishSubject$a;->actual:Lrx/Subscriber;
2020-05-11 18:18:42 +00:00
invoke-interface {v0, p1}, Lf0/g;->onNext(Ljava/lang/Object;)V
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
goto :goto_0
2019-07-24 11:27:29 +00:00
:cond_0
invoke-virtual {p0}, Lrx/subjects/PublishSubject$a;->unsubscribe()V
iget-object p1, p0, Lrx/subjects/PublishSubject$a;->actual:Lrx/Subscriber;
2020-05-11 18:18:42 +00:00
new-instance v0, Lf0/k/b;
2019-07-24 11:27:29 +00:00
const-string v1, "PublishSubject: could not emit value due to lack of requests"
2020-05-11 18:18:42 +00:00
invoke-direct {v0, v1}, Lf0/k/b;-><init>(Ljava/lang/String;)V
2019-07-24 11:27:29 +00:00
2020-05-11 18:18:42 +00:00
invoke-interface {p1, v0}, Lf0/g;->onError(Ljava/lang/Throwable;)V
2019-07-24 11:27:29 +00:00
:cond_1
2019-12-06 03:29:40 +00:00
:goto_0
2019-07-24 11:27:29 +00:00
return-void
.end method
2019-12-06 03:29:40 +00:00
.method public unsubscribe()V
2019-07-24 11:27:29 +00:00
.locals 5
const-wide/high16 v0, -0x8000000000000000L
2019-12-06 03:29:40 +00:00
invoke-virtual {p0, v0, v1}, Ljava/util/concurrent/atomic/AtomicLong;->getAndSet(J)J
2019-07-24 11:27:29 +00:00
move-result-wide v2
cmp-long v4, v2, v0
if-eqz v4, :cond_0
iget-object v0, p0, Lrx/subjects/PublishSubject$a;->parent:Lrx/subjects/PublishSubject$b;
2019-12-06 03:29:40 +00:00
invoke-virtual {v0, p0}, Lrx/subjects/PublishSubject$b;->b(Lrx/subjects/PublishSubject$a;)V
2019-07-24 11:27:29 +00:00
:cond_0
return-void
.end method