e.smali

.class public final Lio/reactivex/observers/e;
.super Ljava/lang/Object;
.source "SourceFile"

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


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


# instance fields
.field public final a:Lio/reactivex/s;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Lio/reactivex/s<",
            "-TT;>;"
        }
    .end annotation
.end field

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

.field public c:Z

.field public d:Lio/reactivex/internal/util/a;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Lio/reactivex/internal/util/a<",
            "Ljava/lang/Object;",
            ">;"
        }
    .end annotation
.end field

.field public volatile e:Z


# direct methods
.method public constructor <init>(Lio/reactivex/s;)V
    .registers 2
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Lio/reactivex/s<",
            "-TT;>;)V"
        }
    .end annotation

    .line 1
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 2
    iput-object p1, p0, Lio/reactivex/observers/e;->a:Lio/reactivex/s;

    return-void
.end method


# virtual methods
.method public final dispose()V
    .registers 2

    iget-object v0, p0, Lio/reactivex/observers/e;->b:Lio/reactivex/disposables/b;

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

    return-void
.end method

.method public final isDisposed()Z
    .registers 2

    iget-object v0, p0, Lio/reactivex/observers/e;->b:Lio/reactivex/disposables/b;

    invoke-interface {v0}, Lio/reactivex/disposables/b;->isDisposed()Z

    move-result v0

    return v0
.end method

.method public final onComplete()V
    .registers 3

    .line 1
    iget-boolean v0, p0, Lio/reactivex/observers/e;->e:Z

    if-eqz v0, :cond_5

    return-void

    .line 2
    :cond_5
    monitor-enter p0

    .line 3
    :try_start_6
    iget-boolean v0, p0, Lio/reactivex/observers/e;->e:Z

    if-eqz v0, :cond_c

    .line 4
    monitor-exit p0

    return-void

    .line 5
    :cond_c
    iget-boolean v0, p0, Lio/reactivex/observers/e;->c:Z

    if-eqz v0, :cond_24

    .line 6
    iget-object v0, p0, Lio/reactivex/observers/e;->d:Lio/reactivex/internal/util/a;

    if-nez v0, :cond_1b

    .line 7
    new-instance v0, Lio/reactivex/internal/util/a;

    invoke-direct {v0}, Lio/reactivex/internal/util/a;-><init>()V

    .line 8
    iput-object v0, p0, Lio/reactivex/observers/e;->d:Lio/reactivex/internal/util/a;

    .line 9
    :cond_1b
    invoke-static {}, Lio/reactivex/internal/util/j;->complete()Ljava/lang/Object;

    move-result-object v1

    invoke-virtual {v0, v1}, Lio/reactivex/internal/util/a;->b(Ljava/lang/Object;)V

    .line 10
    monitor-exit p0

    return-void

    :cond_24
    const/4 v0, 0x1

    .line 11
    iput-boolean v0, p0, Lio/reactivex/observers/e;->e:Z

    .line 12
    iput-boolean v0, p0, Lio/reactivex/observers/e;->c:Z

    .line 13
    monitor-exit p0
    :try_end_2a
    .catchall {:try_start_6 .. :try_end_2a} :catchall_30

    .line 14
    iget-object v0, p0, Lio/reactivex/observers/e;->a:Lio/reactivex/s;

    invoke-interface {v0}, Lio/reactivex/s;->onComplete()V

    return-void

    :catchall_30
    move-exception v0

    .line 15
    :try_start_31
    monitor-exit p0
    :try_end_32
    .catchall {:try_start_31 .. :try_end_32} :catchall_30

    throw v0
.end method

.method public final onError(Ljava/lang/Throwable;)V
    .registers 4

    .line 1
    iget-boolean v0, p0, Lio/reactivex/observers/e;->e:Z

    if-eqz v0, :cond_8

    .line 2
    invoke-static {p1}, Lio/reactivex/plugins/a;->b(Ljava/lang/Throwable;)V

    return-void

    .line 3
    :cond_8
    monitor-enter p0

    .line 4
    :try_start_9
    iget-boolean v0, p0, Lio/reactivex/observers/e;->e:Z

    const/4 v1, 0x1

    if-eqz v0, :cond_f

    goto :goto_2e

    .line 5
    :cond_f
    iget-boolean v0, p0, Lio/reactivex/observers/e;->c:Z

    if-eqz v0, :cond_29

    .line 6
    iput-boolean v1, p0, Lio/reactivex/observers/e;->e:Z

    .line 7
    iget-object v0, p0, Lio/reactivex/observers/e;->d:Lio/reactivex/internal/util/a;

    if-nez v0, :cond_20

    .line 8
    new-instance v0, Lio/reactivex/internal/util/a;

    invoke-direct {v0}, Lio/reactivex/internal/util/a;-><init>()V

    .line 9
    iput-object v0, p0, Lio/reactivex/observers/e;->d:Lio/reactivex/internal/util/a;

    .line 10
    :cond_20
    invoke-static {p1}, Lio/reactivex/internal/util/j;->error(Ljava/lang/Throwable;)Ljava/lang/Object;

    move-result-object p1

    .line 11
    invoke-virtual {v0, p1}, Lio/reactivex/internal/util/a;->d(Ljava/lang/Object;)V

    .line 12
    monitor-exit p0

    return-void

    .line 13
    :cond_29
    iput-boolean v1, p0, Lio/reactivex/observers/e;->e:Z

    .line 14
    iput-boolean v1, p0, Lio/reactivex/observers/e;->c:Z

    const/4 v1, 0x0

    .line 15
    :goto_2e
    monitor-exit p0
    :try_end_2f
    .catchall {:try_start_9 .. :try_end_2f} :catchall_3b

    if-eqz v1, :cond_35

    .line 16
    invoke-static {p1}, Lio/reactivex/plugins/a;->b(Ljava/lang/Throwable;)V

    return-void

    .line 17
    :cond_35
    iget-object v0, p0, Lio/reactivex/observers/e;->a:Lio/reactivex/s;

    invoke-interface {v0, p1}, Lio/reactivex/s;->onError(Ljava/lang/Throwable;)V

    return-void

    :catchall_3b
    move-exception p1

    .line 18
    :try_start_3c
    monitor-exit p0
    :try_end_3d
    .catchall {:try_start_3c .. :try_end_3d} :catchall_3b

    throw p1
.end method

.method public final onNext(Ljava/lang/Object;)V
    .registers 8
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(TT;)V"
        }
    .end annotation

    .line 1
    iget-boolean v0, p0, Lio/reactivex/observers/e;->e:Z

    if-eqz v0, :cond_5

    return-void

    :cond_5
    if-nez p1, :cond_17

    .line 2
    iget-object p1, p0, Lio/reactivex/observers/e;->b:Lio/reactivex/disposables/b;

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

    .line 3
    new-instance p1, Ljava/lang/NullPointerException;

    const-string v0, "onNext called with null. Null values are generally not allowed in 2.x operators and sources."

    invoke-direct {p1, v0}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V

    invoke-virtual {p0, p1}, Lio/reactivex/observers/e;->onError(Ljava/lang/Throwable;)V

    return-void

    .line 4
    :cond_17
    monitor-enter p0

    .line 5
    :try_start_18
    iget-boolean v0, p0, Lio/reactivex/observers/e;->e:Z

    if-eqz v0, :cond_1e

    .line 6
    monitor-exit p0

    return-void

    .line 7
    :cond_1e
    iget-boolean v0, p0, Lio/reactivex/observers/e;->c:Z

    if-eqz v0, :cond_36

    .line 8
    iget-object v0, p0, Lio/reactivex/observers/e;->d:Lio/reactivex/internal/util/a;

    if-nez v0, :cond_2d

    .line 9
    new-instance v0, Lio/reactivex/internal/util/a;

    invoke-direct {v0}, Lio/reactivex/internal/util/a;-><init>()V

    .line 10
    iput-object v0, p0, Lio/reactivex/observers/e;->d:Lio/reactivex/internal/util/a;

    .line 11
    :cond_2d
    invoke-static {p1}, Lio/reactivex/internal/util/j;->next(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object p1

    invoke-virtual {v0, p1}, Lio/reactivex/internal/util/a;->b(Ljava/lang/Object;)V

    .line 12
    monitor-exit p0

    return-void

    :cond_36
    const/4 v0, 0x1

    .line 13
    iput-boolean v0, p0, Lio/reactivex/observers/e;->c:Z

    .line 14
    monitor-exit p0
    :try_end_3a
    .catchall {:try_start_18 .. :try_end_3a} :catchall_72

    .line 15
    iget-object v1, p0, Lio/reactivex/observers/e;->a:Lio/reactivex/s;

    invoke-interface {v1, p1}, Lio/reactivex/s;->onNext(Ljava/lang/Object;)V

    .line 16
    :cond_3f
    monitor-enter p0

    .line 17
    :try_start_40
    iget-object p1, p0, Lio/reactivex/observers/e;->d:Lio/reactivex/internal/util/a;

    const/4 v1, 0x0

    if-nez p1, :cond_49

    .line 18
    iput-boolean v1, p0, Lio/reactivex/observers/e;->c:Z

    .line 19
    monitor-exit p0

    goto :goto_6e

    :cond_49
    const/4 v2, 0x0

    .line 20
    iput-object v2, p0, Lio/reactivex/observers/e;->d:Lio/reactivex/internal/util/a;

    .line 21
    monitor-exit p0
    :try_end_4d
    .catchall {:try_start_40 .. :try_end_4d} :catchall_6f

    .line 22
    iget-object v2, p0, Lio/reactivex/observers/e;->a:Lio/reactivex/s;

    .line 23
    iget-object p1, p1, Lio/reactivex/internal/util/a;->a:[Ljava/lang/Object;

    const/4 v3, 0x4

    :goto_52
    if-eqz p1, :cond_6c

    const/4 v4, 0x0

    :goto_55
    if-ge v4, v3, :cond_67

    .line 24
    aget-object v5, p1, v4

    if-nez v5, :cond_5c

    goto :goto_67

    .line 25
    :cond_5c
    invoke-static {v5, v2}, Lio/reactivex/internal/util/j;->acceptFull(Ljava/lang/Object;Lio/reactivex/s;)Z

    move-result v5

    if-eqz v5, :cond_64

    const/4 v1, 0x1

    goto :goto_6c

    :cond_64
    add-int/lit8 v4, v4, 0x1

    goto :goto_55

    .line 26
    :cond_67
    :goto_67
    aget-object p1, p1, v3

    check-cast p1, [Ljava/lang/Object;

    goto :goto_52

    :cond_6c
    :goto_6c
    if-eqz v1, :cond_3f

    :goto_6e
    return-void

    :catchall_6f
    move-exception p1

    .line 27
    :try_start_70
    monitor-exit p0
    :try_end_71
    .catchall {:try_start_70 .. :try_end_71} :catchall_6f

    throw p1

    :catchall_72
    move-exception p1

    .line 28
    :try_start_73
    monitor-exit p0
    :try_end_74
    .catchall {:try_start_73 .. :try_end_74} :catchall_72

    throw p1
.end method

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

    .line 1
    iget-object v0, p0, Lio/reactivex/observers/e;->b:Lio/reactivex/disposables/b;

    invoke-static {v0, p1}, Lio/reactivex/internal/disposables/c;->validate(Lio/reactivex/disposables/b;Lio/reactivex/disposables/b;)Z

    move-result v0

    if-eqz v0, :cond_f

    .line 2
    iput-object p1, p0, Lio/reactivex/observers/e;->b:Lio/reactivex/disposables/b;

    .line 3
    iget-object p1, p0, Lio/reactivex/observers/e;->a:Lio/reactivex/s;

    invoke-interface {p1, p0}, Lio/reactivex/s;->onSubscribe(Lio/reactivex/disposables/b;)V

    :cond_f
    return-void
.end method