188 lines
5.7 KiB
Smali
188 lines
5.7 KiB
Smali
.class public final Lio/reactivex/internal/operators/flowable/FlowableReplay$f;
|
|
.super Ljava/lang/Object;
|
|
.source "FlowableReplay.java"
|
|
|
|
# interfaces
|
|
.implements Lok/c;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
value = Lio/reactivex/internal/operators/flowable/FlowableReplay;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x19
|
|
name = "f"
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"<T:",
|
|
"Ljava/lang/Object;",
|
|
">",
|
|
"Ljava/lang/Object;",
|
|
"Lok/c<",
|
|
"TT;>;"
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field public final a:Ljava/util/concurrent/atomic/AtomicReference;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/concurrent/atomic/AtomicReference<",
|
|
"Lio/reactivex/internal/operators/flowable/FlowableReplay$ReplaySubscriber<",
|
|
"TT;>;>;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public final b:Ljava/util/concurrent/Callable;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/concurrent/Callable<",
|
|
"+",
|
|
"Lio/reactivex/internal/operators/flowable/FlowableReplay$d<",
|
|
"TT;>;>;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Ljava/util/concurrent/atomic/AtomicReference;Ljava/util/concurrent/Callable;)V
|
|
.locals 0
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/util/concurrent/atomic/AtomicReference<",
|
|
"Lio/reactivex/internal/operators/flowable/FlowableReplay$ReplaySubscriber<",
|
|
"TT;>;>;",
|
|
"Ljava/util/concurrent/Callable<",
|
|
"+",
|
|
"Lio/reactivex/internal/operators/flowable/FlowableReplay$d<",
|
|
"TT;>;>;)V"
|
|
}
|
|
.end annotation
|
|
|
|
.line 1
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
.line 2
|
|
iput-object p1, p0, Lio/reactivex/internal/operators/flowable/FlowableReplay$f;->a:Ljava/util/concurrent/atomic/AtomicReference;
|
|
|
|
.line 3
|
|
iput-object p2, p0, Lio/reactivex/internal/operators/flowable/FlowableReplay$f;->b:Ljava/util/concurrent/Callable;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public subscribe(Lok/d;)V
|
|
.locals 3
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Lok/d<",
|
|
"-TT;>;)V"
|
|
}
|
|
.end annotation
|
|
|
|
.line 1
|
|
:goto_0
|
|
iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableReplay$f;->a:Ljava/util/concurrent/atomic/AtomicReference;
|
|
|
|
invoke-virtual {v0}, Ljava/util/concurrent/atomic/AtomicReference;->get()Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Lio/reactivex/internal/operators/flowable/FlowableReplay$ReplaySubscriber;
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
.line 2
|
|
:try_start_0
|
|
iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableReplay$f;->b:Ljava/util/concurrent/Callable;
|
|
|
|
invoke-interface {v0}, Ljava/util/concurrent/Callable;->call()Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Lio/reactivex/internal/operators/flowable/FlowableReplay$d;
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
.line 3
|
|
new-instance v1, Lio/reactivex/internal/operators/flowable/FlowableReplay$ReplaySubscriber;
|
|
|
|
invoke-direct {v1, v0}, Lio/reactivex/internal/operators/flowable/FlowableReplay$ReplaySubscriber;-><init>(Lio/reactivex/internal/operators/flowable/FlowableReplay$d;)V
|
|
|
|
.line 4
|
|
iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableReplay$f;->a:Ljava/util/concurrent/atomic/AtomicReference;
|
|
|
|
const/4 v2, 0x0
|
|
|
|
invoke-virtual {v0, v2, v1}, Ljava/util/concurrent/atomic/AtomicReference;->compareAndSet(Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
move-object v0, v1
|
|
|
|
goto :goto_1
|
|
|
|
:catchall_0
|
|
move-exception v0
|
|
|
|
.line 5
|
|
invoke-static {v0}, Lio/reactivex/exceptions/a;->b(Ljava/lang/Throwable;)V
|
|
|
|
.line 6
|
|
invoke-static {v0, p1}, Lio/reactivex/internal/subscriptions/EmptySubscription;->error(Ljava/lang/Throwable;Lok/d;)V
|
|
|
|
return-void
|
|
|
|
.line 7
|
|
:cond_1
|
|
:goto_1
|
|
new-instance v1, Lio/reactivex/internal/operators/flowable/FlowableReplay$InnerSubscription;
|
|
|
|
invoke-direct {v1, v0, p1}, Lio/reactivex/internal/operators/flowable/FlowableReplay$InnerSubscription;-><init>(Lio/reactivex/internal/operators/flowable/FlowableReplay$ReplaySubscriber;Lok/d;)V
|
|
|
|
.line 8
|
|
invoke-interface {p1, v1}, Lok/d;->onSubscribe(Lok/e;)V
|
|
|
|
.line 9
|
|
invoke-virtual {v0, v1}, Lio/reactivex/internal/operators/flowable/FlowableReplay$ReplaySubscriber;->add(Lio/reactivex/internal/operators/flowable/FlowableReplay$InnerSubscription;)Z
|
|
|
|
.line 10
|
|
invoke-virtual {v1}, Lio/reactivex/internal/operators/flowable/FlowableReplay$InnerSubscription;->isDisposed()Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
.line 11
|
|
invoke-virtual {v0, v1}, Lio/reactivex/internal/operators/flowable/FlowableReplay$ReplaySubscriber;->remove(Lio/reactivex/internal/operators/flowable/FlowableReplay$InnerSubscription;)V
|
|
|
|
return-void
|
|
|
|
.line 12
|
|
:cond_2
|
|
invoke-virtual {v0}, Lio/reactivex/internal/operators/flowable/FlowableReplay$ReplaySubscriber;->manageRequests()V
|
|
|
|
.line 13
|
|
iget-object p1, v0, Lio/reactivex/internal/operators/flowable/FlowableReplay$ReplaySubscriber;->buffer:Lio/reactivex/internal/operators/flowable/FlowableReplay$d;
|
|
|
|
invoke-interface {p1, v1}, Lio/reactivex/internal/operators/flowable/FlowableReplay$d;->replay(Lio/reactivex/internal/operators/flowable/FlowableReplay$InnerSubscription;)V
|
|
|
|
return-void
|
|
.end method
|