200 lines
		
	
	
		
			5.8 KiB
		
	
	
	
		
			Smali
		
	
	
	
	
	
			
		
		
	
	
			200 lines
		
	
	
		
			5.8 KiB
		
	
	
	
		
			Smali
		
	
	
	
	
	
| .class final Lio/reactivex/internal/operators/flowable/FlowableInterval$IntervalSubscriber;
 | |
| .super Ljava/util/concurrent/atomic/AtomicLong;
 | |
| .source "FlowableInterval.java"
 | |
| 
 | |
| # interfaces
 | |
| .implements Lok/e;
 | |
| .implements Ljava/lang/Runnable;
 | |
| 
 | |
| 
 | |
| # annotations
 | |
| .annotation system Ldalvik/annotation/EnclosingClass;
 | |
|     value = Lio/reactivex/internal/operators/flowable/FlowableInterval;
 | |
| .end annotation
 | |
| 
 | |
| .annotation system Ldalvik/annotation/InnerClass;
 | |
|     accessFlags = 0x19
 | |
|     name = "IntervalSubscriber"
 | |
| .end annotation
 | |
| 
 | |
| 
 | |
| # static fields
 | |
| .field private static final serialVersionUID:J = -0x26fd42ce5a1686a7L
 | |
| 
 | |
| 
 | |
| # instance fields
 | |
| .field public count:J
 | |
| 
 | |
| .field public final downstream:Lok/d;
 | |
|     .annotation system Ldalvik/annotation/Signature;
 | |
|         value = {
 | |
|             "Lok/d<",
 | |
|             "-",
 | |
|             "Ljava/lang/Long;",
 | |
|             ">;"
 | |
|         }
 | |
|     .end annotation
 | |
| .end field
 | |
| 
 | |
| .field public final resource:Ljava/util/concurrent/atomic/AtomicReference;
 | |
|     .annotation system Ldalvik/annotation/Signature;
 | |
|         value = {
 | |
|             "Ljava/util/concurrent/atomic/AtomicReference<",
 | |
|             "Lio/reactivex/disposables/b;",
 | |
|             ">;"
 | |
|         }
 | |
|     .end annotation
 | |
| .end field
 | |
| 
 | |
| 
 | |
| # direct methods
 | |
| .method public constructor <init>(Lok/d;)V
 | |
|     .locals 1
 | |
|     .annotation system Ldalvik/annotation/Signature;
 | |
|         value = {
 | |
|             "(",
 | |
|             "Lok/d<",
 | |
|             "-",
 | |
|             "Ljava/lang/Long;",
 | |
|             ">;)V"
 | |
|         }
 | |
|     .end annotation
 | |
| 
 | |
|     .line 1
 | |
|     invoke-direct {p0}, Ljava/util/concurrent/atomic/AtomicLong;-><init>()V
 | |
| 
 | |
|     .line 2
 | |
|     new-instance v0, Ljava/util/concurrent/atomic/AtomicReference;
 | |
| 
 | |
|     invoke-direct {v0}, Ljava/util/concurrent/atomic/AtomicReference;-><init>()V
 | |
| 
 | |
|     iput-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableInterval$IntervalSubscriber;->resource:Ljava/util/concurrent/atomic/AtomicReference;
 | |
| 
 | |
|     .line 3
 | |
|     iput-object p1, p0, Lio/reactivex/internal/operators/flowable/FlowableInterval$IntervalSubscriber;->downstream:Lok/d;
 | |
| 
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| 
 | |
| # virtual methods
 | |
| .method public cancel()V
 | |
|     .locals 1
 | |
| 
 | |
|     .line 1
 | |
|     iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableInterval$IntervalSubscriber;->resource:Ljava/util/concurrent/atomic/AtomicReference;
 | |
| 
 | |
|     invoke-static {v0}, Lio/reactivex/internal/disposables/DisposableHelper;->dispose(Ljava/util/concurrent/atomic/AtomicReference;)Z
 | |
| 
 | |
|     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
 | |
|     invoke-static {p0, p1, p2}, Lio/reactivex/internal/util/b;->a(Ljava/util/concurrent/atomic/AtomicLong;J)J
 | |
| 
 | |
|     :cond_0
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public run()V
 | |
|     .locals 7
 | |
| 
 | |
|     .line 1
 | |
|     iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableInterval$IntervalSubscriber;->resource:Ljava/util/concurrent/atomic/AtomicReference;
 | |
| 
 | |
|     invoke-virtual {v0}, 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}, Ljava/util/concurrent/atomic/AtomicLong;->get()J
 | |
| 
 | |
|     move-result-wide v0
 | |
| 
 | |
|     const-wide/16 v2, 0x0
 | |
| 
 | |
|     cmp-long v0, v0, v2
 | |
| 
 | |
|     if-eqz v0, :cond_0
 | |
| 
 | |
|     .line 3
 | |
|     iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableInterval$IntervalSubscriber;->downstream:Lok/d;
 | |
| 
 | |
|     iget-wide v1, p0, Lio/reactivex/internal/operators/flowable/FlowableInterval$IntervalSubscriber;->count:J
 | |
| 
 | |
|     const-wide/16 v3, 0x1
 | |
| 
 | |
|     add-long v5, v1, v3
 | |
| 
 | |
|     iput-wide v5, p0, Lio/reactivex/internal/operators/flowable/FlowableInterval$IntervalSubscriber;->count:J
 | |
| 
 | |
|     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
 | |
|     invoke-static {p0, v3, v4}, Lio/reactivex/internal/util/b;->e(Ljava/util/concurrent/atomic/AtomicLong;J)J
 | |
| 
 | |
|     goto :goto_0
 | |
| 
 | |
|     .line 5
 | |
|     :cond_0
 | |
|     iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableInterval$IntervalSubscriber;->downstream:Lok/d;
 | |
| 
 | |
|     new-instance v1, Lio/reactivex/exceptions/MissingBackpressureException;
 | |
| 
 | |
|     const-string v2, "Can\'t deliver value "
 | |
| 
 | |
|     invoke-static {v2}, Landroid/support/v4/media/d;->a(Ljava/lang/String;)Ljava/lang/StringBuilder;
 | |
| 
 | |
|     move-result-object v2
 | |
| 
 | |
|     iget-wide v3, p0, Lio/reactivex/internal/operators/flowable/FlowableInterval$IntervalSubscriber;->count:J
 | |
| 
 | |
|     const-string v5, " due to lack of requests"
 | |
| 
 | |
|     invoke-static {v2, v3, v4, v5}, Landroid/support/v4/media/session/a;->a(Ljava/lang/StringBuilder;JLjava/lang/String;)Ljava/lang/String;
 | |
| 
 | |
|     move-result-object v2
 | |
| 
 | |
|     invoke-direct {v1, v2}, Lio/reactivex/exceptions/MissingBackpressureException;-><init>(Ljava/lang/String;)V
 | |
| 
 | |
|     invoke-interface {v0, v1}, Lok/d;->onError(Ljava/lang/Throwable;)V
 | |
| 
 | |
|     .line 6
 | |
|     iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableInterval$IntervalSubscriber;->resource:Ljava/util/concurrent/atomic/AtomicReference;
 | |
| 
 | |
|     invoke-static {v0}, Lio/reactivex/internal/disposables/DisposableHelper;->dispose(Ljava/util/concurrent/atomic/AtomicReference;)Z
 | |
| 
 | |
|     :cond_1
 | |
|     :goto_0
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public setResource(Lio/reactivex/disposables/b;)V
 | |
|     .locals 1
 | |
| 
 | |
|     .line 1
 | |
|     iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableInterval$IntervalSubscriber;->resource:Ljava/util/concurrent/atomic/AtomicReference;
 | |
| 
 | |
|     invoke-static {v0, p1}, Lio/reactivex/internal/disposables/DisposableHelper;->setOnce(Ljava/util/concurrent/atomic/AtomicReference;Lio/reactivex/disposables/b;)Z
 | |
| 
 | |
|     return-void
 | |
| .end method
 |