apkfuckery/com.discord/smali/rx/internal/operators/OperatorBufferWithStartEndObservable$BufferingSubscriber.smali
2019-02-04 21:05:16 +01:00

481 lines
15 KiB
Smali

.class final Lrx/internal/operators/OperatorBufferWithStartEndObservable$BufferingSubscriber;
.super Lrx/Subscriber;
.source "OperatorBufferWithStartEndObservable.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lrx/internal/operators/OperatorBufferWithStartEndObservable;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x10
name = "BufferingSubscriber"
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"Lrx/Subscriber",
"<TT;>;"
}
.end annotation
# instance fields
.field final child:Lrx/Subscriber;
.annotation system Ldalvik/annotation/Signature;
value = {
"Lrx/Subscriber",
"<-",
"Ljava/util/List",
"<TT;>;>;"
}
.end annotation
.end field
.field final chunks:Ljava/util/List;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/List",
"<",
"Ljava/util/List",
"<TT;>;>;"
}
.end annotation
.end field
.field final closingSubscriptions:Lrx/subscriptions/CompositeSubscription;
.field done:Z
.field final synthetic this$0:Lrx/internal/operators/OperatorBufferWithStartEndObservable;
# direct methods
.method public constructor <init>(Lrx/internal/operators/OperatorBufferWithStartEndObservable;Lrx/Subscriber;)V
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lrx/Subscriber",
"<-",
"Ljava/util/List",
"<TT;>;>;)V"
}
.end annotation
.prologue
.local p0, "this":Lrx/internal/operators/OperatorBufferWithStartEndObservable$BufferingSubscriber;, "Lrx/internal/operators/OperatorBufferWithStartEndObservable<TT;TTOpening;TTClosing;>.BufferingSubscriber;"
.local p2, "child":Lrx/Subscriber;, "Lrx/Subscriber<-Ljava/util/List<TT;>;>;"
iput-object p1, p0, Lrx/internal/operators/OperatorBufferWithStartEndObservable$BufferingSubscriber;->this$0:Lrx/internal/operators/OperatorBufferWithStartEndObservable;
invoke-direct {p0}, Lrx/Subscriber;-><init>()V
iput-object p2, p0, Lrx/internal/operators/OperatorBufferWithStartEndObservable$BufferingSubscriber;->child:Lrx/Subscriber;
new-instance v0, Ljava/util/LinkedList;
invoke-direct {v0}, Ljava/util/LinkedList;-><init>()V
iput-object v0, p0, Lrx/internal/operators/OperatorBufferWithStartEndObservable$BufferingSubscriber;->chunks:Ljava/util/List;
new-instance v0, Lrx/subscriptions/CompositeSubscription;
invoke-direct {v0}, Lrx/subscriptions/CompositeSubscription;-><init>()V
iput-object v0, p0, Lrx/internal/operators/OperatorBufferWithStartEndObservable$BufferingSubscriber;->closingSubscriptions:Lrx/subscriptions/CompositeSubscription;
iget-object v0, p0, Lrx/internal/operators/OperatorBufferWithStartEndObservable$BufferingSubscriber;->closingSubscriptions:Lrx/subscriptions/CompositeSubscription;
invoke-virtual {p0, v0}, Lrx/internal/operators/OperatorBufferWithStartEndObservable$BufferingSubscriber;->add(Lrx/Subscription;)V
return-void
.end method
# virtual methods
.method endBuffer(Ljava/util/List;)V
.locals 4
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/util/List",
"<TT;>;)V"
}
.end annotation
.prologue
.local p0, "this":Lrx/internal/operators/OperatorBufferWithStartEndObservable$BufferingSubscriber;, "Lrx/internal/operators/OperatorBufferWithStartEndObservable<TT;TTOpening;TTClosing;>.BufferingSubscriber;"
.local p1, "toEnd":Ljava/util/List;, "Ljava/util/List<TT;>;"
const/4 v0, 0x0
.local v0, "canEnd":Z
monitor-enter p0
:try_start_0
iget-boolean v3, p0, Lrx/internal/operators/OperatorBufferWithStartEndObservable$BufferingSubscriber;->done:Z
if-eqz v3, :cond_1
monitor-exit p0
:cond_0
:goto_0
return-void
:cond_1
iget-object v3, p0, Lrx/internal/operators/OperatorBufferWithStartEndObservable$BufferingSubscriber;->chunks:Ljava/util/List;
invoke-interface {v3}, Ljava/util/List;->iterator()Ljava/util/Iterator;
move-result-object v2
.local v2, "it":Ljava/util/Iterator;, "Ljava/util/Iterator<Ljava/util/List<TT;>;>;"
:cond_2
invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z
move-result v3
if-eqz v3, :cond_3
invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v1
check-cast v1, Ljava/util/List;
.local v1, "chunk":Ljava/util/List;, "Ljava/util/List<TT;>;"
if-ne v1, p1, :cond_2
const/4 v0, 0x1
invoke-interface {v2}, Ljava/util/Iterator;->remove()V
.end local v1 # "chunk":Ljava/util/List;, "Ljava/util/List<TT;>;"
:cond_3
monitor-exit p0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
if-eqz v0, :cond_0
iget-object v3, p0, Lrx/internal/operators/OperatorBufferWithStartEndObservable$BufferingSubscriber;->child:Lrx/Subscriber;
invoke-virtual {v3, p1}, Lrx/Subscriber;->onNext(Ljava/lang/Object;)V
goto :goto_0
.end local v2 # "it":Ljava/util/Iterator;, "Ljava/util/Iterator<Ljava/util/List<TT;>;>;"
:catchall_0
move-exception v3
:try_start_1
monitor-exit p0
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
throw v3
.end method
.method public onCompleted()V
.locals 5
.prologue
.local p0, "this":Lrx/internal/operators/OperatorBufferWithStartEndObservable$BufferingSubscriber;, "Lrx/internal/operators/OperatorBufferWithStartEndObservable<TT;TTOpening;TTClosing;>.BufferingSubscriber;"
:try_start_0
monitor-enter p0
:try_end_0
.catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_0} :catch_0
:try_start_1
iget-boolean v4, p0, Lrx/internal/operators/OperatorBufferWithStartEndObservable$BufferingSubscriber;->done:Z
if-eqz v4, :cond_0
monitor-exit p0
:goto_0
return-void
:cond_0
const/4 v4, 0x1
iput-boolean v4, p0, Lrx/internal/operators/OperatorBufferWithStartEndObservable$BufferingSubscriber;->done:Z
new-instance v3, Ljava/util/LinkedList;
iget-object v4, p0, Lrx/internal/operators/OperatorBufferWithStartEndObservable$BufferingSubscriber;->chunks:Ljava/util/List;
invoke-direct {v3, v4}, Ljava/util/LinkedList;-><init>(Ljava/util/Collection;)V
.local v3, "toEmit":Ljava/util/List;, "Ljava/util/List<Ljava/util/List<TT;>;>;"
iget-object v4, p0, Lrx/internal/operators/OperatorBufferWithStartEndObservable$BufferingSubscriber;->chunks:Ljava/util/List;
invoke-interface {v4}, Ljava/util/List;->clear()V
monitor-exit p0
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
:try_start_2
invoke-interface {v3}, Ljava/util/List;->iterator()Ljava/util/Iterator;
move-result-object v1
.local v1, "i$":Ljava/util/Iterator;
:goto_1
invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z
move-result v4
if-eqz v4, :cond_1
invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v0
check-cast v0, Ljava/util/List;
.local v0, "chunk":Ljava/util/List;, "Ljava/util/List<TT;>;"
iget-object v4, p0, Lrx/internal/operators/OperatorBufferWithStartEndObservable$BufferingSubscriber;->child:Lrx/Subscriber;
invoke-virtual {v4, v0}, Lrx/Subscriber;->onNext(Ljava/lang/Object;)V
:try_end_2
.catch Ljava/lang/Throwable; {:try_start_2 .. :try_end_2} :catch_0
goto :goto_1
.end local v0 # "chunk":Ljava/util/List;, "Ljava/util/List<TT;>;"
.end local v1 # "i$":Ljava/util/Iterator;
.end local v3 # "toEmit":Ljava/util/List;, "Ljava/util/List<Ljava/util/List<TT;>;>;"
:catch_0
move-exception v2
.local v2, "t":Ljava/lang/Throwable;
iget-object v4, p0, Lrx/internal/operators/OperatorBufferWithStartEndObservable$BufferingSubscriber;->child:Lrx/Subscriber;
invoke-static {v2, v4}, Lrx/exceptions/Exceptions;->throwOrReport(Ljava/lang/Throwable;Lrx/Observer;)V
goto :goto_0
.end local v2 # "t":Ljava/lang/Throwable;
:catchall_0
move-exception v4
:try_start_3
monitor-exit p0
:try_end_3
.catchall {:try_start_3 .. :try_end_3} :catchall_0
:try_start_4
throw v4
:try_end_4
.catch Ljava/lang/Throwable; {:try_start_4 .. :try_end_4} :catch_0
.restart local v1 # "i$":Ljava/util/Iterator;
.restart local v3 # "toEmit":Ljava/util/List;, "Ljava/util/List<Ljava/util/List<TT;>;>;"
:cond_1
iget-object v4, p0, Lrx/internal/operators/OperatorBufferWithStartEndObservable$BufferingSubscriber;->child:Lrx/Subscriber;
invoke-virtual {v4}, Lrx/Subscriber;->onCompleted()V
invoke-virtual {p0}, Lrx/internal/operators/OperatorBufferWithStartEndObservable$BufferingSubscriber;->unsubscribe()V
goto :goto_0
.end method
.method public onError(Ljava/lang/Throwable;)V
.locals 1
.param p1, "e" # Ljava/lang/Throwable;
.prologue
.local p0, "this":Lrx/internal/operators/OperatorBufferWithStartEndObservable$BufferingSubscriber;, "Lrx/internal/operators/OperatorBufferWithStartEndObservable<TT;TTOpening;TTClosing;>.BufferingSubscriber;"
monitor-enter p0
:try_start_0
iget-boolean v0, p0, Lrx/internal/operators/OperatorBufferWithStartEndObservable$BufferingSubscriber;->done:Z
if-eqz v0, :cond_0
monitor-exit p0
:goto_0
return-void
:cond_0
const/4 v0, 0x1
iput-boolean v0, p0, Lrx/internal/operators/OperatorBufferWithStartEndObservable$BufferingSubscriber;->done:Z
iget-object v0, p0, Lrx/internal/operators/OperatorBufferWithStartEndObservable$BufferingSubscriber;->chunks:Ljava/util/List;
invoke-interface {v0}, Ljava/util/List;->clear()V
monitor-exit p0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
iget-object v0, p0, Lrx/internal/operators/OperatorBufferWithStartEndObservable$BufferingSubscriber;->child:Lrx/Subscriber;
invoke-virtual {v0, p1}, Lrx/Subscriber;->onError(Ljava/lang/Throwable;)V
invoke-virtual {p0}, Lrx/internal/operators/OperatorBufferWithStartEndObservable$BufferingSubscriber;->unsubscribe()V
goto :goto_0
:catchall_0
move-exception v0
:try_start_1
monitor-exit p0
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
throw v0
.end method
.method public onNext(Ljava/lang/Object;)V
.locals 3
.annotation system Ldalvik/annotation/Signature;
value = {
"(TT;)V"
}
.end annotation
.prologue
.local p0, "this":Lrx/internal/operators/OperatorBufferWithStartEndObservable$BufferingSubscriber;, "Lrx/internal/operators/OperatorBufferWithStartEndObservable<TT;TTOpening;TTClosing;>.BufferingSubscriber;"
.local p1, "t":Ljava/lang/Object;, "TT;"
monitor-enter p0
:try_start_0
iget-object v2, p0, Lrx/internal/operators/OperatorBufferWithStartEndObservable$BufferingSubscriber;->chunks:Ljava/util/List;
invoke-interface {v2}, Ljava/util/List;->iterator()Ljava/util/Iterator;
move-result-object v1
.local v1, "i$":Ljava/util/Iterator;
:goto_0
invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z
move-result v2
if-eqz v2, :cond_0
invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v0
check-cast v0, Ljava/util/List;
.local v0, "chunk":Ljava/util/List;, "Ljava/util/List<TT;>;"
invoke-interface {v0, p1}, Ljava/util/List;->add(Ljava/lang/Object;)Z
goto :goto_0
.end local v0 # "chunk":Ljava/util/List;, "Ljava/util/List<TT;>;"
.end local v1 # "i$":Ljava/util/Iterator;
:catchall_0
move-exception v2
monitor-exit p0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
throw v2
.restart local v1 # "i$":Ljava/util/Iterator;
:cond_0
:try_start_1
monitor-exit p0
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
return-void
.end method
.method startBuffer(Ljava/lang/Object;)V
.locals 5
.annotation system Ldalvik/annotation/Signature;
value = {
"(TTOpening;)V"
}
.end annotation
.prologue
.local p0, "this":Lrx/internal/operators/OperatorBufferWithStartEndObservable$BufferingSubscriber;, "Lrx/internal/operators/OperatorBufferWithStartEndObservable<TT;TTOpening;TTClosing;>.BufferingSubscriber;"
.local p1, "v":Ljava/lang/Object;, "TTOpening;"
new-instance v0, Ljava/util/ArrayList;
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
.local v0, "chunk":Ljava/util/List;, "Ljava/util/List<TT;>;"
monitor-enter p0
:try_start_0
iget-boolean v4, p0, Lrx/internal/operators/OperatorBufferWithStartEndObservable$BufferingSubscriber;->done:Z
if-eqz v4, :cond_0
monitor-exit p0
:goto_0
return-void
:cond_0
iget-object v4, p0, Lrx/internal/operators/OperatorBufferWithStartEndObservable$BufferingSubscriber;->chunks:Ljava/util/List;
invoke-interface {v4, v0}, Ljava/util/List;->add(Ljava/lang/Object;)Z
monitor-exit p0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
:try_start_1
iget-object v4, p0, Lrx/internal/operators/OperatorBufferWithStartEndObservable$BufferingSubscriber;->this$0:Lrx/internal/operators/OperatorBufferWithStartEndObservable;
iget-object v4, v4, Lrx/internal/operators/OperatorBufferWithStartEndObservable;->bufferClosing:Lrx/functions/Func1;
invoke-interface {v4, p1}, Lrx/functions/Func1;->call(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v2
check-cast v2, Lrx/Observable;
:try_end_1
.catch Ljava/lang/Throwable; {:try_start_1 .. :try_end_1} :catch_0
.local v2, "cobs":Lrx/Observable;, "Lrx/Observable<+TTClosing;>;"
new-instance v1, Lrx/internal/operators/OperatorBufferWithStartEndObservable$BufferingSubscriber$1;
invoke-direct {v1, p0, v0}, Lrx/internal/operators/OperatorBufferWithStartEndObservable$BufferingSubscriber$1;-><init>(Lrx/internal/operators/OperatorBufferWithStartEndObservable$BufferingSubscriber;Ljava/util/List;)V
.local v1, "closeSubscriber":Lrx/Subscriber;, "Lrx/Subscriber<TTClosing;>;"
iget-object v4, p0, Lrx/internal/operators/OperatorBufferWithStartEndObservable$BufferingSubscriber;->closingSubscriptions:Lrx/subscriptions/CompositeSubscription;
invoke-virtual {v4, v1}, Lrx/subscriptions/CompositeSubscription;->add(Lrx/Subscription;)V
invoke-virtual {v2, v1}, Lrx/Observable;->unsafeSubscribe(Lrx/Subscriber;)Lrx/Subscription;
goto :goto_0
.end local v1 # "closeSubscriber":Lrx/Subscriber;, "Lrx/Subscriber<TTClosing;>;"
.end local v2 # "cobs":Lrx/Observable;, "Lrx/Observable<+TTClosing;>;"
:catchall_0
move-exception v4
:try_start_2
monitor-exit p0
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_0
throw v4
:catch_0
move-exception v3
.local v3, "t":Ljava/lang/Throwable;
invoke-static {v3, p0}, Lrx/exceptions/Exceptions;->throwOrReport(Ljava/lang/Throwable;Lrx/Observer;)V
goto :goto_0
.end method