g.smali
.class public final Lio/reactivex/internal/observers/g;
.super Ljava/util/concurrent/CountDownLatch;
.source "SourceFile"
# interfaces
.implements Lio/reactivex/v;
.implements Lio/reactivex/c;
.implements Lio/reactivex/i;
# annotations
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">",
"Ljava/util/concurrent/CountDownLatch;",
"Lio/reactivex/v<",
"TT;>;",
"Lio/reactivex/c;",
"Lio/reactivex/i<",
"TT;>;"
}
.end annotation
# instance fields
.field public a:Ljava/lang/Object;
.annotation system Ldalvik/annotation/Signature;
value = {
"TT;"
}
.end annotation
.end field
.field public b:Ljava/lang/Throwable;
.field public c:Lio/reactivex/disposables/b;
.field public volatile d:Z
# direct methods
.method public constructor <init>()V
.registers 2
const/4 v0, 0x1
invoke-direct {p0, v0}, Ljava/util/concurrent/CountDownLatch;-><init>(I)V
return-void
.end method
# virtual methods
.method public final a()Ljava/lang/Object;
.registers 6
.annotation system Ldalvik/annotation/Signature;
value = {
"()TT;"
}
.end annotation
.line 1
invoke-virtual {p0}, Ljava/util/concurrent/CountDownLatch;->getCount()J
move-result-wide v0
const-wide/16 v2, 0x0
cmp-long v4, v0, v2
if-eqz v4, :cond_1e
.line 2
:try_start_a
invoke-virtual {p0}, Ljava/util/concurrent/CountDownLatch;->await()V
:try_end_d
.catch Ljava/lang/InterruptedException; {:try_start_a .. :try_end_d} :catch_e
goto :goto_1e
:catch_e
move-exception v0
const/4 v1, 0x1
.line 3
iput-boolean v1, p0, Lio/reactivex/internal/observers/g;->d:Z
.line 4
iget-object v1, p0, Lio/reactivex/internal/observers/g;->c:Lio/reactivex/disposables/b;
if-eqz v1, :cond_19
.line 5
invoke-interface {v1}, Lio/reactivex/disposables/b;->dispose()V
.line 6
:cond_19
invoke-static {v0}, Lio/reactivex/internal/util/g;->d(Ljava/lang/Throwable;)Ljava/lang/RuntimeException;
move-result-object v0
throw v0
.line 7
:cond_1e
:goto_1e
iget-object v0, p0, Lio/reactivex/internal/observers/g;->b:Ljava/lang/Throwable;
if-nez v0, :cond_25
.line 8
iget-object v0, p0, Lio/reactivex/internal/observers/g;->a:Ljava/lang/Object;
return-object v0
.line 9
:cond_25
invoke-static {v0}, Lio/reactivex/internal/util/g;->d(Ljava/lang/Throwable;)Ljava/lang/RuntimeException;
move-result-object v0
throw v0
.end method
.method public final onComplete()V
.registers 1
invoke-virtual {p0}, Ljava/util/concurrent/CountDownLatch;->countDown()V
return-void
.end method
.method public final onError(Ljava/lang/Throwable;)V
.registers 2
.line 1
iput-object p1, p0, Lio/reactivex/internal/observers/g;->b:Ljava/lang/Throwable;
.line 2
invoke-virtual {p0}, Ljava/util/concurrent/CountDownLatch;->countDown()V
return-void
.end method
.method public final onSubscribe(Lio/reactivex/disposables/b;)V
.registers 3
.line 1
iput-object p1, p0, Lio/reactivex/internal/observers/g;->c:Lio/reactivex/disposables/b;
.line 2
iget-boolean v0, p0, Lio/reactivex/internal/observers/g;->d:Z
if-eqz v0, :cond_9
.line 3
invoke-interface {p1}, Lio/reactivex/disposables/b;->dispose()V
:cond_9
return-void
.end method
.method public final onSuccess(Ljava/lang/Object;)V
.registers 2
.annotation system Ldalvik/annotation/Signature;
value = {
"(TT;)V"
}
.end annotation
.line 1
iput-object p1, p0, Lio/reactivex/internal/observers/g;->a:Ljava/lang/Object;
.line 2
invoke-virtual {p0}, Ljava/util/concurrent/CountDownLatch;->countDown()V
return-void
.end method