418 lines
6.9 KiB
Smali
418 lines
6.9 KiB
Smali
.class public Lo0/b;
|
|
.super Lo0/x;
|
|
.source "AsyncTimeout.kt"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lo0/b$b;,
|
|
Lo0/b$a;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field public static final h:J
|
|
|
|
.field public static final i:J
|
|
|
|
.field public static j:Lo0/b;
|
|
|
|
.field public static final k:Lo0/b$a;
|
|
|
|
|
|
# instance fields
|
|
.field public e:Z
|
|
|
|
.field public f:Lo0/b;
|
|
|
|
.field public g:J
|
|
|
|
|
|
# direct methods
|
|
.method public static constructor <clinit>()V
|
|
.locals 3
|
|
|
|
new-instance v0, Lo0/b$a;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-direct {v0, v1}, Lo0/b$a;-><init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
sput-object v0, Lo0/b;->k:Lo0/b$a;
|
|
|
|
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, Lo0/b;->h:J
|
|
|
|
sget-object v0, Ljava/util/concurrent/TimeUnit;->MILLISECONDS:Ljava/util/concurrent/TimeUnit;
|
|
|
|
sget-wide v1, Lo0/b;->h:J
|
|
|
|
invoke-virtual {v0, v1, v2}, Ljava/util/concurrent/TimeUnit;->toNanos(J)J
|
|
|
|
move-result-wide v0
|
|
|
|
sput-wide v0, Lo0/b;->i:J
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>()V
|
|
.locals 0
|
|
|
|
invoke-direct {p0}, Lo0/x;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final i()V
|
|
.locals 10
|
|
|
|
iget-boolean v0, p0, Lo0/b;->e:Z
|
|
|
|
const/4 v1, 0x1
|
|
|
|
xor-int/2addr v0, v1
|
|
|
|
if-eqz v0, :cond_b
|
|
|
|
iget-wide v2, p0, Lo0/x;->c:J
|
|
|
|
iget-boolean v0, p0, Lo0/x;->a:Z
|
|
|
|
const-wide/16 v4, 0x0
|
|
|
|
cmp-long v6, v2, v4
|
|
|
|
if-nez v6, :cond_0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
iput-boolean v1, p0, Lo0/b;->e:Z
|
|
|
|
const-class v1, Lo0/b;
|
|
|
|
monitor-enter v1
|
|
|
|
:try_start_0
|
|
sget-object v4, Lo0/b;->j:Lo0/b;
|
|
|
|
if-nez v4, :cond_1
|
|
|
|
new-instance v4, Lo0/b;
|
|
|
|
invoke-direct {v4}, Lo0/b;-><init>()V
|
|
|
|
sput-object v4, Lo0/b;->j:Lo0/b;
|
|
|
|
new-instance v4, Lo0/b$b;
|
|
|
|
invoke-direct {v4}, Lo0/b$b;-><init>()V
|
|
|
|
invoke-virtual {v4}, Ljava/lang/Thread;->start()V
|
|
|
|
:cond_1
|
|
invoke-static {}, Ljava/lang/System;->nanoTime()J
|
|
|
|
move-result-wide v4
|
|
|
|
if-eqz v6, :cond_2
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
invoke-virtual {p0}, Lo0/x;->c()J
|
|
|
|
move-result-wide v6
|
|
|
|
sub-long/2addr v6, v4
|
|
|
|
invoke-static {v2, v3, v6, v7}, Ljava/lang/Math;->min(JJ)J
|
|
|
|
move-result-wide v2
|
|
|
|
add-long/2addr v2, v4
|
|
|
|
iput-wide v2, p0, Lo0/b;->g:J
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
if-eqz v6, :cond_3
|
|
|
|
add-long/2addr v2, v4
|
|
|
|
iput-wide v2, p0, Lo0/b;->g:J
|
|
|
|
goto :goto_0
|
|
|
|
:cond_3
|
|
if-eqz v0, :cond_a
|
|
|
|
invoke-virtual {p0}, Lo0/x;->c()J
|
|
|
|
move-result-wide v2
|
|
|
|
iput-wide v2, p0, Lo0/b;->g:J
|
|
|
|
:goto_0
|
|
iget-wide v2, p0, Lo0/b;->g:J
|
|
|
|
sub-long/2addr v2, v4
|
|
|
|
sget-object v0, Lo0/b;->j:Lo0/b;
|
|
|
|
const/4 v6, 0x0
|
|
|
|
if-eqz v0, :cond_9
|
|
|
|
:goto_1
|
|
iget-object v7, v0, Lo0/b;->f:Lo0/b;
|
|
|
|
if-eqz v7, :cond_7
|
|
|
|
iget-object v7, v0, Lo0/b;->f:Lo0/b;
|
|
|
|
if-eqz v7, :cond_6
|
|
|
|
iget-wide v7, v7, Lo0/b;->g:J
|
|
|
|
sub-long/2addr v7, v4
|
|
|
|
cmp-long v9, v2, v7
|
|
|
|
if-gez v9, :cond_4
|
|
|
|
goto :goto_2
|
|
|
|
:cond_4
|
|
iget-object v0, v0, Lo0/b;->f:Lo0/b;
|
|
|
|
if-eqz v0, :cond_5
|
|
|
|
goto :goto_1
|
|
|
|
:cond_5
|
|
invoke-static {}, Lj0/o/c/h;->throwNpe()V
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
throw v6
|
|
|
|
:cond_6
|
|
:try_start_1
|
|
invoke-static {}, Lj0/o/c/h;->throwNpe()V
|
|
:try_end_1
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
throw v6
|
|
|
|
:cond_7
|
|
:goto_2
|
|
:try_start_2
|
|
iget-object v2, v0, Lo0/b;->f:Lo0/b;
|
|
|
|
iput-object v2, p0, Lo0/b;->f:Lo0/b;
|
|
|
|
iput-object p0, v0, Lo0/b;->f:Lo0/b;
|
|
|
|
sget-object v2, Lo0/b;->j:Lo0/b;
|
|
|
|
if-ne v0, v2, :cond_8
|
|
|
|
invoke-virtual {v1}, Ljava/lang/Object;->notify()V
|
|
:try_end_2
|
|
.catchall {:try_start_2 .. :try_end_2} :catchall_0
|
|
|
|
:cond_8
|
|
monitor-exit v1
|
|
|
|
return-void
|
|
|
|
:cond_9
|
|
:try_start_3
|
|
invoke-static {}, Lj0/o/c/h;->throwNpe()V
|
|
:try_end_3
|
|
.catchall {:try_start_3 .. :try_end_3} :catchall_0
|
|
|
|
throw v6
|
|
|
|
:cond_a
|
|
:try_start_4
|
|
new-instance v0, Ljava/lang/AssertionError;
|
|
|
|
invoke-direct {v0}, Ljava/lang/AssertionError;-><init>()V
|
|
|
|
throw v0
|
|
:try_end_4
|
|
.catchall {:try_start_4 .. :try_end_4} :catchall_0
|
|
|
|
:catchall_0
|
|
move-exception v0
|
|
|
|
monitor-exit v1
|
|
|
|
throw v0
|
|
|
|
:cond_b
|
|
const-string v0, "Unbalanced enter/exit"
|
|
|
|
new-instance v1, Ljava/lang/IllegalStateException;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Object;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-direct {v1, v0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw v1
|
|
.end method
|
|
|
|
.method public final j()Z
|
|
.locals 5
|
|
|
|
iget-boolean v0, p0, Lo0/b;->e:Z
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
return v1
|
|
|
|
:cond_0
|
|
iput-boolean v1, p0, Lo0/b;->e:Z
|
|
|
|
const/4 v0, 0x0
|
|
|
|
const-class v2, Lo0/b;
|
|
|
|
monitor-enter v2
|
|
|
|
:try_start_0
|
|
sget-object v3, Lo0/b;->j:Lo0/b;
|
|
|
|
:goto_0
|
|
if-eqz v3, :cond_2
|
|
|
|
iget-object v4, v3, Lo0/b;->f:Lo0/b;
|
|
|
|
if-ne v4, p0, :cond_1
|
|
|
|
iget-object v4, p0, Lo0/b;->f:Lo0/b;
|
|
|
|
iput-object v4, v3, Lo0/b;->f:Lo0/b;
|
|
|
|
iput-object v0, p0, Lo0/b;->f:Lo0/b;
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
monitor-exit v2
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
:try_start_1
|
|
iget-object v3, v3, Lo0/b;->f:Lo0/b;
|
|
:try_end_1
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
const/4 v1, 0x1
|
|
|
|
monitor-exit v2
|
|
|
|
:goto_1
|
|
return v1
|
|
|
|
:catchall_0
|
|
move-exception v0
|
|
|
|
monitor-exit v2
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public final k(Ljava/io/IOException;)Ljava/io/IOException;
|
|
.locals 1
|
|
|
|
invoke-virtual {p0}, Lo0/b;->j()Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
invoke-virtual {p0, p1}, Lo0/b;->m(Ljava/io/IOException;)Ljava/io/IOException;
|
|
|
|
move-result-object p1
|
|
|
|
:goto_0
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public final l(Z)V
|
|
.locals 1
|
|
|
|
invoke-virtual {p0}, Lo0/b;->j()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 p1, 0x0
|
|
|
|
invoke-virtual {p0, p1}, Lo0/b;->m(Ljava/io/IOException;)Ljava/io/IOException;
|
|
|
|
move-result-object p1
|
|
|
|
throw p1
|
|
|
|
:cond_1
|
|
:goto_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public m(Ljava/io/IOException;)Ljava/io/IOException;
|
|
.locals 2
|
|
|
|
new-instance v0, Ljava/io/InterruptedIOException;
|
|
|
|
const-string v1, "timeout"
|
|
|
|
invoke-direct {v0, v1}, Ljava/io/InterruptedIOException;-><init>(Ljava/lang/String;)V
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
invoke-virtual {v0, p1}, Ljava/io/InterruptedIOException;->initCause(Ljava/lang/Throwable;)Ljava/lang/Throwable;
|
|
|
|
:cond_0
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public n()V
|
|
.locals 0
|
|
|
|
return-void
|
|
.end method
|