360 lines
8.4 KiB
Smali
360 lines
8.4 KiB
Smali
.class final Lio/reactivex/internal/operators/maybe/MaybeCreate$Emitter;
|
|
.super Ljava/util/concurrent/atomic/AtomicReference;
|
|
.source "MaybeCreate.java"
|
|
|
|
# interfaces
|
|
.implements Lkh/s;
|
|
.implements Lio/reactivex/disposables/b;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
value = Lio/reactivex/internal/operators/maybe/MaybeCreate;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x19
|
|
name = "Emitter"
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"<T:",
|
|
"Ljava/lang/Object;",
|
|
">",
|
|
"Ljava/util/concurrent/atomic/AtomicReference<",
|
|
"Lio/reactivex/disposables/b;",
|
|
">;",
|
|
"Lkh/s<",
|
|
"TT;>;",
|
|
"Lio/reactivex/disposables/b;"
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field private static final serialVersionUID:J = -0x223dd198233781a4L
|
|
|
|
|
|
# instance fields
|
|
.field public final downstream:Lkh/t;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lkh/t<",
|
|
"-TT;>;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Lkh/t;)V
|
|
.locals 0
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Lkh/t<",
|
|
"-TT;>;)V"
|
|
}
|
|
.end annotation
|
|
|
|
.line 1
|
|
invoke-direct {p0}, Ljava/util/concurrent/atomic/AtomicReference;-><init>()V
|
|
|
|
.line 2
|
|
iput-object p1, p0, Lio/reactivex/internal/operators/maybe/MaybeCreate$Emitter;->downstream:Lkh/t;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public dispose()V
|
|
.locals 0
|
|
|
|
.line 1
|
|
invoke-static {p0}, Lio/reactivex/internal/disposables/DisposableHelper;->dispose(Ljava/util/concurrent/atomic/AtomicReference;)Z
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public isDisposed()Z
|
|
.locals 1
|
|
|
|
.line 1
|
|
invoke-virtual {p0}, Ljava/util/concurrent/atomic/AtomicReference;->get()Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Lio/reactivex/disposables/b;
|
|
|
|
invoke-static {v0}, Lio/reactivex/internal/disposables/DisposableHelper;->isDisposed(Lio/reactivex/disposables/b;)Z
|
|
|
|
move-result v0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public onComplete()V
|
|
.locals 2
|
|
|
|
.line 1
|
|
invoke-virtual {p0}, Ljava/util/concurrent/atomic/AtomicReference;->get()Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
sget-object v1, Lio/reactivex/internal/disposables/DisposableHelper;->DISPOSED:Lio/reactivex/internal/disposables/DisposableHelper;
|
|
|
|
if-eq v0, v1, :cond_1
|
|
|
|
.line 2
|
|
invoke-virtual {p0, v1}, Ljava/util/concurrent/atomic/AtomicReference;->getAndSet(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Lio/reactivex/disposables/b;
|
|
|
|
if-eq v0, v1, :cond_1
|
|
|
|
.line 3
|
|
:try_start_0
|
|
iget-object v1, p0, Lio/reactivex/internal/operators/maybe/MaybeCreate$Emitter;->downstream:Lkh/t;
|
|
|
|
invoke-interface {v1}, Lkh/t;->onComplete()V
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
.line 4
|
|
invoke-interface {v0}, Lio/reactivex/disposables/b;->dispose()V
|
|
|
|
goto :goto_0
|
|
|
|
:catchall_0
|
|
move-exception v1
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-interface {v0}, Lio/reactivex/disposables/b;->dispose()V
|
|
|
|
:cond_0
|
|
throw v1
|
|
|
|
:cond_1
|
|
:goto_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public onError(Ljava/lang/Throwable;)V
|
|
.locals 1
|
|
|
|
.line 1
|
|
invoke-virtual {p0, p1}, Lio/reactivex/internal/operators/maybe/MaybeCreate$Emitter;->tryOnError(Ljava/lang/Throwable;)Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
.line 2
|
|
invoke-static {p1}, Lwh/a;->Y(Ljava/lang/Throwable;)V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public onSuccess(Ljava/lang/Object;)V
|
|
.locals 3
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(TT;)V"
|
|
}
|
|
.end annotation
|
|
|
|
.line 1
|
|
invoke-virtual {p0}, Ljava/util/concurrent/atomic/AtomicReference;->get()Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
sget-object v1, Lio/reactivex/internal/disposables/DisposableHelper;->DISPOSED:Lio/reactivex/internal/disposables/DisposableHelper;
|
|
|
|
if-eq v0, v1, :cond_2
|
|
|
|
.line 2
|
|
invoke-virtual {p0, v1}, Ljava/util/concurrent/atomic/AtomicReference;->getAndSet(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Lio/reactivex/disposables/b;
|
|
|
|
if-eq v0, v1, :cond_2
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
.line 3
|
|
:try_start_0
|
|
iget-object p1, p0, Lio/reactivex/internal/operators/maybe/MaybeCreate$Emitter;->downstream:Lkh/t;
|
|
|
|
new-instance v1, Ljava/lang/NullPointerException;
|
|
|
|
const-string v2, "onSuccess called with null. Null values are generally not allowed in 2.x operators and sources."
|
|
|
|
invoke-direct {v1, v2}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
|
|
|
|
invoke-interface {p1, v1}, Lkh/t;->onError(Ljava/lang/Throwable;)V
|
|
|
|
goto :goto_0
|
|
|
|
.line 4
|
|
:cond_0
|
|
iget-object v1, p0, Lio/reactivex/internal/operators/maybe/MaybeCreate$Emitter;->downstream:Lkh/t;
|
|
|
|
invoke-interface {v1, p1}, Lkh/t;->onSuccess(Ljava/lang/Object;)V
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
:goto_0
|
|
if-eqz v0, :cond_2
|
|
|
|
.line 5
|
|
invoke-interface {v0}, Lio/reactivex/disposables/b;->dispose()V
|
|
|
|
goto :goto_1
|
|
|
|
:catchall_0
|
|
move-exception p1
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
invoke-interface {v0}, Lio/reactivex/disposables/b;->dispose()V
|
|
|
|
:cond_1
|
|
throw p1
|
|
|
|
:cond_2
|
|
:goto_1
|
|
return-void
|
|
.end method
|
|
|
|
.method public setCancellable(Lph/f;)V
|
|
.locals 1
|
|
|
|
.line 1
|
|
new-instance v0, Lio/reactivex/internal/disposables/CancellableDisposable;
|
|
|
|
invoke-direct {v0, p1}, Lio/reactivex/internal/disposables/CancellableDisposable;-><init>(Lph/f;)V
|
|
|
|
invoke-virtual {p0, v0}, Lio/reactivex/internal/operators/maybe/MaybeCreate$Emitter;->setDisposable(Lio/reactivex/disposables/b;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public setDisposable(Lio/reactivex/disposables/b;)V
|
|
.locals 0
|
|
|
|
.line 1
|
|
invoke-static {p0, p1}, Lio/reactivex/internal/disposables/DisposableHelper;->set(Ljava/util/concurrent/atomic/AtomicReference;Lio/reactivex/disposables/b;)Z
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public toString()Ljava/lang/String;
|
|
.locals 3
|
|
|
|
const/4 v0, 0x2
|
|
|
|
new-array v0, v0, [Ljava/lang/Object;
|
|
|
|
.line 1
|
|
const-class v1, Lio/reactivex/internal/operators/maybe/MaybeCreate$Emitter;
|
|
|
|
invoke-virtual {v1}, Ljava/lang/Class;->getSimpleName()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
aput-object v1, v0, v2
|
|
|
|
invoke-super {p0}, Ljava/util/concurrent/atomic/AtomicReference;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
const/4 v2, 0x1
|
|
|
|
aput-object v1, v0, v2
|
|
|
|
const-string v1, "%s{%s}"
|
|
|
|
invoke-static {v1, v0}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public tryOnError(Ljava/lang/Throwable;)Z
|
|
.locals 2
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
.line 1
|
|
new-instance p1, Ljava/lang/NullPointerException;
|
|
|
|
const-string v0, "onError 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
|
|
|
|
.line 2
|
|
:cond_0
|
|
invoke-virtual {p0}, Ljava/util/concurrent/atomic/AtomicReference;->get()Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
sget-object v1, Lio/reactivex/internal/disposables/DisposableHelper;->DISPOSED:Lio/reactivex/internal/disposables/DisposableHelper;
|
|
|
|
if-eq v0, v1, :cond_3
|
|
|
|
.line 3
|
|
invoke-virtual {p0, v1}, Ljava/util/concurrent/atomic/AtomicReference;->getAndSet(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Lio/reactivex/disposables/b;
|
|
|
|
if-eq v0, v1, :cond_3
|
|
|
|
.line 4
|
|
:try_start_0
|
|
iget-object v1, p0, Lio/reactivex/internal/operators/maybe/MaybeCreate$Emitter;->downstream:Lkh/t;
|
|
|
|
invoke-interface {v1, p1}, Lkh/t;->onError(Ljava/lang/Throwable;)V
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
.line 5
|
|
invoke-interface {v0}, Lio/reactivex/disposables/b;->dispose()V
|
|
|
|
:cond_1
|
|
const/4 p1, 0x1
|
|
|
|
return p1
|
|
|
|
:catchall_0
|
|
move-exception p1
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
invoke-interface {v0}, Lio/reactivex/disposables/b;->dispose()V
|
|
|
|
:cond_2
|
|
throw p1
|
|
|
|
:cond_3
|
|
const/4 p1, 0x0
|
|
|
|
return p1
|
|
.end method
|