172 lines
4.5 KiB
Smali
172 lines
4.5 KiB
Smali
.class final Lio/reactivex/internal/operators/flowable/FlowableTimer$TimerSubscriber;
|
|
.super Ljava/util/concurrent/atomic/AtomicReference;
|
|
.source "FlowableTimer.java"
|
|
|
|
# interfaces
|
|
.implements Lok/e;
|
|
.implements Ljava/lang/Runnable;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
value = Lio/reactivex/internal/operators/flowable/FlowableTimer;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x19
|
|
name = "TimerSubscriber"
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/concurrent/atomic/AtomicReference<",
|
|
"Lio/reactivex/disposables/b;",
|
|
">;",
|
|
"Lok/e;",
|
|
"Ljava/lang/Runnable;"
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field private static final serialVersionUID:J = -0x26fd42ce5a1686a7L
|
|
|
|
|
|
# instance fields
|
|
.field public final downstream:Lok/d;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lok/d<",
|
|
"-",
|
|
"Ljava/lang/Long;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public volatile requested:Z
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Lok/d;)V
|
|
.locals 0
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Lok/d<",
|
|
"-",
|
|
"Ljava/lang/Long;",
|
|
">;)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/flowable/FlowableTimer$TimerSubscriber;->downstream:Lok/d;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public cancel()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 request(J)V
|
|
.locals 0
|
|
|
|
.line 1
|
|
invoke-static {p1, p2}, Lio/reactivex/internal/subscriptions/SubscriptionHelper;->validate(J)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
const/4 p1, 0x1
|
|
|
|
.line 2
|
|
iput-boolean p1, p0, Lio/reactivex/internal/operators/flowable/FlowableTimer$TimerSubscriber;->requested:Z
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public run()V
|
|
.locals 3
|
|
|
|
.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
|
|
iget-boolean v0, p0, Lio/reactivex/internal/operators/flowable/FlowableTimer$TimerSubscriber;->requested:Z
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 3
|
|
iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableTimer$TimerSubscriber;->downstream:Lok/d;
|
|
|
|
const-wide/16 v1, 0x0
|
|
|
|
invoke-static {v1, v2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-interface {v0, v1}, Lok/d;->onNext(Ljava/lang/Object;)V
|
|
|
|
.line 4
|
|
sget-object v0, Lio/reactivex/internal/disposables/EmptyDisposable;->INSTANCE:Lio/reactivex/internal/disposables/EmptyDisposable;
|
|
|
|
invoke-virtual {p0, v0}, Ljava/util/concurrent/atomic/AtomicReference;->lazySet(Ljava/lang/Object;)V
|
|
|
|
.line 5
|
|
iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableTimer$TimerSubscriber;->downstream:Lok/d;
|
|
|
|
invoke-interface {v0}, Lok/d;->onComplete()V
|
|
|
|
goto :goto_0
|
|
|
|
.line 6
|
|
:cond_0
|
|
sget-object v0, Lio/reactivex/internal/disposables/EmptyDisposable;->INSTANCE:Lio/reactivex/internal/disposables/EmptyDisposable;
|
|
|
|
invoke-virtual {p0, v0}, Ljava/util/concurrent/atomic/AtomicReference;->lazySet(Ljava/lang/Object;)V
|
|
|
|
.line 7
|
|
iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableTimer$TimerSubscriber;->downstream:Lok/d;
|
|
|
|
new-instance v1, Lio/reactivex/exceptions/MissingBackpressureException;
|
|
|
|
const-string v2, "Can\'t deliver value due to lack of requests"
|
|
|
|
invoke-direct {v1, v2}, Lio/reactivex/exceptions/MissingBackpressureException;-><init>(Ljava/lang/String;)V
|
|
|
|
invoke-interface {v0, v1}, Lok/d;->onError(Ljava/lang/Throwable;)V
|
|
|
|
:cond_1
|
|
:goto_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public setResource(Lio/reactivex/disposables/b;)V
|
|
.locals 0
|
|
|
|
.line 1
|
|
invoke-static {p0, p1}, Lio/reactivex/internal/disposables/DisposableHelper;->trySet(Ljava/util/concurrent/atomic/AtomicReference;Lio/reactivex/disposables/b;)Z
|
|
|
|
return-void
|
|
.end method
|