371 lines
8.6 KiB
Smali
371 lines
8.6 KiB
Smali
.class abstract Lio/reactivex/rxjava3/internal/jdk8/FlowableFromStream$AbstractStreamSubscription;
|
|
.super Ljava/util/concurrent/atomic/AtomicLong;
|
|
.source "FlowableFromStream.java"
|
|
|
|
# interfaces
|
|
.implements Lei/n;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
value = Lio/reactivex/rxjava3/internal/jdk8/FlowableFromStream;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x409
|
|
name = "AbstractStreamSubscription"
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"<T:",
|
|
"Ljava/lang/Object;",
|
|
">",
|
|
"Ljava/util/concurrent/atomic/AtomicLong;",
|
|
"Lei/n<",
|
|
"TT;>;"
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field private static final serialVersionUID:J = -0x7e0d232dac4fd48dL
|
|
|
|
|
|
# instance fields
|
|
.field public volatile cancelled:Z
|
|
|
|
.field public closeable:Ljava/lang/AutoCloseable;
|
|
|
|
.field public iterator:Ljava/util/Iterator;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/Iterator<",
|
|
"TT;>;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public once:Z
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Ljava/util/Iterator;Ljava/lang/AutoCloseable;)V
|
|
.locals 0
|
|
.annotation system Ldalvik/annotation/MethodParameters;
|
|
accessFlags = {
|
|
0x0,
|
|
0x0
|
|
}
|
|
names = {
|
|
"iterator",
|
|
"closeable"
|
|
}
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/util/Iterator<",
|
|
"TT;>;",
|
|
"Ljava/lang/AutoCloseable;",
|
|
")V"
|
|
}
|
|
.end annotation
|
|
|
|
.line 1
|
|
invoke-direct {p0}, Ljava/util/concurrent/atomic/AtomicLong;-><init>()V
|
|
|
|
.line 2
|
|
iput-object p1, p0, Lio/reactivex/rxjava3/internal/jdk8/FlowableFromStream$AbstractStreamSubscription;->iterator:Ljava/util/Iterator;
|
|
|
|
.line 3
|
|
iput-object p2, p0, Lio/reactivex/rxjava3/internal/jdk8/FlowableFromStream$AbstractStreamSubscription;->closeable:Ljava/lang/AutoCloseable;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public cancel()V
|
|
.locals 2
|
|
|
|
const/4 v0, 0x1
|
|
|
|
.line 1
|
|
iput-boolean v0, p0, Lio/reactivex/rxjava3/internal/jdk8/FlowableFromStream$AbstractStreamSubscription;->cancelled:Z
|
|
|
|
const-wide/16 v0, 0x1
|
|
|
|
.line 2
|
|
invoke-virtual {p0, v0, v1}, Lio/reactivex/rxjava3/internal/jdk8/FlowableFromStream$AbstractStreamSubscription;->request(J)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public clear()V
|
|
.locals 2
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 1
|
|
iput-object v0, p0, Lio/reactivex/rxjava3/internal/jdk8/FlowableFromStream$AbstractStreamSubscription;->iterator:Ljava/util/Iterator;
|
|
|
|
.line 2
|
|
iget-object v1, p0, Lio/reactivex/rxjava3/internal/jdk8/FlowableFromStream$AbstractStreamSubscription;->closeable:Ljava/lang/AutoCloseable;
|
|
|
|
.line 3
|
|
iput-object v0, p0, Lio/reactivex/rxjava3/internal/jdk8/FlowableFromStream$AbstractStreamSubscription;->closeable:Ljava/lang/AutoCloseable;
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
.line 4
|
|
invoke-static {v1}, Lio/reactivex/rxjava3/internal/jdk8/FlowableFromStream;->n9(Ljava/lang/AutoCloseable;)V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public isEmpty()Z
|
|
.locals 2
|
|
|
|
.line 1
|
|
iget-object v0, p0, Lio/reactivex/rxjava3/internal/jdk8/FlowableFromStream$AbstractStreamSubscription;->iterator:Ljava/util/Iterator;
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
.line 2
|
|
iget-boolean v1, p0, Lio/reactivex/rxjava3/internal/jdk8/FlowableFromStream$AbstractStreamSubscription;->once:Z
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
.line 3
|
|
:cond_0
|
|
invoke-virtual {p0}, Lio/reactivex/rxjava3/internal/jdk8/FlowableFromStream$AbstractStreamSubscription;->clear()V
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
:goto_0
|
|
const/4 v0, 0x0
|
|
|
|
return v0
|
|
|
|
:cond_2
|
|
:goto_1
|
|
const/4 v0, 0x1
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public offer(Ljava/lang/Object;)Z
|
|
.locals 0
|
|
.param p1 # Ljava/lang/Object;
|
|
.annotation build Lio/reactivex/rxjava3/annotations/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.annotation system Ldalvik/annotation/MethodParameters;
|
|
accessFlags = {
|
|
0x0
|
|
}
|
|
names = {
|
|
"value"
|
|
}
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(TT;)Z"
|
|
}
|
|
.end annotation
|
|
|
|
.line 1
|
|
new-instance p1, Ljava/lang/UnsupportedOperationException;
|
|
|
|
invoke-direct {p1}, Ljava/lang/UnsupportedOperationException;-><init>()V
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public offer(Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
.locals 0
|
|
.param p1 # Ljava/lang/Object;
|
|
.annotation build Lio/reactivex/rxjava3/annotations/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.param p2 # Ljava/lang/Object;
|
|
.annotation build Lio/reactivex/rxjava3/annotations/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.annotation system Ldalvik/annotation/MethodParameters;
|
|
accessFlags = {
|
|
0x0,
|
|
0x0
|
|
}
|
|
names = {
|
|
"v1",
|
|
"v2"
|
|
}
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(TT;TT;)Z"
|
|
}
|
|
.end annotation
|
|
|
|
.line 2
|
|
new-instance p1, Ljava/lang/UnsupportedOperationException;
|
|
|
|
invoke-direct {p1}, Ljava/lang/UnsupportedOperationException;-><init>()V
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public poll()Ljava/lang/Object;
|
|
.locals 3
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()TT;"
|
|
}
|
|
.end annotation
|
|
|
|
.annotation build Lio/reactivex/rxjava3/annotations/Nullable;
|
|
.end annotation
|
|
|
|
.line 1
|
|
iget-object v0, p0, Lio/reactivex/rxjava3/internal/jdk8/FlowableFromStream$AbstractStreamSubscription;->iterator:Ljava/util/Iterator;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
return-object v1
|
|
|
|
.line 2
|
|
:cond_0
|
|
iget-boolean v2, p0, Lio/reactivex/rxjava3/internal/jdk8/FlowableFromStream$AbstractStreamSubscription;->once:Z
|
|
|
|
if-nez v2, :cond_1
|
|
|
|
const/4 v0, 0x1
|
|
|
|
.line 3
|
|
iput-boolean v0, p0, Lio/reactivex/rxjava3/internal/jdk8/FlowableFromStream$AbstractStreamSubscription;->once:Z
|
|
|
|
goto :goto_0
|
|
|
|
.line 4
|
|
:cond_1
|
|
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_2
|
|
|
|
.line 5
|
|
invoke-virtual {p0}, Lio/reactivex/rxjava3/internal/jdk8/FlowableFromStream$AbstractStreamSubscription;->clear()V
|
|
|
|
return-object v1
|
|
|
|
.line 6
|
|
:cond_2
|
|
:goto_0
|
|
iget-object v0, p0, Lio/reactivex/rxjava3/internal/jdk8/FlowableFromStream$AbstractStreamSubscription;->iterator:Ljava/util/Iterator;
|
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "The Stream\'s Iterator.next() returned a null value"
|
|
|
|
invoke-static {v0, v1}, Ljava/util/Objects;->requireNonNull(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public request(J)V
|
|
.locals 4
|
|
.annotation system Ldalvik/annotation/MethodParameters;
|
|
accessFlags = {
|
|
0x0
|
|
}
|
|
names = {
|
|
"n"
|
|
}
|
|
.end annotation
|
|
|
|
.line 1
|
|
invoke-static {p1, p2}, Lio/reactivex/rxjava3/internal/subscriptions/SubscriptionHelper;->validate(J)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 2
|
|
invoke-static {p0, p1, p2}, Lio/reactivex/rxjava3/internal/util/b;->a(Ljava/util/concurrent/atomic/AtomicLong;J)J
|
|
|
|
move-result-wide v0
|
|
|
|
const-wide/16 v2, 0x0
|
|
|
|
cmp-long v0, v0, v2
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
.line 3
|
|
invoke-virtual {p0, p1, p2}, Lio/reactivex/rxjava3/internal/jdk8/FlowableFromStream$AbstractStreamSubscription;->run(J)V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public requestFusion(I)I
|
|
.locals 3
|
|
.annotation system Ldalvik/annotation/MethodParameters;
|
|
accessFlags = {
|
|
0x0
|
|
}
|
|
names = {
|
|
"mode"
|
|
}
|
|
.end annotation
|
|
|
|
const/4 v0, 0x1
|
|
|
|
and-int/2addr p1, v0
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
const-wide v1, 0x7fffffffffffffffL
|
|
|
|
.line 1
|
|
invoke-virtual {p0, v1, v2}, Ljava/util/concurrent/atomic/AtomicLong;->lazySet(J)V
|
|
|
|
return v0
|
|
|
|
:cond_0
|
|
const/4 p1, 0x0
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method public abstract run(J)V
|
|
.annotation system Ldalvik/annotation/MethodParameters;
|
|
accessFlags = {
|
|
0x0
|
|
}
|
|
names = {
|
|
"n"
|
|
}
|
|
.end annotation
|
|
.end method
|