296 lines
9.4 KiB
Smali
296 lines
9.4 KiB
Smali
.class public final Lrx/internal/operators/SingleOnSubscribeUsing;
|
|
.super Ljava/lang/Object;
|
|
.source "SingleOnSubscribeUsing.java"
|
|
|
|
# interfaces
|
|
.implements Lrx/Single$OnSubscribe;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"<T:",
|
|
"Ljava/lang/Object;",
|
|
"Resource:",
|
|
"Ljava/lang/Object;",
|
|
">",
|
|
"Ljava/lang/Object;",
|
|
"Lrx/Single$OnSubscribe",
|
|
"<TT;>;"
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field final disposeAction:Lrx/functions/Action1;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lrx/functions/Action1",
|
|
"<-TResource;>;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field final disposeEagerly:Z
|
|
|
|
.field final resourceFactory:Lrx/functions/Func0;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lrx/functions/Func0",
|
|
"<TResource;>;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field final singleFactory:Lrx/functions/Func1;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lrx/functions/Func1",
|
|
"<-TResource;+",
|
|
"Lrx/Single",
|
|
"<+TT;>;>;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Lrx/functions/Func0;Lrx/functions/Func1;Lrx/functions/Action1;Z)V
|
|
.locals 0
|
|
.param p4, "disposeEagerly" # Z
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Lrx/functions/Func0",
|
|
"<TResource;>;",
|
|
"Lrx/functions/Func1",
|
|
"<-TResource;+",
|
|
"Lrx/Single",
|
|
"<+TT;>;>;",
|
|
"Lrx/functions/Action1",
|
|
"<-TResource;>;Z)V"
|
|
}
|
|
.end annotation
|
|
|
|
.prologue
|
|
.local p0, "this":Lrx/internal/operators/SingleOnSubscribeUsing;, "Lrx/internal/operators/SingleOnSubscribeUsing<TT;TResource;>;"
|
|
.local p1, "resourceFactory":Lrx/functions/Func0;, "Lrx/functions/Func0<TResource;>;"
|
|
.local p2, "observableFactory":Lrx/functions/Func1;, "Lrx/functions/Func1<-TResource;+Lrx/Single<+TT;>;>;"
|
|
.local p3, "disposeAction":Lrx/functions/Action1;, "Lrx/functions/Action1<-TResource;>;"
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
iput-object p1, p0, Lrx/internal/operators/SingleOnSubscribeUsing;->resourceFactory:Lrx/functions/Func0;
|
|
|
|
iput-object p2, p0, Lrx/internal/operators/SingleOnSubscribeUsing;->singleFactory:Lrx/functions/Func1;
|
|
|
|
iput-object p3, p0, Lrx/internal/operators/SingleOnSubscribeUsing;->disposeAction:Lrx/functions/Action1;
|
|
|
|
iput-boolean p4, p0, Lrx/internal/operators/SingleOnSubscribeUsing;->disposeEagerly:Z
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public bridge synthetic call(Ljava/lang/Object;)V
|
|
.locals 0
|
|
.param p1, "x0" # Ljava/lang/Object;
|
|
|
|
.prologue
|
|
.local p0, "this":Lrx/internal/operators/SingleOnSubscribeUsing;, "Lrx/internal/operators/SingleOnSubscribeUsing<TT;TResource;>;"
|
|
check-cast p1, Lrx/SingleSubscriber;
|
|
|
|
.end local p1 # "x0":Ljava/lang/Object;
|
|
invoke-virtual {p0, p1}, Lrx/internal/operators/SingleOnSubscribeUsing;->call(Lrx/SingleSubscriber;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public call(Lrx/SingleSubscriber;)V
|
|
.locals 6
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Lrx/SingleSubscriber",
|
|
"<-TT;>;)V"
|
|
}
|
|
.end annotation
|
|
|
|
.prologue
|
|
.local p0, "this":Lrx/internal/operators/SingleOnSubscribeUsing;, "Lrx/internal/operators/SingleOnSubscribeUsing<TT;TResource;>;"
|
|
.local p1, "child":Lrx/SingleSubscriber;, "Lrx/SingleSubscriber<-TT;>;"
|
|
:try_start_0
|
|
iget-object v4, p0, Lrx/internal/operators/SingleOnSubscribeUsing;->resourceFactory:Lrx/functions/Func0;
|
|
|
|
invoke-interface {v4}, Lrx/functions/Func0;->call()Ljava/lang/Object;
|
|
:try_end_0
|
|
.catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
move-result-object v2
|
|
|
|
.local v2, "resource":Ljava/lang/Object;, "TResource;"
|
|
:try_start_1
|
|
iget-object v4, p0, Lrx/internal/operators/SingleOnSubscribeUsing;->singleFactory:Lrx/functions/Func1;
|
|
|
|
invoke-interface {v4, v2}, Lrx/functions/Func1;->call(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v3
|
|
|
|
check-cast v3, Lrx/Single;
|
|
:try_end_1
|
|
.catch Ljava/lang/Throwable; {:try_start_1 .. :try_end_1} :catch_1
|
|
|
|
.local v3, "single":Lrx/Single;, "Lrx/Single<+TT;>;"
|
|
if-nez v3, :cond_0
|
|
|
|
new-instance v4, Ljava/lang/NullPointerException;
|
|
|
|
const-string v5, "The single"
|
|
|
|
invoke-direct {v4, v5}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
|
|
|
|
invoke-virtual {p0, p1, v2, v4}, Lrx/internal/operators/SingleOnSubscribeUsing;->handleSubscriptionTimeError(Lrx/SingleSubscriber;Ljava/lang/Object;Ljava/lang/Throwable;)V
|
|
|
|
.end local v2 # "resource":Ljava/lang/Object;, "TResource;"
|
|
.end local v3 # "single":Lrx/Single;, "Lrx/Single<+TT;>;"
|
|
:goto_0
|
|
return-void
|
|
|
|
:catch_0
|
|
move-exception v0
|
|
|
|
.local v0, "ex":Ljava/lang/Throwable;
|
|
invoke-static {v0}, Lrx/exceptions/Exceptions;->throwIfFatal(Ljava/lang/Throwable;)V
|
|
|
|
invoke-virtual {p1, v0}, Lrx/SingleSubscriber;->onError(Ljava/lang/Throwable;)V
|
|
|
|
goto :goto_0
|
|
|
|
.end local v0 # "ex":Ljava/lang/Throwable;
|
|
.restart local v2 # "resource":Ljava/lang/Object;, "TResource;"
|
|
:catch_1
|
|
move-exception v0
|
|
|
|
.restart local v0 # "ex":Ljava/lang/Throwable;
|
|
invoke-virtual {p0, p1, v2, v0}, Lrx/internal/operators/SingleOnSubscribeUsing;->handleSubscriptionTimeError(Lrx/SingleSubscriber;Ljava/lang/Object;Ljava/lang/Throwable;)V
|
|
|
|
goto :goto_0
|
|
|
|
.end local v0 # "ex":Ljava/lang/Throwable;
|
|
.restart local v3 # "single":Lrx/Single;, "Lrx/Single<+TT;>;"
|
|
:cond_0
|
|
new-instance v1, Lrx/internal/operators/SingleOnSubscribeUsing$1;
|
|
|
|
invoke-direct {v1, p0, v2, p1}, Lrx/internal/operators/SingleOnSubscribeUsing$1;-><init>(Lrx/internal/operators/SingleOnSubscribeUsing;Ljava/lang/Object;Lrx/SingleSubscriber;)V
|
|
|
|
.local v1, "parent":Lrx/SingleSubscriber;, "Lrx/SingleSubscriber<TT;>;"
|
|
invoke-virtual {p1, v1}, Lrx/SingleSubscriber;->add(Lrx/Subscription;)V
|
|
|
|
invoke-virtual {v3, v1}, Lrx/Single;->subscribe(Lrx/SingleSubscriber;)Lrx/Subscription;
|
|
|
|
goto :goto_0
|
|
.end method
|
|
|
|
.method handleSubscriptionTimeError(Lrx/SingleSubscriber;Ljava/lang/Object;Ljava/lang/Throwable;)V
|
|
.locals 4
|
|
.param p3, "ex" # Ljava/lang/Throwable;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Lrx/SingleSubscriber",
|
|
"<-TT;>;TResource;",
|
|
"Ljava/lang/Throwable;",
|
|
")V"
|
|
}
|
|
.end annotation
|
|
|
|
.prologue
|
|
.local p0, "this":Lrx/internal/operators/SingleOnSubscribeUsing;, "Lrx/internal/operators/SingleOnSubscribeUsing<TT;TResource;>;"
|
|
.local p1, "t":Lrx/SingleSubscriber;, "Lrx/SingleSubscriber<-TT;>;"
|
|
.local p2, "resource":Ljava/lang/Object;, "TResource;"
|
|
invoke-static {p3}, Lrx/exceptions/Exceptions;->throwIfFatal(Ljava/lang/Throwable;)V
|
|
|
|
iget-boolean v2, p0, Lrx/internal/operators/SingleOnSubscribeUsing;->disposeEagerly:Z
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
:try_start_0
|
|
iget-object v2, p0, Lrx/internal/operators/SingleOnSubscribeUsing;->disposeAction:Lrx/functions/Action1;
|
|
|
|
invoke-interface {v2, p2}, Lrx/functions/Action1;->call(Ljava/lang/Object;)V
|
|
:try_end_0
|
|
.catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
:cond_0
|
|
:goto_0
|
|
invoke-virtual {p1, p3}, Lrx/SingleSubscriber;->onError(Ljava/lang/Throwable;)V
|
|
|
|
iget-boolean v2, p0, Lrx/internal/operators/SingleOnSubscribeUsing;->disposeEagerly:Z
|
|
|
|
if-nez v2, :cond_1
|
|
|
|
:try_start_1
|
|
iget-object v2, p0, Lrx/internal/operators/SingleOnSubscribeUsing;->disposeAction:Lrx/functions/Action1;
|
|
|
|
invoke-interface {v2, p2}, Lrx/functions/Action1;->call(Ljava/lang/Object;)V
|
|
:try_end_1
|
|
.catch Ljava/lang/Throwable; {:try_start_1 .. :try_end_1} :catch_1
|
|
|
|
:cond_1
|
|
:goto_1
|
|
return-void
|
|
|
|
:catch_0
|
|
move-exception v1
|
|
|
|
.local v1, "ex2":Ljava/lang/Throwable;
|
|
invoke-static {v1}, Lrx/exceptions/Exceptions;->throwIfFatal(Ljava/lang/Throwable;)V
|
|
|
|
new-instance v0, Lrx/exceptions/CompositeException;
|
|
|
|
const/4 v2, 0x2
|
|
|
|
new-array v2, v2, [Ljava/lang/Throwable;
|
|
|
|
const/4 v3, 0x0
|
|
|
|
aput-object p3, v2, v3
|
|
|
|
const/4 v3, 0x1
|
|
|
|
aput-object v1, v2, v3
|
|
|
|
invoke-static {v2}, Ljava/util/Arrays;->asList([Ljava/lang/Object;)Ljava/util/List;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-direct {v0, v2}, Lrx/exceptions/CompositeException;-><init>(Ljava/util/Collection;)V
|
|
|
|
.end local p3 # "ex":Ljava/lang/Throwable;
|
|
.local v0, "ex":Ljava/lang/Throwable;
|
|
move-object p3, v0
|
|
|
|
.end local v0 # "ex":Ljava/lang/Throwable;
|
|
.restart local p3 # "ex":Ljava/lang/Throwable;
|
|
goto :goto_0
|
|
|
|
.end local v1 # "ex2":Ljava/lang/Throwable;
|
|
:catch_1
|
|
move-exception v1
|
|
|
|
.restart local v1 # "ex2":Ljava/lang/Throwable;
|
|
invoke-static {v1}, Lrx/exceptions/Exceptions;->throwIfFatal(Ljava/lang/Throwable;)V
|
|
|
|
invoke-static {}, Lrx/plugins/RxJavaPlugins;->getInstance()Lrx/plugins/RxJavaPlugins;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v2}, Lrx/plugins/RxJavaPlugins;->getErrorHandler()Lrx/plugins/RxJavaErrorHandler;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v2, v1}, Lrx/plugins/RxJavaErrorHandler;->handleError(Ljava/lang/Throwable;)V
|
|
|
|
goto :goto_1
|
|
.end method
|