1013 lines
		
	
	
		
			28 KiB
		
	
	
	
		
			Smali
		
	
	
	
	
	
			
		
		
	
	
			1013 lines
		
	
	
		
			28 KiB
		
	
	
	
		
			Smali
		
	
	
	
	
	
| .class final Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;
 | |
| .super Ljava/util/concurrent/atomic/AtomicInteger;
 | |
| .source "FlowableBufferBoundary.java"
 | |
| 
 | |
| # interfaces
 | |
| .implements Lkh/o;
 | |
| .implements Lok/e;
 | |
| 
 | |
| 
 | |
| # annotations
 | |
| .annotation system Ldalvik/annotation/EnclosingClass;
 | |
|     value = Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary;
 | |
| .end annotation
 | |
| 
 | |
| .annotation system Ldalvik/annotation/InnerClass;
 | |
|     accessFlags = 0x19
 | |
|     name = "BufferBoundarySubscriber"
 | |
| .end annotation
 | |
| 
 | |
| .annotation system Ldalvik/annotation/MemberClasses;
 | |
|     value = {
 | |
|         Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber$BufferOpenSubscriber;
 | |
|     }
 | |
| .end annotation
 | |
| 
 | |
| .annotation system Ldalvik/annotation/Signature;
 | |
|     value = {
 | |
|         "<T:",
 | |
|         "Ljava/lang/Object;",
 | |
|         "C::",
 | |
|         "Ljava/util/Collection<",
 | |
|         "-TT;>;Open:",
 | |
|         "Ljava/lang/Object;",
 | |
|         "Close:",
 | |
|         "Ljava/lang/Object;",
 | |
|         ">",
 | |
|         "Ljava/util/concurrent/atomic/AtomicInteger;",
 | |
|         "Lkh/o<",
 | |
|         "TT;>;",
 | |
|         "Lok/e;"
 | |
|     }
 | |
| .end annotation
 | |
| 
 | |
| 
 | |
| # static fields
 | |
| .field private static final serialVersionUID:J = -0x757ec2d16eaff404L
 | |
| 
 | |
| 
 | |
| # instance fields
 | |
| .field public final bufferClose:Lph/o;
 | |
|     .annotation system Ldalvik/annotation/Signature;
 | |
|         value = {
 | |
|             "Lph/o<",
 | |
|             "-TOpen;+",
 | |
|             "Lok/c<",
 | |
|             "+TClose;>;>;"
 | |
|         }
 | |
|     .end annotation
 | |
| .end field
 | |
| 
 | |
| .field public final bufferOpen:Lok/c;
 | |
|     .annotation system Ldalvik/annotation/Signature;
 | |
|         value = {
 | |
|             "Lok/c<",
 | |
|             "+TOpen;>;"
 | |
|         }
 | |
|     .end annotation
 | |
| .end field
 | |
| 
 | |
| .field public final bufferSupplier:Ljava/util/concurrent/Callable;
 | |
|     .annotation system Ldalvik/annotation/Signature;
 | |
|         value = {
 | |
|             "Ljava/util/concurrent/Callable<",
 | |
|             "TC;>;"
 | |
|         }
 | |
|     .end annotation
 | |
| .end field
 | |
| 
 | |
| .field public buffers:Ljava/util/Map;
 | |
|     .annotation system Ldalvik/annotation/Signature;
 | |
|         value = {
 | |
|             "Ljava/util/Map<",
 | |
|             "Ljava/lang/Long;",
 | |
|             "TC;>;"
 | |
|         }
 | |
|     .end annotation
 | |
| .end field
 | |
| 
 | |
| .field public volatile cancelled:Z
 | |
| 
 | |
| .field public volatile done:Z
 | |
| 
 | |
| .field public final downstream:Lok/d;
 | |
|     .annotation system Ldalvik/annotation/Signature;
 | |
|         value = {
 | |
|             "Lok/d<",
 | |
|             "-TC;>;"
 | |
|         }
 | |
|     .end annotation
 | |
| .end field
 | |
| 
 | |
| .field public emitted:J
 | |
| 
 | |
| .field public final errors:Lio/reactivex/internal/util/AtomicThrowable;
 | |
| 
 | |
| .field public index:J
 | |
| 
 | |
| .field public final queue:Lio/reactivex/internal/queue/a;
 | |
|     .annotation system Ldalvik/annotation/Signature;
 | |
|         value = {
 | |
|             "Lio/reactivex/internal/queue/a<",
 | |
|             "TC;>;"
 | |
|         }
 | |
|     .end annotation
 | |
| .end field
 | |
| 
 | |
| .field public final requested:Ljava/util/concurrent/atomic/AtomicLong;
 | |
| 
 | |
| .field public final subscribers:Lio/reactivex/disposables/a;
 | |
| 
 | |
| .field public final upstream:Ljava/util/concurrent/atomic/AtomicReference;
 | |
|     .annotation system Ldalvik/annotation/Signature;
 | |
|         value = {
 | |
|             "Ljava/util/concurrent/atomic/AtomicReference<",
 | |
|             "Lok/e;",
 | |
|             ">;"
 | |
|         }
 | |
|     .end annotation
 | |
| .end field
 | |
| 
 | |
| 
 | |
| # direct methods
 | |
| .method public constructor <init>(Lok/d;Lok/c;Lph/o;Ljava/util/concurrent/Callable;)V
 | |
|     .locals 0
 | |
|     .annotation system Ldalvik/annotation/Signature;
 | |
|         value = {
 | |
|             "(",
 | |
|             "Lok/d<",
 | |
|             "-TC;>;",
 | |
|             "Lok/c<",
 | |
|             "+TOpen;>;",
 | |
|             "Lph/o<",
 | |
|             "-TOpen;+",
 | |
|             "Lok/c<",
 | |
|             "+TClose;>;>;",
 | |
|             "Ljava/util/concurrent/Callable<",
 | |
|             "TC;>;)V"
 | |
|         }
 | |
|     .end annotation
 | |
| 
 | |
|     .line 1
 | |
|     invoke-direct {p0}, Ljava/util/concurrent/atomic/AtomicInteger;-><init>()V
 | |
| 
 | |
|     .line 2
 | |
|     iput-object p1, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->downstream:Lok/d;
 | |
| 
 | |
|     .line 3
 | |
|     iput-object p4, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->bufferSupplier:Ljava/util/concurrent/Callable;
 | |
| 
 | |
|     .line 4
 | |
|     iput-object p2, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->bufferOpen:Lok/c;
 | |
| 
 | |
|     .line 5
 | |
|     iput-object p3, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->bufferClose:Lph/o;
 | |
| 
 | |
|     .line 6
 | |
|     new-instance p1, Lio/reactivex/internal/queue/a;
 | |
| 
 | |
|     invoke-static {}, Lkh/j;->U()I
 | |
| 
 | |
|     move-result p2
 | |
| 
 | |
|     invoke-direct {p1, p2}, Lio/reactivex/internal/queue/a;-><init>(I)V
 | |
| 
 | |
|     iput-object p1, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->queue:Lio/reactivex/internal/queue/a;
 | |
| 
 | |
|     .line 7
 | |
|     new-instance p1, Lio/reactivex/disposables/a;
 | |
| 
 | |
|     invoke-direct {p1}, Lio/reactivex/disposables/a;-><init>()V
 | |
| 
 | |
|     iput-object p1, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->subscribers:Lio/reactivex/disposables/a;
 | |
| 
 | |
|     .line 8
 | |
|     new-instance p1, Ljava/util/concurrent/atomic/AtomicLong;
 | |
| 
 | |
|     invoke-direct {p1}, Ljava/util/concurrent/atomic/AtomicLong;-><init>()V
 | |
| 
 | |
|     iput-object p1, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->requested:Ljava/util/concurrent/atomic/AtomicLong;
 | |
| 
 | |
|     .line 9
 | |
|     new-instance p1, Ljava/util/concurrent/atomic/AtomicReference;
 | |
| 
 | |
|     invoke-direct {p1}, Ljava/util/concurrent/atomic/AtomicReference;-><init>()V
 | |
| 
 | |
|     iput-object p1, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->upstream:Ljava/util/concurrent/atomic/AtomicReference;
 | |
| 
 | |
|     .line 10
 | |
|     new-instance p1, Ljava/util/LinkedHashMap;
 | |
| 
 | |
|     invoke-direct {p1}, Ljava/util/LinkedHashMap;-><init>()V
 | |
| 
 | |
|     iput-object p1, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->buffers:Ljava/util/Map;
 | |
| 
 | |
|     .line 11
 | |
|     new-instance p1, Lio/reactivex/internal/util/AtomicThrowable;
 | |
| 
 | |
|     invoke-direct {p1}, Lio/reactivex/internal/util/AtomicThrowable;-><init>()V
 | |
| 
 | |
|     iput-object p1, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->errors:Lio/reactivex/internal/util/AtomicThrowable;
 | |
| 
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| 
 | |
| # virtual methods
 | |
| .method public boundaryError(Lio/reactivex/disposables/b;Ljava/lang/Throwable;)V
 | |
|     .locals 1
 | |
| 
 | |
|     .line 1
 | |
|     iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->upstream: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/FlowableBufferBoundary$BufferBoundarySubscriber;->subscribers:Lio/reactivex/disposables/a;
 | |
| 
 | |
|     invoke-virtual {v0, p1}, Lio/reactivex/disposables/a;->c(Lio/reactivex/disposables/b;)Z
 | |
| 
 | |
|     .line 3
 | |
|     invoke-virtual {p0, p2}, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->onError(Ljava/lang/Throwable;)V
 | |
| 
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public cancel()V
 | |
|     .locals 1
 | |
| 
 | |
|     .line 1
 | |
|     iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->upstream:Ljava/util/concurrent/atomic/AtomicReference;
 | |
| 
 | |
|     invoke-static {v0}, Lio/reactivex/internal/subscriptions/SubscriptionHelper;->cancel(Ljava/util/concurrent/atomic/AtomicReference;)Z
 | |
| 
 | |
|     move-result v0
 | |
| 
 | |
|     if-eqz v0, :cond_0
 | |
| 
 | |
|     const/4 v0, 0x1
 | |
| 
 | |
|     .line 2
 | |
|     iput-boolean v0, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->cancelled:Z
 | |
| 
 | |
|     .line 3
 | |
|     iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->subscribers:Lio/reactivex/disposables/a;
 | |
| 
 | |
|     invoke-virtual {v0}, Lio/reactivex/disposables/a;->dispose()V
 | |
| 
 | |
|     .line 4
 | |
|     monitor-enter p0
 | |
| 
 | |
|     const/4 v0, 0x0
 | |
| 
 | |
|     .line 5
 | |
|     :try_start_0
 | |
|     iput-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->buffers:Ljava/util/Map;
 | |
| 
 | |
|     .line 6
 | |
|     monitor-exit p0
 | |
|     :try_end_0
 | |
|     .catchall {:try_start_0 .. :try_end_0} :catchall_0
 | |
| 
 | |
|     .line 7
 | |
|     invoke-virtual {p0}, Ljava/util/concurrent/atomic/AtomicInteger;->getAndIncrement()I
 | |
| 
 | |
|     move-result v0
 | |
| 
 | |
|     if-eqz v0, :cond_0
 | |
| 
 | |
|     .line 8
 | |
|     iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->queue:Lio/reactivex/internal/queue/a;
 | |
| 
 | |
|     invoke-virtual {v0}, Lio/reactivex/internal/queue/a;->clear()V
 | |
| 
 | |
|     goto :goto_0
 | |
| 
 | |
|     :catchall_0
 | |
|     move-exception v0
 | |
| 
 | |
|     .line 9
 | |
|     :try_start_1
 | |
|     monitor-exit p0
 | |
|     :try_end_1
 | |
|     .catchall {:try_start_1 .. :try_end_1} :catchall_0
 | |
| 
 | |
|     throw v0
 | |
| 
 | |
|     :cond_0
 | |
|     :goto_0
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public close(Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferCloseSubscriber;J)V
 | |
|     .locals 3
 | |
|     .annotation system Ldalvik/annotation/Signature;
 | |
|         value = {
 | |
|             "(",
 | |
|             "Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferCloseSubscriber<",
 | |
|             "TT;TC;>;J)V"
 | |
|         }
 | |
|     .end annotation
 | |
| 
 | |
|     .line 1
 | |
|     iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->subscribers:Lio/reactivex/disposables/a;
 | |
| 
 | |
|     invoke-virtual {v0, p1}, Lio/reactivex/disposables/a;->c(Lio/reactivex/disposables/b;)Z
 | |
| 
 | |
|     .line 2
 | |
|     iget-object p1, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->subscribers:Lio/reactivex/disposables/a;
 | |
| 
 | |
|     invoke-virtual {p1}, Lio/reactivex/disposables/a;->g()I
 | |
| 
 | |
|     move-result p1
 | |
| 
 | |
|     const/4 v0, 0x1
 | |
| 
 | |
|     if-nez p1, :cond_0
 | |
| 
 | |
|     .line 3
 | |
|     iget-object p1, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->upstream:Ljava/util/concurrent/atomic/AtomicReference;
 | |
| 
 | |
|     invoke-static {p1}, Lio/reactivex/internal/subscriptions/SubscriptionHelper;->cancel(Ljava/util/concurrent/atomic/AtomicReference;)Z
 | |
| 
 | |
|     move p1, v0
 | |
| 
 | |
|     goto :goto_0
 | |
| 
 | |
|     :cond_0
 | |
|     const/4 p1, 0x0
 | |
| 
 | |
|     .line 4
 | |
|     :goto_0
 | |
|     monitor-enter p0
 | |
| 
 | |
|     .line 5
 | |
|     :try_start_0
 | |
|     iget-object v1, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->buffers:Ljava/util/Map;
 | |
| 
 | |
|     if-nez v1, :cond_1
 | |
| 
 | |
|     .line 6
 | |
|     monitor-exit p0
 | |
| 
 | |
|     return-void
 | |
| 
 | |
|     .line 7
 | |
|     :cond_1
 | |
|     iget-object v2, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->queue:Lio/reactivex/internal/queue/a;
 | |
| 
 | |
|     invoke-static {p2, p3}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
 | |
| 
 | |
|     move-result-object p2
 | |
| 
 | |
|     invoke-interface {v1, p2}, Ljava/util/Map;->remove(Ljava/lang/Object;)Ljava/lang/Object;
 | |
| 
 | |
|     move-result-object p2
 | |
| 
 | |
|     invoke-virtual {v2, p2}, Lio/reactivex/internal/queue/a;->offer(Ljava/lang/Object;)Z
 | |
| 
 | |
|     .line 8
 | |
|     monitor-exit p0
 | |
|     :try_end_0
 | |
|     .catchall {:try_start_0 .. :try_end_0} :catchall_0
 | |
| 
 | |
|     if-eqz p1, :cond_2
 | |
| 
 | |
|     .line 9
 | |
|     iput-boolean v0, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->done:Z
 | |
| 
 | |
|     .line 10
 | |
|     :cond_2
 | |
|     invoke-virtual {p0}, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->drain()V
 | |
| 
 | |
|     return-void
 | |
| 
 | |
|     :catchall_0
 | |
|     move-exception p1
 | |
| 
 | |
|     .line 11
 | |
|     :try_start_1
 | |
|     monitor-exit p0
 | |
|     :try_end_1
 | |
|     .catchall {:try_start_1 .. :try_end_1} :catchall_0
 | |
| 
 | |
|     throw p1
 | |
| .end method
 | |
| 
 | |
| .method public drain()V
 | |
|     .locals 12
 | |
| 
 | |
|     .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-wide v0, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->emitted:J
 | |
| 
 | |
|     .line 3
 | |
|     iget-object v2, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->downstream:Lok/d;
 | |
| 
 | |
|     .line 4
 | |
|     iget-object v3, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->queue:Lio/reactivex/internal/queue/a;
 | |
| 
 | |
|     const/4 v4, 0x1
 | |
| 
 | |
|     move v5, v4
 | |
| 
 | |
|     .line 5
 | |
|     :cond_1
 | |
|     iget-object v6, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->requested:Ljava/util/concurrent/atomic/AtomicLong;
 | |
| 
 | |
|     invoke-virtual {v6}, Ljava/util/concurrent/atomic/AtomicLong;->get()J
 | |
| 
 | |
|     move-result-wide v6
 | |
| 
 | |
|     :goto_0
 | |
|     cmp-long v8, v0, v6
 | |
| 
 | |
|     if-eqz v8, :cond_7
 | |
| 
 | |
|     .line 6
 | |
|     iget-boolean v9, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->cancelled:Z
 | |
| 
 | |
|     if-eqz v9, :cond_2
 | |
| 
 | |
|     .line 7
 | |
|     invoke-virtual {v3}, Lio/reactivex/internal/queue/a;->clear()V
 | |
| 
 | |
|     return-void
 | |
| 
 | |
|     .line 8
 | |
|     :cond_2
 | |
|     iget-boolean v9, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->done:Z
 | |
| 
 | |
|     if-eqz v9, :cond_3
 | |
| 
 | |
|     .line 9
 | |
|     iget-object v10, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->errors:Lio/reactivex/internal/util/AtomicThrowable;
 | |
| 
 | |
|     invoke-virtual {v10}, Ljava/util/concurrent/atomic/AtomicReference;->get()Ljava/lang/Object;
 | |
| 
 | |
|     move-result-object v10
 | |
| 
 | |
|     if-eqz v10, :cond_3
 | |
| 
 | |
|     .line 10
 | |
|     invoke-virtual {v3}, Lio/reactivex/internal/queue/a;->clear()V
 | |
| 
 | |
|     .line 11
 | |
|     iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->errors:Lio/reactivex/internal/util/AtomicThrowable;
 | |
| 
 | |
|     invoke-virtual {v0}, Lio/reactivex/internal/util/AtomicThrowable;->terminate()Ljava/lang/Throwable;
 | |
| 
 | |
|     move-result-object v0
 | |
| 
 | |
|     .line 12
 | |
|     invoke-interface {v2, v0}, Lok/d;->onError(Ljava/lang/Throwable;)V
 | |
| 
 | |
|     return-void
 | |
| 
 | |
|     .line 13
 | |
|     :cond_3
 | |
|     invoke-virtual {v3}, Lio/reactivex/internal/queue/a;->poll()Ljava/lang/Object;
 | |
| 
 | |
|     move-result-object v10
 | |
| 
 | |
|     check-cast v10, Ljava/util/Collection;
 | |
| 
 | |
|     if-nez v10, :cond_4
 | |
| 
 | |
|     move v11, v4
 | |
| 
 | |
|     goto :goto_1
 | |
| 
 | |
|     :cond_4
 | |
|     const/4 v11, 0x0
 | |
| 
 | |
|     :goto_1
 | |
|     if-eqz v9, :cond_5
 | |
| 
 | |
|     if-eqz v11, :cond_5
 | |
| 
 | |
|     .line 14
 | |
|     invoke-interface {v2}, Lok/d;->onComplete()V
 | |
| 
 | |
|     return-void
 | |
| 
 | |
|     :cond_5
 | |
|     if-eqz v11, :cond_6
 | |
| 
 | |
|     goto :goto_2
 | |
| 
 | |
|     .line 15
 | |
|     :cond_6
 | |
|     invoke-interface {v2, v10}, Lok/d;->onNext(Ljava/lang/Object;)V
 | |
| 
 | |
|     const-wide/16 v8, 0x1
 | |
| 
 | |
|     add-long/2addr v0, v8
 | |
| 
 | |
|     goto :goto_0
 | |
| 
 | |
|     :cond_7
 | |
|     :goto_2
 | |
|     if-nez v8, :cond_a
 | |
| 
 | |
|     .line 16
 | |
|     iget-boolean v6, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->cancelled:Z
 | |
| 
 | |
|     if-eqz v6, :cond_8
 | |
| 
 | |
|     .line 17
 | |
|     invoke-virtual {v3}, Lio/reactivex/internal/queue/a;->clear()V
 | |
| 
 | |
|     return-void
 | |
| 
 | |
|     .line 18
 | |
|     :cond_8
 | |
|     iget-boolean v6, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->done:Z
 | |
| 
 | |
|     if-eqz v6, :cond_a
 | |
| 
 | |
|     .line 19
 | |
|     iget-object v6, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->errors:Lio/reactivex/internal/util/AtomicThrowable;
 | |
| 
 | |
|     invoke-virtual {v6}, Ljava/util/concurrent/atomic/AtomicReference;->get()Ljava/lang/Object;
 | |
| 
 | |
|     move-result-object v6
 | |
| 
 | |
|     if-eqz v6, :cond_9
 | |
| 
 | |
|     .line 20
 | |
|     invoke-virtual {v3}, Lio/reactivex/internal/queue/a;->clear()V
 | |
| 
 | |
|     .line 21
 | |
|     iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->errors:Lio/reactivex/internal/util/AtomicThrowable;
 | |
| 
 | |
|     invoke-virtual {v0}, Lio/reactivex/internal/util/AtomicThrowable;->terminate()Ljava/lang/Throwable;
 | |
| 
 | |
|     move-result-object v0
 | |
| 
 | |
|     .line 22
 | |
|     invoke-interface {v2, v0}, Lok/d;->onError(Ljava/lang/Throwable;)V
 | |
| 
 | |
|     return-void
 | |
| 
 | |
|     .line 23
 | |
|     :cond_9
 | |
|     invoke-virtual {v3}, Lio/reactivex/internal/queue/a;->isEmpty()Z
 | |
| 
 | |
|     move-result v6
 | |
| 
 | |
|     if-eqz v6, :cond_a
 | |
| 
 | |
|     .line 24
 | |
|     invoke-interface {v2}, Lok/d;->onComplete()V
 | |
| 
 | |
|     return-void
 | |
| 
 | |
|     .line 25
 | |
|     :cond_a
 | |
|     iput-wide v0, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->emitted:J
 | |
| 
 | |
|     neg-int v5, v5
 | |
| 
 | |
|     .line 26
 | |
|     invoke-virtual {p0, v5}, Ljava/util/concurrent/atomic/AtomicInteger;->addAndGet(I)I
 | |
| 
 | |
|     move-result v5
 | |
| 
 | |
|     if-nez v5, :cond_1
 | |
| 
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public onComplete()V
 | |
|     .locals 3
 | |
| 
 | |
|     .line 1
 | |
|     iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->subscribers:Lio/reactivex/disposables/a;
 | |
| 
 | |
|     invoke-virtual {v0}, Lio/reactivex/disposables/a;->dispose()V
 | |
| 
 | |
|     .line 2
 | |
|     monitor-enter p0
 | |
| 
 | |
|     .line 3
 | |
|     :try_start_0
 | |
|     iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->buffers:Ljava/util/Map;
 | |
| 
 | |
|     if-nez v0, :cond_0
 | |
| 
 | |
|     .line 4
 | |
|     monitor-exit p0
 | |
| 
 | |
|     return-void
 | |
| 
 | |
|     .line 5
 | |
|     :cond_0
 | |
|     invoke-interface {v0}, Ljava/util/Map;->values()Ljava/util/Collection;
 | |
| 
 | |
|     move-result-object v0
 | |
| 
 | |
|     invoke-interface {v0}, Ljava/util/Collection;->iterator()Ljava/util/Iterator;
 | |
| 
 | |
|     move-result-object v0
 | |
| 
 | |
|     :goto_0
 | |
|     invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
 | |
| 
 | |
|     move-result v1
 | |
| 
 | |
|     if-eqz v1, :cond_1
 | |
| 
 | |
|     invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
 | |
| 
 | |
|     move-result-object v1
 | |
| 
 | |
|     check-cast v1, Ljava/util/Collection;
 | |
| 
 | |
|     .line 6
 | |
|     iget-object v2, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->queue:Lio/reactivex/internal/queue/a;
 | |
| 
 | |
|     invoke-virtual {v2, v1}, Lio/reactivex/internal/queue/a;->offer(Ljava/lang/Object;)Z
 | |
| 
 | |
|     goto :goto_0
 | |
| 
 | |
|     :cond_1
 | |
|     const/4 v0, 0x0
 | |
| 
 | |
|     .line 7
 | |
|     iput-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->buffers:Ljava/util/Map;
 | |
| 
 | |
|     .line 8
 | |
|     monitor-exit p0
 | |
|     :try_end_0
 | |
|     .catchall {:try_start_0 .. :try_end_0} :catchall_0
 | |
| 
 | |
|     const/4 v0, 0x1
 | |
| 
 | |
|     .line 9
 | |
|     iput-boolean v0, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->done:Z
 | |
| 
 | |
|     .line 10
 | |
|     invoke-virtual {p0}, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->drain()V
 | |
| 
 | |
|     return-void
 | |
| 
 | |
|     :catchall_0
 | |
|     move-exception v0
 | |
| 
 | |
|     .line 11
 | |
|     :try_start_1
 | |
|     monitor-exit p0
 | |
|     :try_end_1
 | |
|     .catchall {:try_start_1 .. :try_end_1} :catchall_0
 | |
| 
 | |
|     throw v0
 | |
| .end method
 | |
| 
 | |
| .method public onError(Ljava/lang/Throwable;)V
 | |
|     .locals 1
 | |
| 
 | |
|     .line 1
 | |
|     iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->errors:Lio/reactivex/internal/util/AtomicThrowable;
 | |
| 
 | |
|     invoke-virtual {v0, p1}, Lio/reactivex/internal/util/AtomicThrowable;->addThrowable(Ljava/lang/Throwable;)Z
 | |
| 
 | |
|     move-result v0
 | |
| 
 | |
|     if-eqz v0, :cond_0
 | |
| 
 | |
|     .line 2
 | |
|     iget-object p1, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->subscribers:Lio/reactivex/disposables/a;
 | |
| 
 | |
|     invoke-virtual {p1}, Lio/reactivex/disposables/a;->dispose()V
 | |
| 
 | |
|     .line 3
 | |
|     monitor-enter p0
 | |
| 
 | |
|     const/4 p1, 0x0
 | |
| 
 | |
|     .line 4
 | |
|     :try_start_0
 | |
|     iput-object p1, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->buffers:Ljava/util/Map;
 | |
| 
 | |
|     .line 5
 | |
|     monitor-exit p0
 | |
|     :try_end_0
 | |
|     .catchall {:try_start_0 .. :try_end_0} :catchall_0
 | |
| 
 | |
|     const/4 p1, 0x1
 | |
| 
 | |
|     .line 6
 | |
|     iput-boolean p1, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->done:Z
 | |
| 
 | |
|     .line 7
 | |
|     invoke-virtual {p0}, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->drain()V
 | |
| 
 | |
|     goto :goto_0
 | |
| 
 | |
|     :catchall_0
 | |
|     move-exception p1
 | |
| 
 | |
|     .line 8
 | |
|     :try_start_1
 | |
|     monitor-exit p0
 | |
|     :try_end_1
 | |
|     .catchall {:try_start_1 .. :try_end_1} :catchall_0
 | |
| 
 | |
|     throw p1
 | |
| 
 | |
|     .line 9
 | |
|     :cond_0
 | |
|     invoke-static {p1}, Lwh/a;->Y(Ljava/lang/Throwable;)V
 | |
| 
 | |
|     :goto_0
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public onNext(Ljava/lang/Object;)V
 | |
|     .locals 2
 | |
|     .annotation system Ldalvik/annotation/Signature;
 | |
|         value = {
 | |
|             "(TT;)V"
 | |
|         }
 | |
|     .end annotation
 | |
| 
 | |
|     .line 1
 | |
|     monitor-enter p0
 | |
| 
 | |
|     .line 2
 | |
|     :try_start_0
 | |
|     iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->buffers:Ljava/util/Map;
 | |
| 
 | |
|     if-nez v0, :cond_0
 | |
| 
 | |
|     .line 3
 | |
|     monitor-exit p0
 | |
| 
 | |
|     return-void
 | |
| 
 | |
|     .line 4
 | |
|     :cond_0
 | |
|     invoke-interface {v0}, Ljava/util/Map;->values()Ljava/util/Collection;
 | |
| 
 | |
|     move-result-object v0
 | |
| 
 | |
|     invoke-interface {v0}, Ljava/util/Collection;->iterator()Ljava/util/Iterator;
 | |
| 
 | |
|     move-result-object v0
 | |
| 
 | |
|     :goto_0
 | |
|     invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
 | |
| 
 | |
|     move-result v1
 | |
| 
 | |
|     if-eqz v1, :cond_1
 | |
| 
 | |
|     invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
 | |
| 
 | |
|     move-result-object v1
 | |
| 
 | |
|     check-cast v1, Ljava/util/Collection;
 | |
| 
 | |
|     .line 5
 | |
|     invoke-interface {v1, p1}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
 | |
| 
 | |
|     goto :goto_0
 | |
| 
 | |
|     .line 6
 | |
|     :cond_1
 | |
|     monitor-exit p0
 | |
| 
 | |
|     return-void
 | |
| 
 | |
|     :catchall_0
 | |
|     move-exception p1
 | |
| 
 | |
|     monitor-exit p0
 | |
|     :try_end_0
 | |
|     .catchall {:try_start_0 .. :try_end_0} :catchall_0
 | |
| 
 | |
|     throw p1
 | |
| .end method
 | |
| 
 | |
| .method public onSubscribe(Lok/e;)V
 | |
|     .locals 2
 | |
| 
 | |
|     .line 1
 | |
|     iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->upstream:Ljava/util/concurrent/atomic/AtomicReference;
 | |
| 
 | |
|     invoke-static {v0, p1}, Lio/reactivex/internal/subscriptions/SubscriptionHelper;->setOnce(Ljava/util/concurrent/atomic/AtomicReference;Lok/e;)Z
 | |
| 
 | |
|     move-result v0
 | |
| 
 | |
|     if-eqz v0, :cond_0
 | |
| 
 | |
|     .line 2
 | |
|     new-instance v0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber$BufferOpenSubscriber;
 | |
| 
 | |
|     invoke-direct {v0, p0}, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber$BufferOpenSubscriber;-><init>(Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;)V
 | |
| 
 | |
|     .line 3
 | |
|     iget-object v1, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->subscribers:Lio/reactivex/disposables/a;
 | |
| 
 | |
|     invoke-virtual {v1, v0}, Lio/reactivex/disposables/a;->b(Lio/reactivex/disposables/b;)Z
 | |
| 
 | |
|     .line 4
 | |
|     iget-object v1, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->bufferOpen:Lok/c;
 | |
| 
 | |
|     invoke-interface {v1, v0}, Lok/c;->subscribe(Lok/d;)V
 | |
| 
 | |
|     const-wide v0, 0x7fffffffffffffffL
 | |
| 
 | |
|     .line 5
 | |
|     invoke-interface {p1, v0, v1}, Lok/e;->request(J)V
 | |
| 
 | |
|     :cond_0
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public open(Ljava/lang/Object;)V
 | |
|     .locals 5
 | |
|     .annotation system Ldalvik/annotation/Signature;
 | |
|         value = {
 | |
|             "(TOpen;)V"
 | |
|         }
 | |
|     .end annotation
 | |
| 
 | |
|     .line 1
 | |
|     :try_start_0
 | |
|     iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->bufferSupplier:Ljava/util/concurrent/Callable;
 | |
| 
 | |
|     invoke-interface {v0}, Ljava/util/concurrent/Callable;->call()Ljava/lang/Object;
 | |
| 
 | |
|     move-result-object v0
 | |
| 
 | |
|     const-string v1, "The bufferSupplier returned a null Collection"
 | |
| 
 | |
|     invoke-static {v0, v1}, Lio/reactivex/internal/functions/a;->g(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;
 | |
| 
 | |
|     move-result-object v0
 | |
| 
 | |
|     check-cast v0, Ljava/util/Collection;
 | |
| 
 | |
|     .line 2
 | |
|     iget-object v1, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->bufferClose:Lph/o;
 | |
| 
 | |
|     invoke-interface {v1, p1}, Lph/o;->apply(Ljava/lang/Object;)Ljava/lang/Object;
 | |
| 
 | |
|     move-result-object p1
 | |
| 
 | |
|     const-string v1, "The bufferClose returned a null Publisher"
 | |
| 
 | |
|     invoke-static {p1, v1}, Lio/reactivex/internal/functions/a;->g(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;
 | |
| 
 | |
|     move-result-object p1
 | |
| 
 | |
|     check-cast p1, Lok/c;
 | |
|     :try_end_0
 | |
|     .catchall {:try_start_0 .. :try_end_0} :catchall_1
 | |
| 
 | |
|     .line 3
 | |
|     iget-wide v1, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->index:J
 | |
| 
 | |
|     const-wide/16 v3, 0x1
 | |
| 
 | |
|     add-long/2addr v3, v1
 | |
| 
 | |
|     .line 4
 | |
|     iput-wide v3, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->index:J
 | |
| 
 | |
|     .line 5
 | |
|     monitor-enter p0
 | |
| 
 | |
|     .line 6
 | |
|     :try_start_1
 | |
|     iget-object v3, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->buffers:Ljava/util/Map;
 | |
| 
 | |
|     if-nez v3, :cond_0
 | |
| 
 | |
|     .line 7
 | |
|     monitor-exit p0
 | |
| 
 | |
|     return-void
 | |
| 
 | |
|     .line 8
 | |
|     :cond_0
 | |
|     invoke-static {v1, v2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
 | |
| 
 | |
|     move-result-object v4
 | |
| 
 | |
|     invoke-interface {v3, v4, v0}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
 | |
| 
 | |
|     .line 9
 | |
|     monitor-exit p0
 | |
|     :try_end_1
 | |
|     .catchall {:try_start_1 .. :try_end_1} :catchall_0
 | |
| 
 | |
|     .line 10
 | |
|     new-instance v0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferCloseSubscriber;
 | |
| 
 | |
|     invoke-direct {v0, p0, v1, v2}, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferCloseSubscriber;-><init>(Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;J)V
 | |
| 
 | |
|     .line 11
 | |
|     iget-object v1, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->subscribers:Lio/reactivex/disposables/a;
 | |
| 
 | |
|     invoke-virtual {v1, v0}, Lio/reactivex/disposables/a;->b(Lio/reactivex/disposables/b;)Z
 | |
| 
 | |
|     .line 12
 | |
|     invoke-interface {p1, v0}, Lok/c;->subscribe(Lok/d;)V
 | |
| 
 | |
|     return-void
 | |
| 
 | |
|     :catchall_0
 | |
|     move-exception p1
 | |
| 
 | |
|     .line 13
 | |
|     :try_start_2
 | |
|     monitor-exit p0
 | |
|     :try_end_2
 | |
|     .catchall {:try_start_2 .. :try_end_2} :catchall_0
 | |
| 
 | |
|     throw p1
 | |
| 
 | |
|     :catchall_1
 | |
|     move-exception p1
 | |
| 
 | |
|     .line 14
 | |
|     invoke-static {p1}, Lio/reactivex/exceptions/a;->b(Ljava/lang/Throwable;)V
 | |
| 
 | |
|     .line 15
 | |
|     iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->upstream:Ljava/util/concurrent/atomic/AtomicReference;
 | |
| 
 | |
|     invoke-static {v0}, Lio/reactivex/internal/subscriptions/SubscriptionHelper;->cancel(Ljava/util/concurrent/atomic/AtomicReference;)Z
 | |
| 
 | |
|     .line 16
 | |
|     invoke-virtual {p0, p1}, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->onError(Ljava/lang/Throwable;)V
 | |
| 
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public openComplete(Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber$BufferOpenSubscriber;)V
 | |
|     .locals 1
 | |
|     .annotation system Ldalvik/annotation/Signature;
 | |
|         value = {
 | |
|             "(",
 | |
|             "Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber$BufferOpenSubscriber<",
 | |
|             "TOpen;>;)V"
 | |
|         }
 | |
|     .end annotation
 | |
| 
 | |
|     .line 1
 | |
|     iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->subscribers:Lio/reactivex/disposables/a;
 | |
| 
 | |
|     invoke-virtual {v0, p1}, Lio/reactivex/disposables/a;->c(Lio/reactivex/disposables/b;)Z
 | |
| 
 | |
|     .line 2
 | |
|     iget-object p1, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->subscribers:Lio/reactivex/disposables/a;
 | |
| 
 | |
|     invoke-virtual {p1}, Lio/reactivex/disposables/a;->g()I
 | |
| 
 | |
|     move-result p1
 | |
| 
 | |
|     if-nez p1, :cond_0
 | |
| 
 | |
|     .line 3
 | |
|     iget-object p1, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->upstream:Ljava/util/concurrent/atomic/AtomicReference;
 | |
| 
 | |
|     invoke-static {p1}, Lio/reactivex/internal/subscriptions/SubscriptionHelper;->cancel(Ljava/util/concurrent/atomic/AtomicReference;)Z
 | |
| 
 | |
|     const/4 p1, 0x1
 | |
| 
 | |
|     .line 4
 | |
|     iput-boolean p1, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->done:Z
 | |
| 
 | |
|     .line 5
 | |
|     invoke-virtual {p0}, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->drain()V
 | |
| 
 | |
|     :cond_0
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public request(J)V
 | |
|     .locals 1
 | |
| 
 | |
|     .line 1
 | |
|     iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->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 2
 | |
|     invoke-virtual {p0}, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->drain()V
 | |
| 
 | |
|     return-void
 | |
| .end method
 |