SingleOnSubscribeMap$MapSubscriber.smali
.class final Lrx/internal/operators/SingleOnSubscribeMap$MapSubscriber;
.super Lrx/SingleSubscriber;
.source "SingleOnSubscribeMap.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lrx/internal/operators/SingleOnSubscribeMap;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x18
name = "MapSubscriber"
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
"R:",
"Ljava/lang/Object;",
">",
"Lrx/SingleSubscriber<",
"TT;>;"
}
.end annotation
# instance fields
.field final actual:Lrx/SingleSubscriber;
.annotation system Ldalvik/annotation/Signature;
value = {
"Lrx/SingleSubscriber<",
"-TR;>;"
}
.end annotation
.end field
.field done:Z
.field final mapper:Lrx/functions/Func1;
.annotation system Ldalvik/annotation/Signature;
value = {
"Lrx/functions/Func1<",
"-TT;+TR;>;"
}
.end annotation
.end field
# direct methods
.method public constructor <init>(Lrx/SingleSubscriber;Lrx/functions/Func1;)V
.registers 3
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lrx/SingleSubscriber<",
"-TR;>;",
"Lrx/functions/Func1<",
"-TT;+TR;>;)V"
}
.end annotation
.line 1
invoke-direct {p0}, Lrx/SingleSubscriber;-><init>()V
.line 2
iput-object p1, p0, Lrx/internal/operators/SingleOnSubscribeMap$MapSubscriber;->actual:Lrx/SingleSubscriber;
.line 3
iput-object p2, p0, Lrx/internal/operators/SingleOnSubscribeMap$MapSubscriber;->mapper:Lrx/functions/Func1;
return-void
.end method
# virtual methods
.method public onError(Ljava/lang/Throwable;)V
.registers 3
.line 1
iget-boolean v0, p0, Lrx/internal/operators/SingleOnSubscribeMap$MapSubscriber;->done:Z
if-eqz v0, :cond_8
.line 2
invoke-static {p1}, Lrx/plugins/RxJavaHooks;->onError(Ljava/lang/Throwable;)V
return-void
:cond_8
const/4 v0, 0x1
.line 3
iput-boolean v0, p0, Lrx/internal/operators/SingleOnSubscribeMap$MapSubscriber;->done:Z
.line 4
iget-object v0, p0, Lrx/internal/operators/SingleOnSubscribeMap$MapSubscriber;->actual:Lrx/SingleSubscriber;
invoke-virtual {v0, p1}, Lrx/SingleSubscriber;->onError(Ljava/lang/Throwable;)V
return-void
.end method
.method public onSuccess(Ljava/lang/Object;)V
.registers 3
.annotation system Ldalvik/annotation/Signature;
value = {
"(TT;)V"
}
.end annotation
.line 1
:try_start_0
iget-object v0, p0, Lrx/internal/operators/SingleOnSubscribeMap$MapSubscriber;->mapper:Lrx/functions/Func1;
invoke-interface {v0, p1}, Lrx/functions/Func1;->call(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object p1
:try_end_6
.catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_6} :catch_c
.line 2
iget-object v0, p0, Lrx/internal/operators/SingleOnSubscribeMap$MapSubscriber;->actual:Lrx/SingleSubscriber;
invoke-virtual {v0, p1}, Lrx/SingleSubscriber;->onSuccess(Ljava/lang/Object;)V
return-void
:catch_c
move-exception v0
.line 3
invoke-static {v0}, Lrx/exceptions/Exceptions;->throwIfFatal(Ljava/lang/Throwable;)V
.line 4
invoke-virtual {p0}, Lrx/SingleSubscriber;->unsubscribe()V
.line 5
invoke-static {v0, p1}, Lrx/exceptions/OnErrorThrowable;->addValueAsLastCause(Ljava/lang/Throwable;Ljava/lang/Object;)Ljava/lang/Throwable;
move-result-object p1
invoke-virtual {p0, p1}, Lrx/internal/operators/SingleOnSubscribeMap$MapSubscriber;->onError(Ljava/lang/Throwable;)V
return-void
.end method