tmap/smali_classes5/io/reactivex/internal/operators/observable/ObservableUsing$UsingObserver.smali
2022-06-10 21:38:30 +09:00

368 lines
9.7 KiB
Smali

.class final Lio/reactivex/internal/operators/observable/ObservableUsing$UsingObserver;
.super Ljava/util/concurrent/atomic/AtomicBoolean;
.source "ObservableUsing.java"
# interfaces
.implements Lkh/g0;
.implements Lio/reactivex/disposables/b;
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lio/reactivex/internal/operators/observable/ObservableUsing;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x19
name = "UsingObserver"
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
"D:",
"Ljava/lang/Object;",
">",
"Ljava/util/concurrent/atomic/AtomicBoolean;",
"Lkh/g0<",
"TT;>;",
"Lio/reactivex/disposables/b;"
}
.end annotation
# static fields
.field private static final serialVersionUID:J = 0x51f0e7a17ed319a6L
# instance fields
.field public final disposer:Lph/g;
.annotation system Ldalvik/annotation/Signature;
value = {
"Lph/g<",
"-TD;>;"
}
.end annotation
.end field
.field public final downstream:Lkh/g0;
.annotation system Ldalvik/annotation/Signature;
value = {
"Lkh/g0<",
"-TT;>;"
}
.end annotation
.end field
.field public final eager:Z
.field public final resource:Ljava/lang/Object;
.annotation system Ldalvik/annotation/Signature;
value = {
"TD;"
}
.end annotation
.end field
.field public upstream:Lio/reactivex/disposables/b;
# direct methods
.method public constructor <init>(Lkh/g0;Ljava/lang/Object;Lph/g;Z)V
.locals 0
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lkh/g0<",
"-TT;>;TD;",
"Lph/g<",
"-TD;>;Z)V"
}
.end annotation
.line 1
invoke-direct {p0}, Ljava/util/concurrent/atomic/AtomicBoolean;-><init>()V
.line 2
iput-object p1, p0, Lio/reactivex/internal/operators/observable/ObservableUsing$UsingObserver;->downstream:Lkh/g0;
.line 3
iput-object p2, p0, Lio/reactivex/internal/operators/observable/ObservableUsing$UsingObserver;->resource:Ljava/lang/Object;
.line 4
iput-object p3, p0, Lio/reactivex/internal/operators/observable/ObservableUsing$UsingObserver;->disposer:Lph/g;
.line 5
iput-boolean p4, p0, Lio/reactivex/internal/operators/observable/ObservableUsing$UsingObserver;->eager:Z
return-void
.end method
# virtual methods
.method public dispose()V
.locals 1
.line 1
invoke-virtual {p0}, Lio/reactivex/internal/operators/observable/ObservableUsing$UsingObserver;->disposeAfter()V
.line 2
iget-object v0, p0, Lio/reactivex/internal/operators/observable/ObservableUsing$UsingObserver;->upstream:Lio/reactivex/disposables/b;
invoke-interface {v0}, Lio/reactivex/disposables/b;->dispose()V
return-void
.end method
.method public disposeAfter()V
.locals 2
const/4 v0, 0x0
const/4 v1, 0x1
.line 1
invoke-virtual {p0, v0, v1}, Ljava/util/concurrent/atomic/AtomicBoolean;->compareAndSet(ZZ)Z
move-result v0
if-eqz v0, :cond_0
.line 2
:try_start_0
iget-object v0, p0, Lio/reactivex/internal/operators/observable/ObservableUsing$UsingObserver;->disposer:Lph/g;
iget-object v1, p0, Lio/reactivex/internal/operators/observable/ObservableUsing$UsingObserver;->resource:Ljava/lang/Object;
invoke-interface {v0, v1}, Lph/g;->accept(Ljava/lang/Object;)V
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
goto :goto_0
:catchall_0
move-exception v0
.line 3
invoke-static {v0}, Lio/reactivex/exceptions/a;->b(Ljava/lang/Throwable;)V
.line 4
invoke-static {v0}, Lwh/a;->Y(Ljava/lang/Throwable;)V
:cond_0
:goto_0
return-void
.end method
.method public isDisposed()Z
.locals 1
.line 1
invoke-virtual {p0}, Ljava/util/concurrent/atomic/AtomicBoolean;->get()Z
move-result v0
return v0
.end method
.method public onComplete()V
.locals 2
.line 1
iget-boolean v0, p0, Lio/reactivex/internal/operators/observable/ObservableUsing$UsingObserver;->eager:Z
if-eqz v0, :cond_1
const/4 v0, 0x0
const/4 v1, 0x1
.line 2
invoke-virtual {p0, v0, v1}, Ljava/util/concurrent/atomic/AtomicBoolean;->compareAndSet(ZZ)Z
move-result v0
if-eqz v0, :cond_0
.line 3
:try_start_0
iget-object v0, p0, Lio/reactivex/internal/operators/observable/ObservableUsing$UsingObserver;->disposer:Lph/g;
iget-object v1, p0, Lio/reactivex/internal/operators/observable/ObservableUsing$UsingObserver;->resource:Ljava/lang/Object;
invoke-interface {v0, v1}, Lph/g;->accept(Ljava/lang/Object;)V
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
goto :goto_0
:catchall_0
move-exception v0
.line 4
invoke-static {v0}, Lio/reactivex/exceptions/a;->b(Ljava/lang/Throwable;)V
.line 5
iget-object v1, p0, Lio/reactivex/internal/operators/observable/ObservableUsing$UsingObserver;->downstream:Lkh/g0;
invoke-interface {v1, v0}, Lkh/g0;->onError(Ljava/lang/Throwable;)V
return-void
.line 6
:cond_0
:goto_0
iget-object v0, p0, Lio/reactivex/internal/operators/observable/ObservableUsing$UsingObserver;->upstream:Lio/reactivex/disposables/b;
invoke-interface {v0}, Lio/reactivex/disposables/b;->dispose()V
.line 7
iget-object v0, p0, Lio/reactivex/internal/operators/observable/ObservableUsing$UsingObserver;->downstream:Lkh/g0;
invoke-interface {v0}, Lkh/g0;->onComplete()V
goto :goto_1
.line 8
:cond_1
iget-object v0, p0, Lio/reactivex/internal/operators/observable/ObservableUsing$UsingObserver;->downstream:Lkh/g0;
invoke-interface {v0}, Lkh/g0;->onComplete()V
.line 9
iget-object v0, p0, Lio/reactivex/internal/operators/observable/ObservableUsing$UsingObserver;->upstream:Lio/reactivex/disposables/b;
invoke-interface {v0}, Lio/reactivex/disposables/b;->dispose()V
.line 10
invoke-virtual {p0}, Lio/reactivex/internal/operators/observable/ObservableUsing$UsingObserver;->disposeAfter()V
:goto_1
return-void
.end method
.method public onError(Ljava/lang/Throwable;)V
.locals 5
.line 1
iget-boolean v0, p0, Lio/reactivex/internal/operators/observable/ObservableUsing$UsingObserver;->eager:Z
if-eqz v0, :cond_1
const/4 v0, 0x0
const/4 v1, 0x1
.line 2
invoke-virtual {p0, v0, v1}, Ljava/util/concurrent/atomic/AtomicBoolean;->compareAndSet(ZZ)Z
move-result v2
if-eqz v2, :cond_0
.line 3
:try_start_0
iget-object v2, p0, Lio/reactivex/internal/operators/observable/ObservableUsing$UsingObserver;->disposer:Lph/g;
iget-object v3, p0, Lio/reactivex/internal/operators/observable/ObservableUsing$UsingObserver;->resource:Ljava/lang/Object;
invoke-interface {v2, v3}, Lph/g;->accept(Ljava/lang/Object;)V
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
goto :goto_0
:catchall_0
move-exception v2
.line 4
invoke-static {v2}, Lio/reactivex/exceptions/a;->b(Ljava/lang/Throwable;)V
.line 5
new-instance v3, Lio/reactivex/exceptions/CompositeException;
const/4 v4, 0x2
new-array v4, v4, [Ljava/lang/Throwable;
aput-object p1, v4, v0
aput-object v2, v4, v1
invoke-direct {v3, v4}, Lio/reactivex/exceptions/CompositeException;-><init>([Ljava/lang/Throwable;)V
move-object p1, v3
.line 6
:cond_0
:goto_0
iget-object v0, p0, Lio/reactivex/internal/operators/observable/ObservableUsing$UsingObserver;->upstream:Lio/reactivex/disposables/b;
invoke-interface {v0}, Lio/reactivex/disposables/b;->dispose()V
.line 7
iget-object v0, p0, Lio/reactivex/internal/operators/observable/ObservableUsing$UsingObserver;->downstream:Lkh/g0;
invoke-interface {v0, p1}, Lkh/g0;->onError(Ljava/lang/Throwable;)V
goto :goto_1
.line 8
:cond_1
iget-object v0, p0, Lio/reactivex/internal/operators/observable/ObservableUsing$UsingObserver;->downstream:Lkh/g0;
invoke-interface {v0, p1}, Lkh/g0;->onError(Ljava/lang/Throwable;)V
.line 9
iget-object p1, p0, Lio/reactivex/internal/operators/observable/ObservableUsing$UsingObserver;->upstream:Lio/reactivex/disposables/b;
invoke-interface {p1}, Lio/reactivex/disposables/b;->dispose()V
.line 10
invoke-virtual {p0}, Lio/reactivex/internal/operators/observable/ObservableUsing$UsingObserver;->disposeAfter()V
:goto_1
return-void
.end method
.method public onNext(Ljava/lang/Object;)V
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"(TT;)V"
}
.end annotation
.line 1
iget-object v0, p0, Lio/reactivex/internal/operators/observable/ObservableUsing$UsingObserver;->downstream:Lkh/g0;
invoke-interface {v0, p1}, Lkh/g0;->onNext(Ljava/lang/Object;)V
return-void
.end method
.method public onSubscribe(Lio/reactivex/disposables/b;)V
.locals 1
.line 1
iget-object v0, p0, Lio/reactivex/internal/operators/observable/ObservableUsing$UsingObserver;->upstream:Lio/reactivex/disposables/b;
invoke-static {v0, p1}, Lio/reactivex/internal/disposables/DisposableHelper;->validate(Lio/reactivex/disposables/b;Lio/reactivex/disposables/b;)Z
move-result v0
if-eqz v0, :cond_0
.line 2
iput-object p1, p0, Lio/reactivex/internal/operators/observable/ObservableUsing$UsingObserver;->upstream:Lio/reactivex/disposables/b;
.line 3
iget-object p1, p0, Lio/reactivex/internal/operators/observable/ObservableUsing$UsingObserver;->downstream:Lkh/g0;
invoke-interface {p1, p0}, Lkh/g0;->onSubscribe(Lio/reactivex/disposables/b;)V
:cond_0
return-void
.end method