a$a.smali

.class public final Lretrofit2/adapter/rxjava2/a$a;
.super Ljava/lang/Object;
.source "SourceFile"

# interfaces
.implements Lio/reactivex/s;


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lretrofit2/adapter/rxjava2/a;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x9
    name = "a"
.end annotation

.annotation system Ldalvik/annotation/Signature;
    value = {
        "<R:",
        "Ljava/lang/Object;",
        ">",
        "Ljava/lang/Object;",
        "Lio/reactivex/s<",
        "Lretrofit2/x<",
        "TR;>;>;"
    }
.end annotation


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

.field public b:Z


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

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

    .line 2
    iput-object p1, p0, Lretrofit2/adapter/rxjava2/a$a;->a:Lio/reactivex/s;

    return-void
.end method


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

    .line 1
    iget-boolean v0, p0, Lretrofit2/adapter/rxjava2/a$a;->b:Z

    if-nez v0, :cond_9

    .line 2
    iget-object v0, p0, Lretrofit2/adapter/rxjava2/a$a;->a:Lio/reactivex/s;

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

    :cond_9
    return-void
.end method

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

    .line 1
    iget-boolean v0, p0, Lretrofit2/adapter/rxjava2/a$a;->b:Z

    if-nez v0, :cond_a

    .line 2
    iget-object v0, p0, Lretrofit2/adapter/rxjava2/a$a;->a:Lio/reactivex/s;

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

    goto :goto_17

    .line 3
    :cond_a
    new-instance v0, Ljava/lang/AssertionError;

    const-string v1, "This should never happen! Report as a bug with the full stacktrace."

    invoke-direct {v0, v1}, Ljava/lang/AssertionError;-><init>(Ljava/lang/Object;)V

    .line 4
    invoke-virtual {v0, p1}, Ljava/lang/Throwable;->initCause(Ljava/lang/Throwable;)Ljava/lang/Throwable;

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

    :goto_17
    return-void
.end method

.method public final onNext(Ljava/lang/Object;)V
    .registers 7

    .line 1
    check-cast p1, Lretrofit2/x;

    .line 2
    invoke-virtual {p1}, Lretrofit2/x;->b()Z

    move-result v0

    if-eqz v0, :cond_10

    .line 3
    iget-object v0, p0, Lretrofit2/adapter/rxjava2/a$a;->a:Lio/reactivex/s;

    .line 4
    iget-object p1, p1, Lretrofit2/x;->b:Ljava/lang/Object;

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

    goto :goto_32

    :cond_10
    const/4 v0, 0x1

    .line 6
    iput-boolean v0, p0, Lretrofit2/adapter/rxjava2/a$a;->b:Z

    .line 7
    new-instance v1, Lretrofit2/adapter/rxjava2/c;

    invoke-direct {v1, p1}, Lretrofit2/adapter/rxjava2/c;-><init>(Lretrofit2/x;)V

    .line 8
    :try_start_18
    iget-object p1, p0, Lretrofit2/adapter/rxjava2/a$a;->a:Lio/reactivex/s;

    invoke-interface {p1, v1}, Lio/reactivex/s;->onError(Ljava/lang/Throwable;)V
    :try_end_1d
    .catchall {:try_start_18 .. :try_end_1d} :catchall_1e

    goto :goto_32

    :catchall_1e
    move-exception p1

    .line 9
    invoke-static {p1}, Lcom/shopee/app/dre/codepush/task/a;->m(Ljava/lang/Throwable;)V

    .line 10
    new-instance v2, Lio/reactivex/exceptions/a;

    const/4 v3, 0x2

    new-array v3, v3, [Ljava/lang/Throwable;

    const/4 v4, 0x0

    aput-object v1, v3, v4

    aput-object p1, v3, v0

    invoke-direct {v2, v3}, Lio/reactivex/exceptions/a;-><init>([Ljava/lang/Throwable;)V

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

    :goto_32
    return-void
.end method

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

    iget-object v0, p0, Lretrofit2/adapter/rxjava2/a$a;->a:Lio/reactivex/s;

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

    return-void
.end method