349 lines
		
	
	
		
			10 KiB
		
	
	
	
		
			Smali
		
	
	
	
	
	
			
		
		
	
	
			349 lines
		
	
	
		
			10 KiB
		
	
	
	
		
			Smali
		
	
	
	
	
	
| .class abstract Lio/reactivex/internal/operators/flowable/FlowableSamplePublisher$SamplePublisherSubscriber;
 | |
| .super Ljava/util/concurrent/atomic/AtomicReference;
 | |
| .source "FlowableSamplePublisher.java"
 | |
| 
 | |
| # interfaces
 | |
| .implements Lkh/o;
 | |
| .implements Lok/e;
 | |
| 
 | |
| 
 | |
| # annotations
 | |
| .annotation system Ldalvik/annotation/EnclosingClass;
 | |
|     value = Lio/reactivex/internal/operators/flowable/FlowableSamplePublisher;
 | |
| .end annotation
 | |
| 
 | |
| .annotation system Ldalvik/annotation/InnerClass;
 | |
|     accessFlags = 0x409
 | |
|     name = "SamplePublisherSubscriber"
 | |
| .end annotation
 | |
| 
 | |
| .annotation system Ldalvik/annotation/Signature;
 | |
|     value = {
 | |
|         "<T:",
 | |
|         "Ljava/lang/Object;",
 | |
|         ">",
 | |
|         "Ljava/util/concurrent/atomic/AtomicReference<",
 | |
|         "TT;>;",
 | |
|         "Lkh/o<",
 | |
|         "TT;>;",
 | |
|         "Lok/e;"
 | |
|     }
 | |
| .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 other:Ljava/util/concurrent/atomic/AtomicReference;
 | |
|     .annotation system Ldalvik/annotation/Signature;
 | |
|         value = {
 | |
|             "Ljava/util/concurrent/atomic/AtomicReference<",
 | |
|             "Lok/e;",
 | |
|             ">;"
 | |
|         }
 | |
|     .end annotation
 | |
| .end field
 | |
| 
 | |
| .field public final requested:Ljava/util/concurrent/atomic/AtomicLong;
 | |
| 
 | |
| .field public final sampler:Lok/c;
 | |
|     .annotation system Ldalvik/annotation/Signature;
 | |
|         value = {
 | |
|             "Lok/c<",
 | |
|             "*>;"
 | |
|         }
 | |
|     .end annotation
 | |
| .end field
 | |
| 
 | |
| .field public upstream:Lok/e;
 | |
| 
 | |
| 
 | |
| # direct methods
 | |
| .method public constructor <init>(Lok/d;Lok/c;)V
 | |
|     .locals 1
 | |
|     .annotation system Ldalvik/annotation/Signature;
 | |
|         value = {
 | |
|             "(",
 | |
|             "Lok/d<",
 | |
|             "-TT;>;",
 | |
|             "Lok/c<",
 | |
|             "*>;)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/FlowableSamplePublisher$SamplePublisherSubscriber;->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/FlowableSamplePublisher$SamplePublisherSubscriber;->other:Ljava/util/concurrent/atomic/AtomicReference;
 | |
| 
 | |
|     .line 4
 | |
|     iput-object p1, p0, Lio/reactivex/internal/operators/flowable/FlowableSamplePublisher$SamplePublisherSubscriber;->downstream:Lok/d;
 | |
| 
 | |
|     .line 5
 | |
|     iput-object p2, p0, Lio/reactivex/internal/operators/flowable/FlowableSamplePublisher$SamplePublisherSubscriber;->sampler:Lok/c;
 | |
| 
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| 
 | |
| # virtual methods
 | |
| .method public cancel()V
 | |
|     .locals 1
 | |
| 
 | |
|     .line 1
 | |
|     iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableSamplePublisher$SamplePublisherSubscriber;->other:Ljava/util/concurrent/atomic/AtomicReference;
 | |
| 
 | |
|     invoke-static {v0}, Lio/reactivex/internal/subscriptions/SubscriptionHelper;->cancel(Ljava/util/concurrent/atomic/AtomicReference;)Z
 | |
| 
 | |
|     .line 2
 | |
|     iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableSamplePublisher$SamplePublisherSubscriber;->upstream:Lok/e;
 | |
| 
 | |
|     invoke-interface {v0}, Lok/e;->cancel()V
 | |
| 
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public complete()V
 | |
|     .locals 1
 | |
| 
 | |
|     .line 1
 | |
|     iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableSamplePublisher$SamplePublisherSubscriber;->upstream:Lok/e;
 | |
| 
 | |
|     invoke-interface {v0}, Lok/e;->cancel()V
 | |
| 
 | |
|     .line 2
 | |
|     invoke-virtual {p0}, Lio/reactivex/internal/operators/flowable/FlowableSamplePublisher$SamplePublisherSubscriber;->completeOther()V
 | |
| 
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public abstract completeMain()V
 | |
| .end method
 | |
| 
 | |
| .method public abstract completeOther()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/FlowableSamplePublisher$SamplePublisherSubscriber;->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/FlowableSamplePublisher$SamplePublisherSubscriber;->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/FlowableSamplePublisher$SamplePublisherSubscriber;->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/FlowableSamplePublisher$SamplePublisherSubscriber;->cancel()V
 | |
| 
 | |
|     .line 6
 | |
|     iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableSamplePublisher$SamplePublisherSubscriber;->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 error(Ljava/lang/Throwable;)V
 | |
|     .locals 1
 | |
| 
 | |
|     .line 1
 | |
|     iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableSamplePublisher$SamplePublisherSubscriber;->upstream:Lok/e;
 | |
| 
 | |
|     invoke-interface {v0}, Lok/e;->cancel()V
 | |
| 
 | |
|     .line 2
 | |
|     iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableSamplePublisher$SamplePublisherSubscriber;->downstream:Lok/d;
 | |
| 
 | |
|     invoke-interface {v0, p1}, Lok/d;->onError(Ljava/lang/Throwable;)V
 | |
| 
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public onComplete()V
 | |
|     .locals 1
 | |
| 
 | |
|     .line 1
 | |
|     iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableSamplePublisher$SamplePublisherSubscriber;->other:Ljava/util/concurrent/atomic/AtomicReference;
 | |
| 
 | |
|     invoke-static {v0}, Lio/reactivex/internal/subscriptions/SubscriptionHelper;->cancel(Ljava/util/concurrent/atomic/AtomicReference;)Z
 | |
| 
 | |
|     .line 2
 | |
|     invoke-virtual {p0}, Lio/reactivex/internal/operators/flowable/FlowableSamplePublisher$SamplePublisherSubscriber;->completeMain()V
 | |
| 
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public onError(Ljava/lang/Throwable;)V
 | |
|     .locals 1
 | |
| 
 | |
|     .line 1
 | |
|     iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableSamplePublisher$SamplePublisherSubscriber;->other:Ljava/util/concurrent/atomic/AtomicReference;
 | |
| 
 | |
|     invoke-static {v0}, Lio/reactivex/internal/subscriptions/SubscriptionHelper;->cancel(Ljava/util/concurrent/atomic/AtomicReference;)Z
 | |
| 
 | |
|     .line 2
 | |
|     iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableSamplePublisher$SamplePublisherSubscriber;->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 2
 | |
| 
 | |
|     .line 1
 | |
|     iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableSamplePublisher$SamplePublisherSubscriber;->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/FlowableSamplePublisher$SamplePublisherSubscriber;->upstream:Lok/e;
 | |
| 
 | |
|     .line 3
 | |
|     iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableSamplePublisher$SamplePublisherSubscriber;->downstream:Lok/d;
 | |
| 
 | |
|     invoke-interface {v0, p0}, Lok/d;->onSubscribe(Lok/e;)V
 | |
| 
 | |
|     .line 4
 | |
|     iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableSamplePublisher$SamplePublisherSubscriber;->other:Ljava/util/concurrent/atomic/AtomicReference;
 | |
| 
 | |
|     invoke-virtual {v0}, Ljava/util/concurrent/atomic/AtomicReference;->get()Ljava/lang/Object;
 | |
| 
 | |
|     move-result-object v0
 | |
| 
 | |
|     if-nez v0, :cond_0
 | |
| 
 | |
|     .line 5
 | |
|     iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableSamplePublisher$SamplePublisherSubscriber;->sampler:Lok/c;
 | |
| 
 | |
|     new-instance v1, Lio/reactivex/internal/operators/flowable/FlowableSamplePublisher$a;
 | |
| 
 | |
|     invoke-direct {v1, p0}, Lio/reactivex/internal/operators/flowable/FlowableSamplePublisher$a;-><init>(Lio/reactivex/internal/operators/flowable/FlowableSamplePublisher$SamplePublisherSubscriber;)V
 | |
| 
 | |
|     invoke-interface {v0, v1}, Lok/c;->subscribe(Lok/d;)V
 | |
| 
 | |
|     const-wide v0, 0x7fffffffffffffffL
 | |
| 
 | |
|     .line 6
 | |
|     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/FlowableSamplePublisher$SamplePublisherSubscriber;->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
 | |
| 
 | |
| .method public abstract run()V
 | |
| .end method
 | |
| 
 | |
| .method public setOther(Lok/e;)V
 | |
|     .locals 3
 | |
| 
 | |
|     .line 1
 | |
|     iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableSamplePublisher$SamplePublisherSubscriber;->other:Ljava/util/concurrent/atomic/AtomicReference;
 | |
| 
 | |
|     const-wide v1, 0x7fffffffffffffffL
 | |
| 
 | |
|     invoke-static {v0, p1, v1, v2}, Lio/reactivex/internal/subscriptions/SubscriptionHelper;->setOnce(Ljava/util/concurrent/atomic/AtomicReference;Lok/e;J)Z
 | |
| 
 | |
|     return-void
 | |
| .end method
 |