apkfuckery/com.discord/smali_classes2/g0/n/b.smali
2020-04-08 18:24:01 +02:00

146 lines
3.5 KiB
Smali

.class public final Lg0/n/b;
.super Ljava/lang/Object;
.source "BlockingObservable.java"
# annotations
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">",
"Ljava/lang/Object;"
}
.end annotation
# instance fields
.field public final a:Lrx/Observable;
.annotation system Ldalvik/annotation/Signature;
value = {
"Lrx/Observable<",
"+TT;>;"
}
.end annotation
.end field
# direct methods
.method public constructor <init>(Lrx/Observable;)V
.locals 0
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lrx/Observable<",
"+TT;>;)V"
}
.end annotation
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
iput-object p1, p0, Lg0/n/b;->a:Lrx/Observable;
return-void
.end method
# virtual methods
.method public a()Ljava/lang/Object;
.locals 9
.annotation system Ldalvik/annotation/Signature;
value = {
"()TT;"
}
.end annotation
iget-object v0, p0, Lg0/n/b;->a:Lrx/Observable;
invoke-virtual {v0}, Lrx/Observable;->g()Lrx/Observable;
move-result-object v0
new-instance v1, Ljava/util/concurrent/atomic/AtomicReference;
invoke-direct {v1}, Ljava/util/concurrent/atomic/AtomicReference;-><init>()V
new-instance v2, Ljava/util/concurrent/atomic/AtomicReference;
invoke-direct {v2}, Ljava/util/concurrent/atomic/AtomicReference;-><init>()V
new-instance v3, Ljava/util/concurrent/CountDownLatch;
const/4 v4, 0x1
invoke-direct {v3, v4}, Ljava/util/concurrent/CountDownLatch;-><init>(I)V
new-instance v4, Lg0/n/a;
invoke-direct {v4, p0, v3, v2, v1}, Lg0/n/a;-><init>(Lg0/n/b;Ljava/util/concurrent/CountDownLatch;Ljava/util/concurrent/atomic/AtomicReference;Ljava/util/concurrent/atomic/AtomicReference;)V
invoke-virtual {v0, v4}, Lrx/Observable;->a(Lrx/Subscriber;)Lrx/Subscription;
move-result-object v0
invoke-virtual {v3}, Ljava/util/concurrent/CountDownLatch;->getCount()J
move-result-wide v4
const-wide/16 v6, 0x0
cmp-long v8, v4, v6
if-nez v8, :cond_0
goto :goto_0
:cond_0
:try_start_0
invoke-virtual {v3}, Ljava/util/concurrent/CountDownLatch;->await()V
:try_end_0
.catch Ljava/lang/InterruptedException; {:try_start_0 .. :try_end_0} :catch_0
:goto_0
invoke-virtual {v2}, Ljava/util/concurrent/atomic/AtomicReference;->get()Ljava/lang/Object;
move-result-object v0
if-nez v0, :cond_1
invoke-virtual {v1}, Ljava/util/concurrent/atomic/AtomicReference;->get()Ljava/lang/Object;
move-result-object v0
return-object v0
:cond_1
invoke-virtual {v2}, Ljava/util/concurrent/atomic/AtomicReference;->get()Ljava/lang/Object;
move-result-object v0
check-cast v0, Ljava/lang/Throwable;
invoke-static {v0}, Le/n/a/j/a;->a(Ljava/lang/Throwable;)Ljava/lang/RuntimeException;
const/4 v0, 0x0
throw v0
:catch_0
move-exception v1
invoke-interface {v0}, Lrx/Subscription;->unsubscribe()V
invoke-static {}, Ljava/lang/Thread;->currentThread()Ljava/lang/Thread;
move-result-object v0
invoke-virtual {v0}, Ljava/lang/Thread;->interrupt()V
new-instance v0, Ljava/lang/IllegalStateException;
const-string v2, "Interrupted while waiting for subscription to complete."
invoke-direct {v0, v2, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
throw v0
.end method