apkfuckery/com.discord/smali_classes2/r0/s/a/b.smali

490 lines
9.7 KiB
Smali

.class public final Lr0/s/a/b;
.super Ljava/util/concurrent/atomic/AtomicInteger;
.source "CallArbiter.java"
# interfaces
.implements Lrx/Subscription;
.implements Lrx/Producer;
# annotations
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">",
"Ljava/util/concurrent/atomic/AtomicInteger;",
"Lrx/Subscription;",
"Lrx/Producer;"
}
.end annotation
# instance fields
.field public final call:Lr0/b;
.annotation system Ldalvik/annotation/Signature;
value = {
"Lr0/b<",
"TT;>;"
}
.end annotation
.end field
.field public volatile response:Lr0/n;
.annotation system Ldalvik/annotation/Signature;
value = {
"Lr0/n<",
"TT;>;"
}
.end annotation
.end field
.field public final subscriber:Lrx/Subscriber;
.annotation system Ldalvik/annotation/Signature;
value = {
"Lrx/Subscriber<",
"-",
"Lr0/n<",
"TT;>;>;"
}
.end annotation
.end field
# direct methods
.method public constructor <init>(Lr0/b;Lrx/Subscriber;)V
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lr0/b<",
"TT;>;",
"Lrx/Subscriber<",
"-",
"Lr0/n<",
"TT;>;>;)V"
}
.end annotation
const/4 v0, 0x0
invoke-direct {p0, v0}, Ljava/util/concurrent/atomic/AtomicInteger;-><init>(I)V
iput-object p1, p0, Lr0/s/a/b;->call:Lr0/b;
iput-object p2, p0, Lr0/s/a/b;->subscriber:Lrx/Subscriber;
return-void
.end method
# virtual methods
.method public final a(Lr0/n;)V
.locals 5
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lr0/n<",
"TT;>;)V"
}
.end annotation
const/4 v0, 0x0
:try_start_0
invoke-virtual {p0}, Lr0/s/a/b;->isUnsubscribed()Z
move-result v1
if-nez v1, :cond_0
iget-object v1, p0, Lr0/s/a/b;->subscriber:Lrx/Subscriber;
invoke-interface {v1, p1}, Ls0/g;->onNext(Ljava/lang/Object;)V
:try_end_0
.catch Lrx/exceptions/OnCompletedFailedException; {:try_start_0 .. :try_end_0} :catch_2
.catch Lrx/exceptions/OnErrorFailedException; {:try_start_0 .. :try_end_0} :catch_2
.catch Lrx/exceptions/OnErrorNotImplementedException; {:try_start_0 .. :try_end_0} :catch_2
.catchall {:try_start_0 .. :try_end_0} :catchall_1
:cond_0
:try_start_1
invoke-virtual {p0}, Lr0/s/a/b;->isUnsubscribed()Z
move-result p1
if-nez p1, :cond_2
iget-object p1, p0, Lr0/s/a/b;->subscriber:Lrx/Subscriber;
invoke-interface {p1}, Ls0/g;->onCompleted()V
:try_end_1
.catch Lrx/exceptions/OnCompletedFailedException; {:try_start_1 .. :try_end_1} :catch_0
.catch Lrx/exceptions/OnErrorFailedException; {:try_start_1 .. :try_end_1} :catch_0
.catch Lrx/exceptions/OnErrorNotImplementedException; {:try_start_1 .. :try_end_1} :catch_0
.catchall {:try_start_1 .. :try_end_1} :catchall_0
goto :goto_0
:catchall_0
move-exception p1
invoke-static {p1}, Lf/n/a/k/a;->g0(Ljava/lang/Throwable;)V
sget-object p1, Ls0/o/o;->f:Ls0/o/o;
invoke-virtual {p1}, Ls0/o/o;->b()Ls0/o/b;
move-result-object p1
if-eqz p1, :cond_1
goto :goto_0
:cond_1
throw v0
:catch_0
sget-object p1, Ls0/o/o;->f:Ls0/o/o;
invoke-virtual {p1}, Ls0/o/o;->b()Ls0/o/b;
move-result-object p1
if-eqz p1, :cond_3
:cond_2
:goto_0
return-void
:cond_3
throw v0
:catchall_1
move-exception p1
invoke-static {p1}, Lf/n/a/k/a;->g0(Ljava/lang/Throwable;)V
:try_start_2
iget-object v1, p0, Lr0/s/a/b;->subscriber:Lrx/Subscriber;
invoke-interface {v1, p1}, Ls0/g;->onError(Ljava/lang/Throwable;)V
:try_end_2
.catch Lrx/exceptions/OnCompletedFailedException; {:try_start_2 .. :try_end_2} :catch_1
.catch Lrx/exceptions/OnErrorFailedException; {:try_start_2 .. :try_end_2} :catch_1
.catch Lrx/exceptions/OnErrorNotImplementedException; {:try_start_2 .. :try_end_2} :catch_1
.catchall {:try_start_2 .. :try_end_2} :catchall_2
goto :goto_1
:catchall_2
move-exception v1
invoke-static {v1}, Lf/n/a/k/a;->g0(Ljava/lang/Throwable;)V
new-instance v2, Lrx/exceptions/CompositeException;
const/4 v3, 0x2
new-array v3, v3, [Ljava/lang/Throwable;
const/4 v4, 0x0
aput-object p1, v3, v4
const/4 p1, 0x1
aput-object v1, v3, p1
invoke-direct {v2, v3}, Lrx/exceptions/CompositeException;-><init>([Ljava/lang/Throwable;)V
sget-object p1, Ls0/o/o;->f:Ls0/o/o;
invoke-virtual {p1}, Ls0/o/o;->b()Ls0/o/b;
move-result-object p1
if-eqz p1, :cond_4
goto :goto_1
:cond_4
throw v0
:catch_1
sget-object p1, Ls0/o/o;->f:Ls0/o/o;
invoke-virtual {p1}, Ls0/o/o;->b()Ls0/o/b;
move-result-object p1
if-eqz p1, :cond_5
:goto_1
return-void
:cond_5
throw v0
:catch_2
sget-object p1, Ls0/o/o;->f:Ls0/o/o;
invoke-virtual {p1}, Ls0/o/o;->b()Ls0/o/b;
move-result-object p1
if-eqz p1, :cond_6
return-void
:cond_6
throw v0
.end method
.method public b(Ljava/lang/Throwable;)V
.locals 5
const/4 v0, 0x3
invoke-virtual {p0, v0}, Ljava/util/concurrent/atomic/AtomicInteger;->set(I)V
invoke-virtual {p0}, Lr0/s/a/b;->isUnsubscribed()Z
move-result v0
if-nez v0, :cond_2
const/4 v0, 0x0
:try_start_0
iget-object v1, p0, Lr0/s/a/b;->subscriber:Lrx/Subscriber;
invoke-interface {v1, p1}, Ls0/g;->onError(Ljava/lang/Throwable;)V
:try_end_0
.catch Lrx/exceptions/OnCompletedFailedException; {:try_start_0 .. :try_end_0} :catch_0
.catch Lrx/exceptions/OnErrorFailedException; {:try_start_0 .. :try_end_0} :catch_0
.catch Lrx/exceptions/OnErrorNotImplementedException; {:try_start_0 .. :try_end_0} :catch_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
goto :goto_0
:catchall_0
move-exception v1
invoke-static {v1}, Lf/n/a/k/a;->g0(Ljava/lang/Throwable;)V
new-instance v2, Lrx/exceptions/CompositeException;
const/4 v3, 0x2
new-array v3, v3, [Ljava/lang/Throwable;
const/4 v4, 0x0
aput-object p1, v3, v4
const/4 p1, 0x1
aput-object v1, v3, p1
invoke-direct {v2, v3}, Lrx/exceptions/CompositeException;-><init>([Ljava/lang/Throwable;)V
sget-object p1, Ls0/o/o;->f:Ls0/o/o;
invoke-virtual {p1}, Ls0/o/o;->b()Ls0/o/b;
move-result-object p1
if-eqz p1, :cond_0
goto :goto_0
:cond_0
throw v0
:catch_0
sget-object p1, Ls0/o/o;->f:Ls0/o/o;
invoke-virtual {p1}, Ls0/o/o;->b()Ls0/o/b;
move-result-object p1
if-eqz p1, :cond_1
goto :goto_0
:cond_1
throw v0
:cond_2
:goto_0
return-void
.end method
.method public c(Lr0/n;)V
.locals 4
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lr0/n<",
"TT;>;)V"
}
.end annotation
:cond_0
invoke-virtual {p0}, Ljava/util/concurrent/atomic/AtomicInteger;->get()I
move-result v0
const/4 v1, 0x2
if-eqz v0, :cond_3
const/4 v2, 0x3
const/4 v3, 0x1
if-eq v0, v3, :cond_2
if-eq v0, v1, :cond_1
if-eq v0, v2, :cond_1
new-instance p1, Ljava/lang/IllegalStateException;
const-string v1, "Unknown state: "
invoke-static {v1, v0}, Lf/e/b/a/a;->h(Ljava/lang/String;I)Ljava/lang/String;
move-result-object v0
invoke-direct {p1, v0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw p1
:cond_1
new-instance p1, Ljava/lang/AssertionError;
invoke-direct {p1}, Ljava/lang/AssertionError;-><init>()V
throw p1
:cond_2
invoke-virtual {p0, v3, v2}, Ljava/util/concurrent/atomic/AtomicInteger;->compareAndSet(II)Z
move-result v0
if-eqz v0, :cond_0
invoke-virtual {p0, p1}, Lr0/s/a/b;->a(Lr0/n;)V
return-void
:cond_3
iput-object p1, p0, Lr0/s/a/b;->response:Lr0/n;
const/4 v0, 0x0
invoke-virtual {p0, v0, v1}, Ljava/util/concurrent/atomic/AtomicInteger;->compareAndSet(II)Z
move-result v0
if-eqz v0, :cond_0
return-void
.end method
.method public isUnsubscribed()Z
.locals 1
iget-object v0, p0, Lr0/s/a/b;->call:Lr0/b;
invoke-interface {v0}, Lr0/b;->k()Z
move-result v0
return v0
.end method
.method public m(J)V
.locals 3
const-wide/16 v0, 0x0
cmp-long v2, p1, v0
if-nez v2, :cond_0
return-void
:cond_0
invoke-virtual {p0}, Ljava/util/concurrent/atomic/AtomicInteger;->get()I
move-result p1
const/4 p2, 0x1
if-eqz p1, :cond_4
if-eq p1, p2, :cond_3
const/4 p2, 0x3
const/4 v0, 0x2
if-eq p1, v0, :cond_2
if-ne p1, p2, :cond_1
goto :goto_0
:cond_1
new-instance p2, Ljava/lang/IllegalStateException;
const-string v0, "Unknown state: "
invoke-static {v0, p1}, Lf/e/b/a/a;->h(Ljava/lang/String;I)Ljava/lang/String;
move-result-object p1
invoke-direct {p2, p1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw p2
:cond_2
invoke-virtual {p0, v0, p2}, Ljava/util/concurrent/atomic/AtomicInteger;->compareAndSet(II)Z
move-result p1
if-eqz p1, :cond_0
iget-object p1, p0, Lr0/s/a/b;->response:Lr0/n;
invoke-virtual {p0, p1}, Lr0/s/a/b;->a(Lr0/n;)V
:cond_3
:goto_0
return-void
:cond_4
const/4 p1, 0x0
invoke-virtual {p0, p1, p2}, Ljava/util/concurrent/atomic/AtomicInteger;->compareAndSet(II)Z
move-result p1
if-eqz p1, :cond_0
return-void
.end method
.method public unsubscribe()V
.locals 1
iget-object v0, p0, Lr0/s/a/b;->call:Lr0/b;
invoke-interface {v0}, Lr0/b;->cancel()V
return-void
.end method