c.smali

.class public abstract Lio/reactivex/internal/observers/c;
.super Ljava/util/concurrent/CountDownLatch;
.source "BlockingBaseObserver.java"

# interfaces
.implements Lio/reactivex/disposables/b;
.implements Lio/reactivex/r;


# annotations
.annotation system Ldalvik/annotation/Signature;
    value = {
        "<T:",
        "Ljava/lang/Object;",
        ">",
        "Ljava/util/concurrent/CountDownLatch;",
        "Lio/reactivex/disposables/b;",
        "Lio/reactivex/r",
        "<TT;>;"
    }
.end annotation


# instance fields
.field private volatile cancelled:Z

.field d:Lio/reactivex/disposables/b;

.field error:Ljava/lang/Throwable;

.field value:Ljava/lang/Object;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "TT;"
        }
    .end annotation
.end field


# direct methods
.method public constructor <init>()V
    .registers 2

    .prologue
    .line 32
    const/4 v0, 0x1

    invoke-direct {p0, v0}, Ljava/util/concurrent/CountDownLatch;-><init>(I)V

    .line 33
    return-void
.end method


# virtual methods
.method public final Pn()Ljava/lang/Object;
    .registers 5
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "()TT;"
        }
    .end annotation

    .prologue
    .line 68
    invoke-virtual {p0}, Lio/reactivex/internal/observers/c;->getCount()J

    move-result-wide v0

    const-wide/16 v2, 0x0

    cmp-long v0, v0, v2

    if-eqz v0, :cond_f

    .line 2167
    :try_start_a
    sget-boolean v0, Lio/reactivex/d/a;->bTG:Z

    .line 71
    invoke-virtual {p0}, Lio/reactivex/internal/observers/c;->await()V
    :try_end_f
    .catch Ljava/lang/InterruptedException; {:try_start_a .. :try_end_f} :catch_18

    .line 78
    :cond_f
    iget-object v0, p0, Lio/reactivex/internal/observers/c;->error:Ljava/lang/Throwable;

    .line 79
    if-eqz v0, :cond_21

    .line 80
    invoke-static {v0}, Lio/reactivex/internal/util/ExceptionHelper;->l(Ljava/lang/Throwable;)Ljava/lang/RuntimeException;

    move-result-object v0

    throw v0

    .line 72
    :catch_18
    move-exception v0

    .line 73
    invoke-virtual {p0}, Lio/reactivex/internal/observers/c;->dispose()V

    .line 74
    invoke-static {v0}, Lio/reactivex/internal/util/ExceptionHelper;->l(Ljava/lang/Throwable;)Ljava/lang/RuntimeException;

    move-result-object v0

    throw v0

    .line 82
    :cond_21
    iget-object v0, p0, Lio/reactivex/internal/observers/c;->value:Ljava/lang/Object;

    return-object v0
.end method

.method public final dispose()V
    .registers 2

    .prologue
    .line 50
    const/4 v0, 0x1

    iput-boolean v0, p0, Lio/reactivex/internal/observers/c;->cancelled:Z

    .line 51
    iget-object v0, p0, Lio/reactivex/internal/observers/c;->d:Lio/reactivex/disposables/b;

    .line 52
    if-eqz v0, :cond_a

    .line 53
    invoke-interface {v0}, Lio/reactivex/disposables/b;->dispose()V

    .line 55
    :cond_a
    return-void
.end method

.method public final isDisposed()Z
    .registers 2

    .prologue
    .line 59
    iget-boolean v0, p0, Lio/reactivex/internal/observers/c;->cancelled:Z

    return v0
.end method

.method public final onComplete()V
    .registers 1

    .prologue
    .line 45
    invoke-virtual {p0}, Lio/reactivex/internal/observers/c;->countDown()V

    .line 46
    return-void
.end method

.method public final onSubscribe(Lio/reactivex/disposables/b;)V
    .registers 3

    .prologue
    .line 37
    iput-object p1, p0, Lio/reactivex/internal/observers/c;->d:Lio/reactivex/disposables/b;

    .line 38
    iget-boolean v0, p0, Lio/reactivex/internal/observers/c;->cancelled:Z

    if-eqz v0, :cond_9

    .line 39
    invoke-interface {p1}, Lio/reactivex/disposables/b;->dispose()V

    .line 41
    :cond_9
    return-void
.end method