CallExecuteObservable.smali
.class final Lretrofit2/adapter/rxjava2/CallExecuteObservable;
.super Lio/reactivex/Observable;
.source "CallExecuteObservable.java"
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lretrofit2/adapter/rxjava2/CallExecuteObservable$CallDisposable;
}
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">",
"Lio/reactivex/Observable<",
"Lretrofit2/Response<",
"TT;>;>;"
}
.end annotation
# instance fields
.field private final originalCall:Lretrofit2/Call;
.annotation system Ldalvik/annotation/Signature;
value = {
"Lretrofit2/Call<",
"TT;>;"
}
.end annotation
.end field
# direct methods
.method static constructor <clinit>()V
.registers 1
return-void
.end method
.method constructor <init>(Lretrofit2/Call;)V
.registers 2
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lretrofit2/Call<",
"TT;>;)V"
}
.end annotation
.line 30
.local p0, "this":Lretrofit2/adapter/rxjava2/CallExecuteObservable;, "Lretrofit2/adapter/rxjava2/CallExecuteObservable<TT;>;"
.local p1, "originalCall":Lretrofit2/Call;, "Lretrofit2/Call<TT;>;"
invoke-direct {p0}, Lio/reactivex/Observable;-><init>()V
.line 31
iput-object p1, p0, Lretrofit2/adapter/rxjava2/CallExecuteObservable;->originalCall:Lretrofit2/Call;
.line 32
return-void
.end method
# virtual methods
.method protected subscribeActual(Lio/reactivex/Observer;)V
.registers 9
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lio/reactivex/Observer<",
"-",
"Lretrofit2/Response<",
"TT;>;>;)V"
}
.end annotation
.line 36
.local p0, "this":Lretrofit2/adapter/rxjava2/CallExecuteObservable;, "Lretrofit2/adapter/rxjava2/CallExecuteObservable<TT;>;"
.local p1, "observer":Lio/reactivex/Observer;, "Lio/reactivex/Observer<-Lretrofit2/Response<TT;>;>;"
iget-object v0, p0, Lretrofit2/adapter/rxjava2/CallExecuteObservable;->originalCall:Lretrofit2/Call;
invoke-interface {v0}, Lretrofit2/Call;->clone()Lretrofit2/Call;
move-result-object v0
.line 37
.local v0, "call":Lretrofit2/Call;, "Lretrofit2/Call<TT;>;"
new-instance v1, Lretrofit2/adapter/rxjava2/CallExecuteObservable$CallDisposable;
invoke-direct {v1, v0}, Lretrofit2/adapter/rxjava2/CallExecuteObservable$CallDisposable;-><init>(Lretrofit2/Call;)V
invoke-interface {p1, v1}, Lio/reactivex/Observer;->onSubscribe(Lio/reactivex/disposables/Disposable;)V
.line 39
const/4 v1, 0x0
.line 41
.local v1, "terminated":Z
:try_start_f
invoke-interface {v0}, Lretrofit2/Call;->execute()Lretrofit2/Response;
move-result-object v2
.line 42
.local v2, "response":Lretrofit2/Response;, "Lretrofit2/Response<TT;>;"
invoke-interface {v0}, Lretrofit2/Call;->isCanceled()Z
move-result v3
if-nez v3, :cond_1c
.line 43
invoke-interface {p1, v2}, Lio/reactivex/Observer;->onNext(Ljava/lang/Object;)V
.line 45
:cond_1c
invoke-interface {v0}, Lretrofit2/Call;->isCanceled()Z
move-result v3
if-nez v3, :cond_26
.line 46
const/4 v1, 0x1
.line 47
invoke-interface {p1}, Lio/reactivex/Observer;->onComplete()V
:try_end_26
.catchall {:try_start_f .. :try_end_26} :catchall_27
.line 61
.end local v2 # "response":Lretrofit2/Response;, "Lretrofit2/Response<TT;>;"
:cond_26
goto :goto_50
.line 49
:catchall_27
move-exception v2
.line 50
.local v2, "t":Ljava/lang/Throwable;
invoke-static {v2}, Lio/reactivex/exceptions/Exceptions;->throwIfFatal(Ljava/lang/Throwable;)V
.line 51
if-eqz v1, :cond_31
.line 52
invoke-static {v2}, Lio/reactivex/plugins/RxJavaPlugins;->onError(Ljava/lang/Throwable;)V
goto :goto_50
.line 53
:cond_31
invoke-interface {v0}, Lretrofit2/Call;->isCanceled()Z
move-result v3
if-nez v3, :cond_50
.line 55
:try_start_37
invoke-interface {p1, v2}, Lio/reactivex/Observer;->onError(Ljava/lang/Throwable;)V
:try_end_3a
.catchall {:try_start_37 .. :try_end_3a} :catchall_3b
.line 59
goto :goto_50
.line 56
:catchall_3b
move-exception v3
.line 57
.local v3, "inner":Ljava/lang/Throwable;
invoke-static {v3}, Lio/reactivex/exceptions/Exceptions;->throwIfFatal(Ljava/lang/Throwable;)V
.line 58
new-instance v4, Lio/reactivex/exceptions/CompositeException;
const/4 v5, 0x2
new-array v5, v5, [Ljava/lang/Throwable;
const/4 v6, 0x0
aput-object v2, v5, v6
const/4 v6, 0x1
aput-object v3, v5, v6
invoke-direct {v4, v5}, Lio/reactivex/exceptions/CompositeException;-><init>([Ljava/lang/Throwable;)V
invoke-static {v4}, Lio/reactivex/plugins/RxJavaPlugins;->onError(Ljava/lang/Throwable;)V
.line 62
.end local v2 # "t":Ljava/lang/Throwable;
.end local v3 # "inner":Ljava/lang/Throwable;
:cond_50
:goto_50
return-void
.end method