433 lines
		
	
	
		
			11 KiB
		
	
	
	
		
			Smali
		
	
	
	
	
	
			
		
		
	
	
			433 lines
		
	
	
		
			11 KiB
		
	
	
	
		
			Smali
		
	
	
	
	
	
| .class final Lio/reactivex/internal/operators/flowable/FlowableOnBackpressureLatest$BackpressureLatestSubscriber;
 | |
| .super Ljava/util/concurrent/atomic/AtomicInteger;
 | |
| .source "FlowableOnBackpressureLatest.java"
 | |
| 
 | |
| # interfaces
 | |
| .implements Lkh/o;
 | |
| .implements Lok/e;
 | |
| 
 | |
| 
 | |
| # annotations
 | |
| .annotation system Ldalvik/annotation/EnclosingClass;
 | |
|     value = Lio/reactivex/internal/operators/flowable/FlowableOnBackpressureLatest;
 | |
| .end annotation
 | |
| 
 | |
| .annotation system Ldalvik/annotation/InnerClass;
 | |
|     accessFlags = 0x19
 | |
|     name = "BackpressureLatestSubscriber"
 | |
| .end annotation
 | |
| 
 | |
| .annotation system Ldalvik/annotation/Signature;
 | |
|     value = {
 | |
|         "<T:",
 | |
|         "Ljava/lang/Object;",
 | |
|         ">",
 | |
|         "Ljava/util/concurrent/atomic/AtomicInteger;",
 | |
|         "Lkh/o<",
 | |
|         "TT;>;",
 | |
|         "Lok/e;"
 | |
|     }
 | |
| .end annotation
 | |
| 
 | |
| 
 | |
| # static fields
 | |
| .field private static final serialVersionUID:J = 0x24360dbf312449bL
 | |
| 
 | |
| 
 | |
| # instance fields
 | |
| .field public volatile cancelled:Z
 | |
| 
 | |
| .field public final current:Ljava/util/concurrent/atomic/AtomicReference;
 | |
|     .annotation system Ldalvik/annotation/Signature;
 | |
|         value = {
 | |
|             "Ljava/util/concurrent/atomic/AtomicReference<",
 | |
|             "TT;>;"
 | |
|         }
 | |
|     .end annotation
 | |
| .end field
 | |
| 
 | |
| .field public volatile done:Z
 | |
| 
 | |
| .field public final downstream:Lok/d;
 | |
|     .annotation system Ldalvik/annotation/Signature;
 | |
|         value = {
 | |
|             "Lok/d<",
 | |
|             "-TT;>;"
 | |
|         }
 | |
|     .end annotation
 | |
| .end field
 | |
| 
 | |
| .field public error:Ljava/lang/Throwable;
 | |
| 
 | |
| .field public final requested:Ljava/util/concurrent/atomic/AtomicLong;
 | |
| 
 | |
| .field public upstream:Lok/e;
 | |
| 
 | |
| 
 | |
| # direct methods
 | |
| .method public constructor <init>(Lok/d;)V
 | |
|     .locals 1
 | |
|     .annotation system Ldalvik/annotation/Signature;
 | |
|         value = {
 | |
|             "(",
 | |
|             "Lok/d<",
 | |
|             "-TT;>;)V"
 | |
|         }
 | |
|     .end annotation
 | |
| 
 | |
|     .line 1
 | |
|     invoke-direct {p0}, Ljava/util/concurrent/atomic/AtomicInteger;-><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/FlowableOnBackpressureLatest$BackpressureLatestSubscriber;->requested:Ljava/util/concurrent/atomic/AtomicLong;
 | |
| 
 | |
|     .line 3
 | |
|     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/FlowableOnBackpressureLatest$BackpressureLatestSubscriber;->current:Ljava/util/concurrent/atomic/AtomicReference;
 | |
| 
 | |
|     .line 4
 | |
|     iput-object p1, p0, Lio/reactivex/internal/operators/flowable/FlowableOnBackpressureLatest$BackpressureLatestSubscriber;->downstream:Lok/d;
 | |
| 
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| 
 | |
| # virtual methods
 | |
| .method public cancel()V
 | |
|     .locals 2
 | |
| 
 | |
|     .line 1
 | |
|     iget-boolean v0, p0, Lio/reactivex/internal/operators/flowable/FlowableOnBackpressureLatest$BackpressureLatestSubscriber;->cancelled:Z
 | |
| 
 | |
|     if-nez v0, :cond_0
 | |
| 
 | |
|     const/4 v0, 0x1
 | |
| 
 | |
|     .line 2
 | |
|     iput-boolean v0, p0, Lio/reactivex/internal/operators/flowable/FlowableOnBackpressureLatest$BackpressureLatestSubscriber;->cancelled:Z
 | |
| 
 | |
|     .line 3
 | |
|     iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableOnBackpressureLatest$BackpressureLatestSubscriber;->upstream:Lok/e;
 | |
| 
 | |
|     invoke-interface {v0}, Lok/e;->cancel()V
 | |
| 
 | |
|     .line 4
 | |
|     invoke-virtual {p0}, Ljava/util/concurrent/atomic/AtomicInteger;->getAndIncrement()I
 | |
| 
 | |
|     move-result v0
 | |
| 
 | |
|     if-nez v0, :cond_0
 | |
| 
 | |
|     .line 5
 | |
|     iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableOnBackpressureLatest$BackpressureLatestSubscriber;->current:Ljava/util/concurrent/atomic/AtomicReference;
 | |
| 
 | |
|     const/4 v1, 0x0
 | |
| 
 | |
|     invoke-virtual {v0, v1}, Ljava/util/concurrent/atomic/AtomicReference;->lazySet(Ljava/lang/Object;)V
 | |
| 
 | |
|     :cond_0
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public checkTerminated(ZZLok/d;Ljava/util/concurrent/atomic/AtomicReference;)Z
 | |
|     .locals 3
 | |
|     .annotation system Ldalvik/annotation/Signature;
 | |
|         value = {
 | |
|             "(ZZ",
 | |
|             "Lok/d<",
 | |
|             "*>;",
 | |
|             "Ljava/util/concurrent/atomic/AtomicReference<",
 | |
|             "TT;>;)Z"
 | |
|         }
 | |
|     .end annotation
 | |
| 
 | |
|     .line 1
 | |
|     iget-boolean v0, p0, Lio/reactivex/internal/operators/flowable/FlowableOnBackpressureLatest$BackpressureLatestSubscriber;->cancelled:Z
 | |
| 
 | |
|     const/4 v1, 0x0
 | |
| 
 | |
|     const/4 v2, 0x1
 | |
| 
 | |
|     if-eqz v0, :cond_0
 | |
| 
 | |
|     .line 2
 | |
|     invoke-virtual {p4, v1}, Ljava/util/concurrent/atomic/AtomicReference;->lazySet(Ljava/lang/Object;)V
 | |
| 
 | |
|     return v2
 | |
| 
 | |
|     :cond_0
 | |
|     if-eqz p1, :cond_2
 | |
| 
 | |
|     .line 3
 | |
|     iget-object p1, p0, Lio/reactivex/internal/operators/flowable/FlowableOnBackpressureLatest$BackpressureLatestSubscriber;->error:Ljava/lang/Throwable;
 | |
| 
 | |
|     if-eqz p1, :cond_1
 | |
| 
 | |
|     .line 4
 | |
|     invoke-virtual {p4, v1}, Ljava/util/concurrent/atomic/AtomicReference;->lazySet(Ljava/lang/Object;)V
 | |
| 
 | |
|     .line 5
 | |
|     invoke-interface {p3, p1}, Lok/d;->onError(Ljava/lang/Throwable;)V
 | |
| 
 | |
|     return v2
 | |
| 
 | |
|     :cond_1
 | |
|     if-eqz p2, :cond_2
 | |
| 
 | |
|     .line 6
 | |
|     invoke-interface {p3}, Lok/d;->onComplete()V
 | |
| 
 | |
|     return v2
 | |
| 
 | |
|     :cond_2
 | |
|     const/4 p1, 0x0
 | |
| 
 | |
|     return p1
 | |
| .end method
 | |
| 
 | |
| .method public drain()V
 | |
|     .locals 13
 | |
| 
 | |
|     .line 1
 | |
|     invoke-virtual {p0}, Ljava/util/concurrent/atomic/AtomicInteger;->getAndIncrement()I
 | |
| 
 | |
|     move-result v0
 | |
| 
 | |
|     if-eqz v0, :cond_0
 | |
| 
 | |
|     return-void
 | |
| 
 | |
|     .line 2
 | |
|     :cond_0
 | |
|     iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableOnBackpressureLatest$BackpressureLatestSubscriber;->downstream:Lok/d;
 | |
| 
 | |
|     .line 3
 | |
|     iget-object v1, p0, Lio/reactivex/internal/operators/flowable/FlowableOnBackpressureLatest$BackpressureLatestSubscriber;->requested:Ljava/util/concurrent/atomic/AtomicLong;
 | |
| 
 | |
|     .line 4
 | |
|     iget-object v2, p0, Lio/reactivex/internal/operators/flowable/FlowableOnBackpressureLatest$BackpressureLatestSubscriber;->current:Ljava/util/concurrent/atomic/AtomicReference;
 | |
| 
 | |
|     const/4 v3, 0x1
 | |
| 
 | |
|     move v4, v3
 | |
| 
 | |
|     :cond_1
 | |
|     const-wide/16 v5, 0x0
 | |
| 
 | |
|     move-wide v7, v5
 | |
| 
 | |
|     .line 5
 | |
|     :goto_0
 | |
|     invoke-virtual {v1}, Ljava/util/concurrent/atomic/AtomicLong;->get()J
 | |
| 
 | |
|     move-result-wide v9
 | |
| 
 | |
|     cmp-long v9, v7, v9
 | |
| 
 | |
|     const/4 v10, 0x0
 | |
| 
 | |
|     if-eqz v9, :cond_5
 | |
| 
 | |
|     .line 6
 | |
|     iget-boolean v9, p0, Lio/reactivex/internal/operators/flowable/FlowableOnBackpressureLatest$BackpressureLatestSubscriber;->done:Z
 | |
| 
 | |
|     const/4 v11, 0x0
 | |
| 
 | |
|     .line 7
 | |
|     invoke-virtual {v2, v11}, Ljava/util/concurrent/atomic/AtomicReference;->getAndSet(Ljava/lang/Object;)Ljava/lang/Object;
 | |
| 
 | |
|     move-result-object v11
 | |
| 
 | |
|     if-nez v11, :cond_2
 | |
| 
 | |
|     move v12, v3
 | |
| 
 | |
|     goto :goto_1
 | |
| 
 | |
|     :cond_2
 | |
|     move v12, v10
 | |
| 
 | |
|     .line 8
 | |
|     :goto_1
 | |
|     invoke-virtual {p0, v9, v12, v0, v2}, Lio/reactivex/internal/operators/flowable/FlowableOnBackpressureLatest$BackpressureLatestSubscriber;->checkTerminated(ZZLok/d;Ljava/util/concurrent/atomic/AtomicReference;)Z
 | |
| 
 | |
|     move-result v9
 | |
| 
 | |
|     if-eqz v9, :cond_3
 | |
| 
 | |
|     return-void
 | |
| 
 | |
|     :cond_3
 | |
|     if-eqz v12, :cond_4
 | |
| 
 | |
|     goto :goto_2
 | |
| 
 | |
|     .line 9
 | |
|     :cond_4
 | |
|     invoke-interface {v0, v11}, Lok/d;->onNext(Ljava/lang/Object;)V
 | |
| 
 | |
|     const-wide/16 v9, 0x1
 | |
| 
 | |
|     add-long/2addr v7, v9
 | |
| 
 | |
|     goto :goto_0
 | |
| 
 | |
|     .line 10
 | |
|     :cond_5
 | |
|     :goto_2
 | |
|     invoke-virtual {v1}, Ljava/util/concurrent/atomic/AtomicLong;->get()J
 | |
| 
 | |
|     move-result-wide v11
 | |
| 
 | |
|     cmp-long v9, v7, v11
 | |
| 
 | |
|     if-nez v9, :cond_7
 | |
| 
 | |
|     iget-boolean v9, p0, Lio/reactivex/internal/operators/flowable/FlowableOnBackpressureLatest$BackpressureLatestSubscriber;->done:Z
 | |
| 
 | |
|     invoke-virtual {v2}, Ljava/util/concurrent/atomic/AtomicReference;->get()Ljava/lang/Object;
 | |
| 
 | |
|     move-result-object v11
 | |
| 
 | |
|     if-nez v11, :cond_6
 | |
| 
 | |
|     move v10, v3
 | |
| 
 | |
|     :cond_6
 | |
|     invoke-virtual {p0, v9, v10, v0, v2}, Lio/reactivex/internal/operators/flowable/FlowableOnBackpressureLatest$BackpressureLatestSubscriber;->checkTerminated(ZZLok/d;Ljava/util/concurrent/atomic/AtomicReference;)Z
 | |
| 
 | |
|     move-result v9
 | |
| 
 | |
|     if-eqz v9, :cond_7
 | |
| 
 | |
|     return-void
 | |
| 
 | |
|     :cond_7
 | |
|     cmp-long v5, v7, v5
 | |
| 
 | |
|     if-eqz v5, :cond_8
 | |
| 
 | |
|     .line 11
 | |
|     invoke-static {v1, v7, v8}, Lio/reactivex/internal/util/b;->e(Ljava/util/concurrent/atomic/AtomicLong;J)J
 | |
| 
 | |
|     :cond_8
 | |
|     neg-int v4, v4
 | |
| 
 | |
|     .line 12
 | |
|     invoke-virtual {p0, v4}, Ljava/util/concurrent/atomic/AtomicInteger;->addAndGet(I)I
 | |
| 
 | |
|     move-result v4
 | |
| 
 | |
|     if-nez v4, :cond_1
 | |
| 
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public onComplete()V
 | |
|     .locals 1
 | |
| 
 | |
|     const/4 v0, 0x1
 | |
| 
 | |
|     .line 1
 | |
|     iput-boolean v0, p0, Lio/reactivex/internal/operators/flowable/FlowableOnBackpressureLatest$BackpressureLatestSubscriber;->done:Z
 | |
| 
 | |
|     .line 2
 | |
|     invoke-virtual {p0}, Lio/reactivex/internal/operators/flowable/FlowableOnBackpressureLatest$BackpressureLatestSubscriber;->drain()V
 | |
| 
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public onError(Ljava/lang/Throwable;)V
 | |
|     .locals 0
 | |
| 
 | |
|     .line 1
 | |
|     iput-object p1, p0, Lio/reactivex/internal/operators/flowable/FlowableOnBackpressureLatest$BackpressureLatestSubscriber;->error:Ljava/lang/Throwable;
 | |
| 
 | |
|     const/4 p1, 0x1
 | |
| 
 | |
|     .line 2
 | |
|     iput-boolean p1, p0, Lio/reactivex/internal/operators/flowable/FlowableOnBackpressureLatest$BackpressureLatestSubscriber;->done:Z
 | |
| 
 | |
|     .line 3
 | |
|     invoke-virtual {p0}, Lio/reactivex/internal/operators/flowable/FlowableOnBackpressureLatest$BackpressureLatestSubscriber;->drain()V
 | |
| 
 | |
|     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/flowable/FlowableOnBackpressureLatest$BackpressureLatestSubscriber;->current:Ljava/util/concurrent/atomic/AtomicReference;
 | |
| 
 | |
|     invoke-virtual {v0, p1}, Ljava/util/concurrent/atomic/AtomicReference;->lazySet(Ljava/lang/Object;)V
 | |
| 
 | |
|     .line 2
 | |
|     invoke-virtual {p0}, Lio/reactivex/internal/operators/flowable/FlowableOnBackpressureLatest$BackpressureLatestSubscriber;->drain()V
 | |
| 
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public onSubscribe(Lok/e;)V
 | |
|     .locals 2
 | |
| 
 | |
|     .line 1
 | |
|     iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableOnBackpressureLatest$BackpressureLatestSubscriber;->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/FlowableOnBackpressureLatest$BackpressureLatestSubscriber;->upstream:Lok/e;
 | |
| 
 | |
|     .line 3
 | |
|     iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableOnBackpressureLatest$BackpressureLatestSubscriber;->downstream:Lok/d;
 | |
| 
 | |
|     invoke-interface {v0, p0}, Lok/d;->onSubscribe(Lok/e;)V
 | |
| 
 | |
|     const-wide v0, 0x7fffffffffffffffL
 | |
| 
 | |
|     .line 4
 | |
|     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/FlowableOnBackpressureLatest$BackpressureLatestSubscriber;->requested:Ljava/util/concurrent/atomic/AtomicLong;
 | |
| 
 | |
|     invoke-static {v0, p1, p2}, Lio/reactivex/internal/util/b;->a(Ljava/util/concurrent/atomic/AtomicLong;J)J
 | |
| 
 | |
|     .line 3
 | |
|     invoke-virtual {p0}, Lio/reactivex/internal/operators/flowable/FlowableOnBackpressureLatest$BackpressureLatestSubscriber;->drain()V
 | |
| 
 | |
|     :cond_0
 | |
|     return-void
 | |
| .end method
 |