695 lines
16 KiB
Smali
695 lines
16 KiB
Smali
.class public final enum Lio/reactivex/rxjava3/internal/subscriptions/SubscriptionHelper;
|
|
.super Ljava/lang/Enum;
|
|
.source "SubscriptionHelper.java"
|
|
|
|
# interfaces
|
|
.implements Lok/e;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/lang/Enum<",
|
|
"Lio/reactivex/rxjava3/internal/subscriptions/SubscriptionHelper;",
|
|
">;",
|
|
"Lok/e;"
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field private static final synthetic $VALUES:[Lio/reactivex/rxjava3/internal/subscriptions/SubscriptionHelper;
|
|
|
|
.field public static final enum CANCELLED:Lio/reactivex/rxjava3/internal/subscriptions/SubscriptionHelper;
|
|
|
|
|
|
# direct methods
|
|
.method public static constructor <clinit>()V
|
|
.locals 3
|
|
|
|
.line 1
|
|
new-instance v0, Lio/reactivex/rxjava3/internal/subscriptions/SubscriptionHelper;
|
|
|
|
const-string v1, "CANCELLED"
|
|
|
|
const/4 v2, 0x0
|
|
|
|
invoke-direct {v0, v1, v2}, Lio/reactivex/rxjava3/internal/subscriptions/SubscriptionHelper;-><init>(Ljava/lang/String;I)V
|
|
|
|
sput-object v0, Lio/reactivex/rxjava3/internal/subscriptions/SubscriptionHelper;->CANCELLED:Lio/reactivex/rxjava3/internal/subscriptions/SubscriptionHelper;
|
|
|
|
const/4 v1, 0x1
|
|
|
|
new-array v1, v1, [Lio/reactivex/rxjava3/internal/subscriptions/SubscriptionHelper;
|
|
|
|
aput-object v0, v1, v2
|
|
|
|
.line 2
|
|
sput-object v1, Lio/reactivex/rxjava3/internal/subscriptions/SubscriptionHelper;->$VALUES:[Lio/reactivex/rxjava3/internal/subscriptions/SubscriptionHelper;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private constructor <init>(Ljava/lang/String;I)V
|
|
.locals 0
|
|
.annotation system Ldalvik/annotation/MethodParameters;
|
|
accessFlags = {
|
|
0x1000,
|
|
0x1000
|
|
}
|
|
names = {
|
|
"$enum$name",
|
|
"$enum$ordinal"
|
|
}
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()V"
|
|
}
|
|
.end annotation
|
|
|
|
.line 1
|
|
invoke-direct {p0, p1, p2}, Ljava/lang/Enum;-><init>(Ljava/lang/String;I)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static cancel(Ljava/util/concurrent/atomic/AtomicReference;)Z
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/MethodParameters;
|
|
accessFlags = {
|
|
0x0
|
|
}
|
|
names = {
|
|
"field"
|
|
}
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/util/concurrent/atomic/AtomicReference<",
|
|
"Lok/e;",
|
|
">;)Z"
|
|
}
|
|
.end annotation
|
|
|
|
.line 1
|
|
invoke-virtual {p0}, Ljava/util/concurrent/atomic/AtomicReference;->get()Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Lok/e;
|
|
|
|
.line 2
|
|
sget-object v1, Lio/reactivex/rxjava3/internal/subscriptions/SubscriptionHelper;->CANCELLED:Lio/reactivex/rxjava3/internal/subscriptions/SubscriptionHelper;
|
|
|
|
if-eq v0, v1, :cond_1
|
|
|
|
.line 3
|
|
invoke-virtual {p0, v1}, Ljava/util/concurrent/atomic/AtomicReference;->getAndSet(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object p0
|
|
|
|
check-cast p0, Lok/e;
|
|
|
|
if-eq p0, v1, :cond_1
|
|
|
|
if-eqz p0, :cond_0
|
|
|
|
.line 4
|
|
invoke-interface {p0}, Lok/e;->cancel()V
|
|
|
|
:cond_0
|
|
const/4 p0, 0x1
|
|
|
|
return p0
|
|
|
|
:cond_1
|
|
const/4 p0, 0x0
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method public static deferredRequest(Ljava/util/concurrent/atomic/AtomicReference;Ljava/util/concurrent/atomic/AtomicLong;J)V
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/MethodParameters;
|
|
accessFlags = {
|
|
0x0,
|
|
0x0,
|
|
0x0
|
|
}
|
|
names = {
|
|
"field",
|
|
"requested",
|
|
"n"
|
|
}
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/util/concurrent/atomic/AtomicReference<",
|
|
"Lok/e;",
|
|
">;",
|
|
"Ljava/util/concurrent/atomic/AtomicLong;",
|
|
"J)V"
|
|
}
|
|
.end annotation
|
|
|
|
.line 1
|
|
invoke-virtual {p0}, Ljava/util/concurrent/atomic/AtomicReference;->get()Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Lok/e;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 2
|
|
invoke-interface {v0, p2, p3}, Lok/e;->request(J)V
|
|
|
|
goto :goto_0
|
|
|
|
.line 3
|
|
:cond_0
|
|
invoke-static {p2, p3}, Lio/reactivex/rxjava3/internal/subscriptions/SubscriptionHelper;->validate(J)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
.line 4
|
|
invoke-static {p1, p2, p3}, Lio/reactivex/rxjava3/internal/util/b;->a(Ljava/util/concurrent/atomic/AtomicLong;J)J
|
|
|
|
.line 5
|
|
invoke-virtual {p0}, Ljava/util/concurrent/atomic/AtomicReference;->get()Ljava/lang/Object;
|
|
|
|
move-result-object p0
|
|
|
|
check-cast p0, Lok/e;
|
|
|
|
if-eqz p0, :cond_1
|
|
|
|
const-wide/16 p2, 0x0
|
|
|
|
.line 6
|
|
invoke-virtual {p1, p2, p3}, Ljava/util/concurrent/atomic/AtomicLong;->getAndSet(J)J
|
|
|
|
move-result-wide v0
|
|
|
|
cmp-long p1, v0, p2
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
.line 7
|
|
invoke-interface {p0, v0, v1}, Lok/e;->request(J)V
|
|
|
|
:cond_1
|
|
:goto_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public static deferredSetOnce(Ljava/util/concurrent/atomic/AtomicReference;Ljava/util/concurrent/atomic/AtomicLong;Lok/e;)Z
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/MethodParameters;
|
|
accessFlags = {
|
|
0x0,
|
|
0x0,
|
|
0x0
|
|
}
|
|
names = {
|
|
"field",
|
|
"requested",
|
|
"s"
|
|
}
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/util/concurrent/atomic/AtomicReference<",
|
|
"Lok/e;",
|
|
">;",
|
|
"Ljava/util/concurrent/atomic/AtomicLong;",
|
|
"Lok/e;",
|
|
")Z"
|
|
}
|
|
.end annotation
|
|
|
|
.line 1
|
|
invoke-static {p0, p2}, Lio/reactivex/rxjava3/internal/subscriptions/SubscriptionHelper;->setOnce(Ljava/util/concurrent/atomic/AtomicReference;Lok/e;)Z
|
|
|
|
move-result p0
|
|
|
|
if-eqz p0, :cond_1
|
|
|
|
const-wide/16 v0, 0x0
|
|
|
|
.line 2
|
|
invoke-virtual {p1, v0, v1}, Ljava/util/concurrent/atomic/AtomicLong;->getAndSet(J)J
|
|
|
|
move-result-wide p0
|
|
|
|
cmp-long v0, p0, v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 3
|
|
invoke-interface {p2, p0, p1}, Lok/e;->request(J)V
|
|
|
|
:cond_0
|
|
const/4 p0, 0x1
|
|
|
|
return p0
|
|
|
|
:cond_1
|
|
const/4 p0, 0x0
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method public static replace(Ljava/util/concurrent/atomic/AtomicReference;Lok/e;)Z
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/MethodParameters;
|
|
accessFlags = {
|
|
0x0,
|
|
0x0
|
|
}
|
|
names = {
|
|
"field",
|
|
"s"
|
|
}
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/util/concurrent/atomic/AtomicReference<",
|
|
"Lok/e;",
|
|
">;",
|
|
"Lok/e;",
|
|
")Z"
|
|
}
|
|
.end annotation
|
|
|
|
.line 1
|
|
:cond_0
|
|
invoke-virtual {p0}, Ljava/util/concurrent/atomic/AtomicReference;->get()Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Lok/e;
|
|
|
|
.line 2
|
|
sget-object v1, Lio/reactivex/rxjava3/internal/subscriptions/SubscriptionHelper;->CANCELLED:Lio/reactivex/rxjava3/internal/subscriptions/SubscriptionHelper;
|
|
|
|
if-ne v0, v1, :cond_2
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
.line 3
|
|
invoke-interface {p1}, Lok/e;->cancel()V
|
|
|
|
:cond_1
|
|
const/4 p0, 0x0
|
|
|
|
return p0
|
|
|
|
.line 4
|
|
:cond_2
|
|
invoke-virtual {p0, v0, p1}, Ljava/util/concurrent/atomic/AtomicReference;->compareAndSet(Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
const/4 p0, 0x1
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method public static reportMoreProduced(J)V
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/MethodParameters;
|
|
accessFlags = {
|
|
0x0
|
|
}
|
|
names = {
|
|
"n"
|
|
}
|
|
.end annotation
|
|
|
|
.line 1
|
|
new-instance v0, Lio/reactivex/rxjava3/exceptions/ProtocolViolationException;
|
|
|
|
const-string v1, "More produced than requested: "
|
|
|
|
invoke-static {v1, p0, p1}, Landroidx/camera/core/l1;->a(Ljava/lang/String;J)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-direct {v0, p0}, Lio/reactivex/rxjava3/exceptions/ProtocolViolationException;-><init>(Ljava/lang/String;)V
|
|
|
|
invoke-static {v0}, Lji/a;->Y(Ljava/lang/Throwable;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static reportSubscriptionSet()V
|
|
.locals 2
|
|
|
|
.line 1
|
|
new-instance v0, Lio/reactivex/rxjava3/exceptions/ProtocolViolationException;
|
|
|
|
const-string v1, "Subscription already set!"
|
|
|
|
invoke-direct {v0, v1}, Lio/reactivex/rxjava3/exceptions/ProtocolViolationException;-><init>(Ljava/lang/String;)V
|
|
|
|
invoke-static {v0}, Lji/a;->Y(Ljava/lang/Throwable;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static set(Ljava/util/concurrent/atomic/AtomicReference;Lok/e;)Z
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/MethodParameters;
|
|
accessFlags = {
|
|
0x0,
|
|
0x0
|
|
}
|
|
names = {
|
|
"field",
|
|
"s"
|
|
}
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/util/concurrent/atomic/AtomicReference<",
|
|
"Lok/e;",
|
|
">;",
|
|
"Lok/e;",
|
|
")Z"
|
|
}
|
|
.end annotation
|
|
|
|
.line 1
|
|
:cond_0
|
|
invoke-virtual {p0}, Ljava/util/concurrent/atomic/AtomicReference;->get()Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Lok/e;
|
|
|
|
.line 2
|
|
sget-object v1, Lio/reactivex/rxjava3/internal/subscriptions/SubscriptionHelper;->CANCELLED:Lio/reactivex/rxjava3/internal/subscriptions/SubscriptionHelper;
|
|
|
|
if-ne v0, v1, :cond_2
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
.line 3
|
|
invoke-interface {p1}, Lok/e;->cancel()V
|
|
|
|
:cond_1
|
|
const/4 p0, 0x0
|
|
|
|
return p0
|
|
|
|
.line 4
|
|
:cond_2
|
|
invoke-virtual {p0, v0, p1}, Ljava/util/concurrent/atomic/AtomicReference;->compareAndSet(Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
if-eqz v0, :cond_3
|
|
|
|
.line 5
|
|
invoke-interface {v0}, Lok/e;->cancel()V
|
|
|
|
:cond_3
|
|
const/4 p0, 0x1
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method public static setOnce(Ljava/util/concurrent/atomic/AtomicReference;Lok/e;)Z
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/MethodParameters;
|
|
accessFlags = {
|
|
0x0,
|
|
0x0
|
|
}
|
|
names = {
|
|
"field",
|
|
"s"
|
|
}
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/util/concurrent/atomic/AtomicReference<",
|
|
"Lok/e;",
|
|
">;",
|
|
"Lok/e;",
|
|
")Z"
|
|
}
|
|
.end annotation
|
|
|
|
const-string v0, "s is null"
|
|
|
|
.line 1
|
|
invoke-static {p1, v0}, Ljava/util/Objects;->requireNonNull(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 2
|
|
invoke-virtual {p0, v0, p1}, Ljava/util/concurrent/atomic/AtomicReference;->compareAndSet(Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
.line 3
|
|
invoke-interface {p1}, Lok/e;->cancel()V
|
|
|
|
.line 4
|
|
invoke-virtual {p0}, Ljava/util/concurrent/atomic/AtomicReference;->get()Ljava/lang/Object;
|
|
|
|
move-result-object p0
|
|
|
|
sget-object p1, Lio/reactivex/rxjava3/internal/subscriptions/SubscriptionHelper;->CANCELLED:Lio/reactivex/rxjava3/internal/subscriptions/SubscriptionHelper;
|
|
|
|
if-eq p0, p1, :cond_0
|
|
|
|
.line 5
|
|
invoke-static {}, Lio/reactivex/rxjava3/internal/subscriptions/SubscriptionHelper;->reportSubscriptionSet()V
|
|
|
|
:cond_0
|
|
const/4 p0, 0x0
|
|
|
|
return p0
|
|
|
|
:cond_1
|
|
const/4 p0, 0x1
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method public static setOnce(Ljava/util/concurrent/atomic/AtomicReference;Lok/e;J)Z
|
|
.locals 0
|
|
.annotation system Ldalvik/annotation/MethodParameters;
|
|
accessFlags = {
|
|
0x0,
|
|
0x0,
|
|
0x0
|
|
}
|
|
names = {
|
|
"field",
|
|
"s",
|
|
"request"
|
|
}
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/util/concurrent/atomic/AtomicReference<",
|
|
"Lok/e;",
|
|
">;",
|
|
"Lok/e;",
|
|
"J)Z"
|
|
}
|
|
.end annotation
|
|
|
|
.line 6
|
|
invoke-static {p0, p1}, Lio/reactivex/rxjava3/internal/subscriptions/SubscriptionHelper;->setOnce(Ljava/util/concurrent/atomic/AtomicReference;Lok/e;)Z
|
|
|
|
move-result p0
|
|
|
|
if-eqz p0, :cond_0
|
|
|
|
.line 7
|
|
invoke-interface {p1, p2, p3}, Lok/e;->request(J)V
|
|
|
|
const/4 p0, 0x1
|
|
|
|
return p0
|
|
|
|
:cond_0
|
|
const/4 p0, 0x0
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method public static validate(J)Z
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/MethodParameters;
|
|
accessFlags = {
|
|
0x0
|
|
}
|
|
names = {
|
|
"n"
|
|
}
|
|
.end annotation
|
|
|
|
const-wide/16 v0, 0x0
|
|
|
|
cmp-long v0, p0, v0
|
|
|
|
if-gtz v0, :cond_0
|
|
|
|
.line 4
|
|
new-instance v0, Ljava/lang/IllegalArgumentException;
|
|
|
|
const-string v1, "n > 0 required but it was "
|
|
|
|
invoke-static {v1, p0, p1}, Landroidx/camera/core/l1;->a(Ljava/lang/String;J)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-direct {v0, p0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
invoke-static {v0}, Lji/a;->Y(Ljava/lang/Throwable;)V
|
|
|
|
const/4 p0, 0x0
|
|
|
|
return p0
|
|
|
|
:cond_0
|
|
const/4 p0, 0x1
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method public static validate(Lok/e;Lok/e;)Z
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/MethodParameters;
|
|
accessFlags = {
|
|
0x0,
|
|
0x0
|
|
}
|
|
names = {
|
|
"current",
|
|
"next"
|
|
}
|
|
.end annotation
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
.line 1
|
|
new-instance p0, Ljava/lang/NullPointerException;
|
|
|
|
const-string p1, "next is null"
|
|
|
|
invoke-direct {p0, p1}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
|
|
|
|
invoke-static {p0}, Lji/a;->Y(Ljava/lang/Throwable;)V
|
|
|
|
return v0
|
|
|
|
:cond_0
|
|
if-eqz p0, :cond_1
|
|
|
|
.line 2
|
|
invoke-interface {p1}, Lok/e;->cancel()V
|
|
|
|
.line 3
|
|
invoke-static {}, Lio/reactivex/rxjava3/internal/subscriptions/SubscriptionHelper;->reportSubscriptionSet()V
|
|
|
|
return v0
|
|
|
|
:cond_1
|
|
const/4 p0, 0x1
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method public static valueOf(Ljava/lang/String;)Lio/reactivex/rxjava3/internal/subscriptions/SubscriptionHelper;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/MethodParameters;
|
|
accessFlags = {
|
|
0x8000
|
|
}
|
|
names = {
|
|
"name"
|
|
}
|
|
.end annotation
|
|
|
|
.line 1
|
|
const-class v0, Lio/reactivex/rxjava3/internal/subscriptions/SubscriptionHelper;
|
|
|
|
invoke-static {v0, p0}, Ljava/lang/Enum;->valueOf(Ljava/lang/Class;Ljava/lang/String;)Ljava/lang/Enum;
|
|
|
|
move-result-object p0
|
|
|
|
check-cast p0, Lio/reactivex/rxjava3/internal/subscriptions/SubscriptionHelper;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static values()[Lio/reactivex/rxjava3/internal/subscriptions/SubscriptionHelper;
|
|
.locals 1
|
|
|
|
.line 1
|
|
sget-object v0, Lio/reactivex/rxjava3/internal/subscriptions/SubscriptionHelper;->$VALUES:[Lio/reactivex/rxjava3/internal/subscriptions/SubscriptionHelper;
|
|
|
|
invoke-virtual {v0}, [Lio/reactivex/rxjava3/internal/subscriptions/SubscriptionHelper;->clone()Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, [Lio/reactivex/rxjava3/internal/subscriptions/SubscriptionHelper;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public cancel()V
|
|
.locals 0
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public request(J)V
|
|
.locals 0
|
|
.annotation system Ldalvik/annotation/MethodParameters;
|
|
accessFlags = {
|
|
0x0
|
|
}
|
|
names = {
|
|
"n"
|
|
}
|
|
.end annotation
|
|
|
|
return-void
|
|
.end method
|