304 lines
		
	
	
		
			9.0 KiB
		
	
	
	
		
			Smali
		
	
	
	
	
	
			
		
		
	
	
			304 lines
		
	
	
		
			9.0 KiB
		
	
	
	
		
			Smali
		
	
	
	
	
	
| .class abstract Lio/reactivex/internal/operators/flowable/FlowableSampleTimed$SampleTimedSubscriber;
 | |
| .super Ljava/util/concurrent/atomic/AtomicReference;
 | |
| .source "FlowableSampleTimed.java"
 | |
| 
 | |
| # interfaces
 | |
| .implements Lkh/o;
 | |
| .implements Lok/e;
 | |
| .implements Ljava/lang/Runnable;
 | |
| 
 | |
| 
 | |
| # annotations
 | |
| .annotation system Ldalvik/annotation/EnclosingClass;
 | |
|     value = Lio/reactivex/internal/operators/flowable/FlowableSampleTimed;
 | |
| .end annotation
 | |
| 
 | |
| .annotation system Ldalvik/annotation/InnerClass;
 | |
|     accessFlags = 0x409
 | |
|     name = "SampleTimedSubscriber"
 | |
| .end annotation
 | |
| 
 | |
| .annotation system Ldalvik/annotation/Signature;
 | |
|     value = {
 | |
|         "<T:",
 | |
|         "Ljava/lang/Object;",
 | |
|         ">",
 | |
|         "Ljava/util/concurrent/atomic/AtomicReference<",
 | |
|         "TT;>;",
 | |
|         "Lkh/o<",
 | |
|         "TT;>;",
 | |
|         "Lok/e;",
 | |
|         "Ljava/lang/Runnable;"
 | |
|     }
 | |
| .end annotation
 | |
| 
 | |
| 
 | |
| # static fields
 | |
| .field private static final serialVersionUID:J = -0x30d108f96c89b153L
 | |
| 
 | |
| 
 | |
| # instance fields
 | |
| .field public final downstream:Lok/d;
 | |
|     .annotation system Ldalvik/annotation/Signature;
 | |
|         value = {
 | |
|             "Lok/d<",
 | |
|             "-TT;>;"
 | |
|         }
 | |
|     .end annotation
 | |
| .end field
 | |
| 
 | |
| .field public final period:J
 | |
| 
 | |
| .field public final requested:Ljava/util/concurrent/atomic/AtomicLong;
 | |
| 
 | |
| .field public final scheduler:Lkh/h0;
 | |
| 
 | |
| .field public final timer:Lio/reactivex/internal/disposables/SequentialDisposable;
 | |
| 
 | |
| .field public final unit:Ljava/util/concurrent/TimeUnit;
 | |
| 
 | |
| .field public upstream:Lok/e;
 | |
| 
 | |
| 
 | |
| # direct methods
 | |
| .method public constructor <init>(Lok/d;JLjava/util/concurrent/TimeUnit;Lkh/h0;)V
 | |
|     .locals 1
 | |
|     .annotation system Ldalvik/annotation/Signature;
 | |
|         value = {
 | |
|             "(",
 | |
|             "Lok/d<",
 | |
|             "-TT;>;J",
 | |
|             "Ljava/util/concurrent/TimeUnit;",
 | |
|             "Lkh/h0;",
 | |
|             ")V"
 | |
|         }
 | |
|     .end annotation
 | |
| 
 | |
|     .line 1
 | |
|     invoke-direct {p0}, Ljava/util/concurrent/atomic/AtomicReference;-><init>()V
 | |
| 
 | |
|     .line 2
 | |
|     new-instance v0, Ljava/util/concurrent/atomic/AtomicLong;
 | |
| 
 | |
|     invoke-direct {v0}, Ljava/util/concurrent/atomic/AtomicLong;-><init>()V
 | |
| 
 | |
|     iput-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableSampleTimed$SampleTimedSubscriber;->requested:Ljava/util/concurrent/atomic/AtomicLong;
 | |
| 
 | |
|     .line 3
 | |
|     new-instance v0, Lio/reactivex/internal/disposables/SequentialDisposable;
 | |
| 
 | |
|     invoke-direct {v0}, Lio/reactivex/internal/disposables/SequentialDisposable;-><init>()V
 | |
| 
 | |
|     iput-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableSampleTimed$SampleTimedSubscriber;->timer:Lio/reactivex/internal/disposables/SequentialDisposable;
 | |
| 
 | |
|     .line 4
 | |
|     iput-object p1, p0, Lio/reactivex/internal/operators/flowable/FlowableSampleTimed$SampleTimedSubscriber;->downstream:Lok/d;
 | |
| 
 | |
|     .line 5
 | |
|     iput-wide p2, p0, Lio/reactivex/internal/operators/flowable/FlowableSampleTimed$SampleTimedSubscriber;->period:J
 | |
| 
 | |
|     .line 6
 | |
|     iput-object p4, p0, Lio/reactivex/internal/operators/flowable/FlowableSampleTimed$SampleTimedSubscriber;->unit:Ljava/util/concurrent/TimeUnit;
 | |
| 
 | |
|     .line 7
 | |
|     iput-object p5, p0, Lio/reactivex/internal/operators/flowable/FlowableSampleTimed$SampleTimedSubscriber;->scheduler:Lkh/h0;
 | |
| 
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| 
 | |
| # virtual methods
 | |
| .method public cancel()V
 | |
|     .locals 1
 | |
| 
 | |
|     .line 1
 | |
|     invoke-virtual {p0}, Lio/reactivex/internal/operators/flowable/FlowableSampleTimed$SampleTimedSubscriber;->cancelTimer()V
 | |
| 
 | |
|     .line 2
 | |
|     iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableSampleTimed$SampleTimedSubscriber;->upstream:Lok/e;
 | |
| 
 | |
|     invoke-interface {v0}, Lok/e;->cancel()V
 | |
| 
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public cancelTimer()V
 | |
|     .locals 1
 | |
| 
 | |
|     .line 1
 | |
|     iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableSampleTimed$SampleTimedSubscriber;->timer:Lio/reactivex/internal/disposables/SequentialDisposable;
 | |
| 
 | |
|     invoke-static {v0}, Lio/reactivex/internal/disposables/DisposableHelper;->dispose(Ljava/util/concurrent/atomic/AtomicReference;)Z
 | |
| 
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public abstract complete()V
 | |
| .end method
 | |
| 
 | |
| .method public emit()V
 | |
|     .locals 5
 | |
| 
 | |
|     const/4 v0, 0x0
 | |
| 
 | |
|     .line 1
 | |
|     invoke-virtual {p0, v0}, Ljava/util/concurrent/atomic/AtomicReference;->getAndSet(Ljava/lang/Object;)Ljava/lang/Object;
 | |
| 
 | |
|     move-result-object v0
 | |
| 
 | |
|     if-eqz v0, :cond_1
 | |
| 
 | |
|     .line 2
 | |
|     iget-object v1, p0, Lio/reactivex/internal/operators/flowable/FlowableSampleTimed$SampleTimedSubscriber;->requested:Ljava/util/concurrent/atomic/AtomicLong;
 | |
| 
 | |
|     invoke-virtual {v1}, Ljava/util/concurrent/atomic/AtomicLong;->get()J
 | |
| 
 | |
|     move-result-wide v1
 | |
| 
 | |
|     const-wide/16 v3, 0x0
 | |
| 
 | |
|     cmp-long v1, v1, v3
 | |
| 
 | |
|     if-eqz v1, :cond_0
 | |
| 
 | |
|     .line 3
 | |
|     iget-object v1, p0, Lio/reactivex/internal/operators/flowable/FlowableSampleTimed$SampleTimedSubscriber;->downstream:Lok/d;
 | |
| 
 | |
|     invoke-interface {v1, v0}, Lok/d;->onNext(Ljava/lang/Object;)V
 | |
| 
 | |
|     .line 4
 | |
|     iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableSampleTimed$SampleTimedSubscriber;->requested:Ljava/util/concurrent/atomic/AtomicLong;
 | |
| 
 | |
|     const-wide/16 v1, 0x1
 | |
| 
 | |
|     invoke-static {v0, v1, v2}, Lio/reactivex/internal/util/b;->e(Ljava/util/concurrent/atomic/AtomicLong;J)J
 | |
| 
 | |
|     goto :goto_0
 | |
| 
 | |
|     .line 5
 | |
|     :cond_0
 | |
|     invoke-virtual {p0}, Lio/reactivex/internal/operators/flowable/FlowableSampleTimed$SampleTimedSubscriber;->cancel()V
 | |
| 
 | |
|     .line 6
 | |
|     iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableSampleTimed$SampleTimedSubscriber;->downstream:Lok/d;
 | |
| 
 | |
|     new-instance v1, Lio/reactivex/exceptions/MissingBackpressureException;
 | |
| 
 | |
|     const-string v2, "Couldn\'t emit 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 onComplete()V
 | |
|     .locals 0
 | |
| 
 | |
|     .line 1
 | |
|     invoke-virtual {p0}, Lio/reactivex/internal/operators/flowable/FlowableSampleTimed$SampleTimedSubscriber;->cancelTimer()V
 | |
| 
 | |
|     .line 2
 | |
|     invoke-virtual {p0}, Lio/reactivex/internal/operators/flowable/FlowableSampleTimed$SampleTimedSubscriber;->complete()V
 | |
| 
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public onError(Ljava/lang/Throwable;)V
 | |
|     .locals 1
 | |
| 
 | |
|     .line 1
 | |
|     invoke-virtual {p0}, Lio/reactivex/internal/operators/flowable/FlowableSampleTimed$SampleTimedSubscriber;->cancelTimer()V
 | |
| 
 | |
|     .line 2
 | |
|     iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableSampleTimed$SampleTimedSubscriber;->downstream:Lok/d;
 | |
| 
 | |
|     invoke-interface {v0, p1}, Lok/d;->onError(Ljava/lang/Throwable;)V
 | |
| 
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public onNext(Ljava/lang/Object;)V
 | |
|     .locals 0
 | |
|     .annotation system Ldalvik/annotation/Signature;
 | |
|         value = {
 | |
|             "(TT;)V"
 | |
|         }
 | |
|     .end annotation
 | |
| 
 | |
|     .line 1
 | |
|     invoke-virtual {p0, p1}, Ljava/util/concurrent/atomic/AtomicReference;->lazySet(Ljava/lang/Object;)V
 | |
| 
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public onSubscribe(Lok/e;)V
 | |
|     .locals 8
 | |
| 
 | |
|     .line 1
 | |
|     iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableSampleTimed$SampleTimedSubscriber;->upstream:Lok/e;
 | |
| 
 | |
|     invoke-static {v0, p1}, Lio/reactivex/internal/subscriptions/SubscriptionHelper;->validate(Lok/e;Lok/e;)Z
 | |
| 
 | |
|     move-result v0
 | |
| 
 | |
|     if-eqz v0, :cond_0
 | |
| 
 | |
|     .line 2
 | |
|     iput-object p1, p0, Lio/reactivex/internal/operators/flowable/FlowableSampleTimed$SampleTimedSubscriber;->upstream:Lok/e;
 | |
| 
 | |
|     .line 3
 | |
|     iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableSampleTimed$SampleTimedSubscriber;->downstream:Lok/d;
 | |
| 
 | |
|     invoke-interface {v0, p0}, Lok/d;->onSubscribe(Lok/e;)V
 | |
| 
 | |
|     .line 4
 | |
|     iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableSampleTimed$SampleTimedSubscriber;->timer:Lio/reactivex/internal/disposables/SequentialDisposable;
 | |
| 
 | |
|     iget-object v1, p0, Lio/reactivex/internal/operators/flowable/FlowableSampleTimed$SampleTimedSubscriber;->scheduler:Lkh/h0;
 | |
| 
 | |
|     iget-wide v5, p0, Lio/reactivex/internal/operators/flowable/FlowableSampleTimed$SampleTimedSubscriber;->period:J
 | |
| 
 | |
|     iget-object v7, p0, Lio/reactivex/internal/operators/flowable/FlowableSampleTimed$SampleTimedSubscriber;->unit:Ljava/util/concurrent/TimeUnit;
 | |
| 
 | |
|     move-object v2, p0
 | |
| 
 | |
|     move-wide v3, v5
 | |
| 
 | |
|     invoke-virtual/range {v1 .. v7}, Lkh/h0;->g(Ljava/lang/Runnable;JJLjava/util/concurrent/TimeUnit;)Lio/reactivex/disposables/b;
 | |
| 
 | |
|     move-result-object v1
 | |
| 
 | |
|     invoke-virtual {v0, v1}, Lio/reactivex/internal/disposables/SequentialDisposable;->replace(Lio/reactivex/disposables/b;)Z
 | |
| 
 | |
|     const-wide v0, 0x7fffffffffffffffL
 | |
| 
 | |
|     .line 5
 | |
|     invoke-interface {p1, v0, v1}, Lok/e;->request(J)V
 | |
| 
 | |
|     :cond_0
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public request(J)V
 | |
|     .locals 1
 | |
| 
 | |
|     .line 1
 | |
|     invoke-static {p1, p2}, Lio/reactivex/internal/subscriptions/SubscriptionHelper;->validate(J)Z
 | |
| 
 | |
|     move-result v0
 | |
| 
 | |
|     if-eqz v0, :cond_0
 | |
| 
 | |
|     .line 2
 | |
|     iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableSampleTimed$SampleTimedSubscriber;->requested:Ljava/util/concurrent/atomic/AtomicLong;
 | |
| 
 | |
|     invoke-static {v0, p1, p2}, Lio/reactivex/internal/util/b;->a(Ljava/util/concurrent/atomic/AtomicLong;J)J
 | |
| 
 | |
|     :cond_0
 | |
|     return-void
 | |
| .end method
 |