Rabbit-R1/switch port/smali/smali_classes3/okio/AsyncTimeout.smali
2024-05-21 17:08:36 -04:00

480 lines
12 KiB
Smali

.class public Lokio/AsyncTimeout;
.super Lokio/Timeout;
.source "AsyncTimeout.kt"
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lokio/AsyncTimeout$Watchdog;,
Lokio/AsyncTimeout$Companion;
}
.end annotation
.annotation system Ldalvik/annotation/SourceDebugExtension;
value = "SMAP\nAsyncTimeout.kt\nKotlin\n*S Kotlin\n*F\n+ 1 AsyncTimeout.kt\nokio/AsyncTimeout\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,327:1\n1#2:328\n*E\n"
.end annotation
.annotation runtime Lkotlin/Metadata;
bv = {
0x1,
0x0,
0x3
}
d1 = {
"\u0000@\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0008\u0002\n\u0002\u0010\u000b\n\u0002\u0008\u0002\n\u0002\u0010\t\n\u0000\n\u0002\u0018\u0002\n\u0002\u0008\u0002\n\u0002\u0010\u0002\n\u0002\u0008\u0005\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0008\u0004\n\u0002\u0018\u0002\n\u0002\u0008\u0004\u0008\u0016\u0018\u0000 \u001b2\u00020\u0001:\u0002\u001b\u001cB\u0005\u00a2\u0006\u0002\u0010\u0002J\u0012\u0010\u0008\u001a\u00020\t2\u0008\u0010\n\u001a\u0004\u0018\u00010\tH\u0001J\u0006\u0010\u000b\u001a\u00020\u000cJ\u0006\u0010\r\u001a\u00020\u0004J\u0012\u0010\u000e\u001a\u00020\t2\u0008\u0010\n\u001a\u0004\u0018\u00010\tH\u0014J\u0010\u0010\u000f\u001a\u00020\u00072\u0006\u0010\u0010\u001a\u00020\u0007H\u0002J\u000e\u0010\u0011\u001a\u00020\u00122\u0006\u0010\u0011\u001a\u00020\u0012J\u000e\u0010\u0013\u001a\u00020\u00142\u0006\u0010\u0013\u001a\u00020\u0014J\u0008\u0010\u0015\u001a\u00020\u000cH\u0014J%\u0010\u0016\u001a\u0002H\u0017\"\u0004\u0008\u0000\u0010\u00172\u000c\u0010\u0018\u001a\u0008\u0012\u0004\u0012\u0002H\u00170\u0019H\u0086\u0008\u00f8\u0001\u0000\u00a2\u0006\u0002\u0010\u001aR\u000e\u0010\u0003\u001a\u00020\u0004X\u0082\u000e\u00a2\u0006\u0002\n\u0000R\u0010\u0010\u0005\u001a\u0004\u0018\u00010\u0000X\u0082\u000e\u00a2\u0006\u0002\n\u0000R\u000e\u0010\u0006\u001a\u00020\u0007X\u0082\u000e\u00a2\u0006\u0002\n\u0000\u0082\u0002\u0007\n\u0005\u0008\u009920\u0001\u00a8\u0006\u001d"
}
d2 = {
"Lokio/AsyncTimeout;",
"Lokio/Timeout;",
"()V",
"inQueue",
"",
"next",
"timeoutAt",
"",
"access$newTimeoutException",
"Ljava/io/IOException;",
"cause",
"enter",
"",
"exit",
"newTimeoutException",
"remainingNanos",
"now",
"sink",
"Lokio/Sink;",
"source",
"Lokio/Source;",
"timedOut",
"withTimeout",
"T",
"block",
"Lkotlin/Function0;",
"(Lkotlin/jvm/functions/Function0;)Ljava/lang/Object;",
"Companion",
"Watchdog",
"okio"
}
k = 0x1
mv = {
0x1,
0x4,
0x0
}
.end annotation
# static fields
.field public static final Companion:Lokio/AsyncTimeout$Companion;
.field private static final IDLE_TIMEOUT_MILLIS:J
.field private static final IDLE_TIMEOUT_NANOS:J
.field private static final TIMEOUT_WRITE_SIZE:I = 0x10000
.field private static head:Lokio/AsyncTimeout;
# instance fields
.field private inQueue:Z
.field private next:Lokio/AsyncTimeout;
.field private timeoutAt:J
# direct methods
.method static constructor <clinit>()V
.locals 3
new-instance v0, Lokio/AsyncTimeout$Companion;
const/4 v1, 0x0
invoke-direct {v0, v1}, Lokio/AsyncTimeout$Companion;-><init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
sput-object v0, Lokio/AsyncTimeout;->Companion:Lokio/AsyncTimeout$Companion;
.line 214
sget-object v0, Ljava/util/concurrent/TimeUnit;->SECONDS:Ljava/util/concurrent/TimeUnit;
const-wide/16 v1, 0x3c
invoke-virtual {v0, v1, v2}, Ljava/util/concurrent/TimeUnit;->toMillis(J)J
move-result-wide v0
sput-wide v0, Lokio/AsyncTimeout;->IDLE_TIMEOUT_MILLIS:J
.line 215
sget-object v2, Ljava/util/concurrent/TimeUnit;->MILLISECONDS:Ljava/util/concurrent/TimeUnit;
invoke-virtual {v2, v0, v1}, Ljava/util/concurrent/TimeUnit;->toNanos(J)J
move-result-wide v0
sput-wide v0, Lokio/AsyncTimeout;->IDLE_TIMEOUT_NANOS:J
return-void
.end method
.method public constructor <init>()V
.locals 0
.line 38
invoke-direct {p0}, Lokio/Timeout;-><init>()V
return-void
.end method
.method public static final synthetic access$getHead$cp()Lokio/AsyncTimeout;
.locals 1
sget-object v0, Lokio/AsyncTimeout;->head:Lokio/AsyncTimeout;
return-object v0
.end method
.method public static final synthetic access$getIDLE_TIMEOUT_MILLIS$cp()J
.locals 2
sget-wide v0, Lokio/AsyncTimeout;->IDLE_TIMEOUT_MILLIS:J
return-wide v0
.end method
.method public static final synthetic access$getIDLE_TIMEOUT_NANOS$cp()J
.locals 2
sget-wide v0, Lokio/AsyncTimeout;->IDLE_TIMEOUT_NANOS:J
return-wide v0
.end method
.method public static final synthetic access$getNext$p(Lokio/AsyncTimeout;)Lokio/AsyncTimeout;
.locals 0
.line 38
iget-object p0, p0, Lokio/AsyncTimeout;->next:Lokio/AsyncTimeout;
return-object p0
.end method
.method public static final synthetic access$getTimeoutAt$p(Lokio/AsyncTimeout;)J
.locals 2
.line 38
iget-wide v0, p0, Lokio/AsyncTimeout;->timeoutAt:J
return-wide v0
.end method
.method public static final synthetic access$remainingNanos(Lokio/AsyncTimeout;J)J
.locals 0
.line 38
invoke-direct {p0, p1, p2}, Lokio/AsyncTimeout;->remainingNanos(J)J
move-result-wide p0
return-wide p0
.end method
.method public static final synthetic access$setHead$cp(Lokio/AsyncTimeout;)V
.locals 0
sput-object p0, Lokio/AsyncTimeout;->head:Lokio/AsyncTimeout;
return-void
.end method
.method public static final synthetic access$setNext$p(Lokio/AsyncTimeout;Lokio/AsyncTimeout;)V
.locals 0
.line 38
iput-object p1, p0, Lokio/AsyncTimeout;->next:Lokio/AsyncTimeout;
return-void
.end method
.method public static final synthetic access$setTimeoutAt$p(Lokio/AsyncTimeout;J)V
.locals 0
.line 38
iput-wide p1, p0, Lokio/AsyncTimeout;->timeoutAt:J
return-void
.end method
.method private final remainingNanos(J)J
.locals 2
iget-wide v0, p0, Lokio/AsyncTimeout;->timeoutAt:J
sub-long/2addr v0, p1
return-wide v0
.end method
# virtual methods
.method public final access$newTimeoutException(Ljava/io/IOException;)Ljava/io/IOException;
.locals 0
.line 162
invoke-virtual {p0, p1}, Lokio/AsyncTimeout;->newTimeoutException(Ljava/io/IOException;)Ljava/io/IOException;
move-result-object p0
return-object p0
.end method
.method public final enter()V
.locals 6
iget-boolean v0, p0, Lokio/AsyncTimeout;->inQueue:Z
const/4 v1, 0x1
xor-int/2addr v0, v1
if-eqz v0, :cond_1
.line 50
invoke-virtual {p0}, Lokio/AsyncTimeout;->timeoutNanos()J
move-result-wide v2
.line 51
invoke-virtual {p0}, Lokio/AsyncTimeout;->hasDeadline()Z
move-result v0
const-wide/16 v4, 0x0
cmp-long v4, v2, v4
if-nez v4, :cond_0
if-nez v0, :cond_0
return-void
:cond_0
iput-boolean v1, p0, Lokio/AsyncTimeout;->inQueue:Z
sget-object v1, Lokio/AsyncTimeout;->Companion:Lokio/AsyncTimeout$Companion;
.line 56
invoke-static {v1, p0, v2, v3, v0}, Lokio/AsyncTimeout$Companion;->access$scheduleTimeout(Lokio/AsyncTimeout$Companion;Lokio/AsyncTimeout;JZ)V
return-void
.line 49
:cond_1
new-instance p0, Ljava/lang/IllegalStateException;
const-string v0, "Unbalanced enter/exit"
invoke-virtual {v0}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object v0
invoke-direct {p0, v0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
check-cast p0, Ljava/lang/Throwable;
throw p0
.end method
.method public final exit()Z
.locals 2
iget-boolean v0, p0, Lokio/AsyncTimeout;->inQueue:Z
const/4 v1, 0x0
if-nez v0, :cond_0
return v1
:cond_0
iput-boolean v1, p0, Lokio/AsyncTimeout;->inQueue:Z
sget-object v0, Lokio/AsyncTimeout;->Companion:Lokio/AsyncTimeout$Companion;
.line 63
invoke-static {v0, p0}, Lokio/AsyncTimeout$Companion;->access$cancelScheduledTimeout(Lokio/AsyncTimeout$Companion;Lokio/AsyncTimeout;)Z
move-result p0
return p0
.end method
.method protected newTimeoutException(Ljava/io/IOException;)Ljava/io/IOException;
.locals 1
.line 170
new-instance p0, Ljava/io/InterruptedIOException;
const-string v0, "timeout"
invoke-direct {p0, v0}, Ljava/io/InterruptedIOException;-><init>(Ljava/lang/String;)V
if-eqz p1, :cond_0
.line 172
check-cast p1, Ljava/lang/Throwable;
invoke-virtual {p0, p1}, Ljava/io/InterruptedIOException;->initCause(Ljava/lang/Throwable;)Ljava/lang/Throwable;
.line 174
:cond_0
check-cast p0, Ljava/io/IOException;
return-object p0
.end method
.method public final sink(Lokio/Sink;)Lokio/Sink;
.locals 1
const-string v0, "sink"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 83
new-instance v0, Lokio/AsyncTimeout$sink$1;
invoke-direct {v0, p0, p1}, Lokio/AsyncTimeout$sink$1;-><init>(Lokio/AsyncTimeout;Lokio/Sink;)V
check-cast v0, Lokio/Sink;
return-object v0
.end method
.method public final source(Lokio/Source;)Lokio/Source;
.locals 1
const-string v0, "source"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 127
new-instance v0, Lokio/AsyncTimeout$source$1;
invoke-direct {v0, p0, p1}, Lokio/AsyncTimeout$source$1;-><init>(Lokio/AsyncTimeout;Lokio/Source;)V
check-cast v0, Lokio/Source;
return-object v0
.end method
.method protected timedOut()V
.locals 0
return-void
.end method
.method public final withTimeout(Lkotlin/jvm/functions/Function0;)Ljava/lang/Object;
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">(",
"Lkotlin/jvm/functions/Function0<",
"+TT;>;)TT;"
}
.end annotation
const-string v0, "block"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 148
invoke-virtual {p0}, Lokio/AsyncTimeout;->enter()V
const/4 v0, 0x1
.line 150
:try_start_0
invoke-interface {p1}, Lkotlin/jvm/functions/Function0;->invoke()Ljava/lang/Object;
move-result-object p1
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 152
invoke-static {v0}, Lkotlin/jvm/internal/InlineMarker;->finallyStart(I)V
.line 156
invoke-virtual {p0}, Lokio/AsyncTimeout;->exit()Z
move-result v1
if-nez v1, :cond_0
.line 157
invoke-static {v0}, Lkotlin/jvm/internal/InlineMarker;->finallyEnd(I)V
return-object p1
:cond_0
const/4 p1, 0x0
invoke-virtual {p0, p1}, Lokio/AsyncTimeout;->access$newTimeoutException(Ljava/io/IOException;)Ljava/io/IOException;
move-result-object p0
check-cast p0, Ljava/lang/Throwable;
throw p0
:catchall_0
move-exception p1
goto :goto_2
:catch_0
move-exception p1
.line 154
:try_start_1
invoke-virtual {p0}, Lokio/AsyncTimeout;->exit()Z
move-result v1
if-nez v1, :cond_1
:goto_0
check-cast p1, Ljava/lang/Throwable;
goto :goto_1
:cond_1
invoke-virtual {p0, p1}, Lokio/AsyncTimeout;->access$newTimeoutException(Ljava/io/IOException;)Ljava/io/IOException;
move-result-object p1
goto :goto_0
:goto_1
throw p1
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
.line 158
:goto_2
invoke-static {v0}, Lkotlin/jvm/internal/InlineMarker;->finallyStart(I)V
.line 156
invoke-virtual {p0}, Lokio/AsyncTimeout;->exit()Z
.line 157
invoke-static {v0}, Lkotlin/jvm/internal/InlineMarker;->finallyEnd(I)V
throw p1
.end method