a.smali
.class public Lj/a;
.super Lj/t;
.source ""
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lj/a$c;
}
.end annotation
# static fields
.field private static final h:J
.field private static final i:J
.field static j:Lj/a;
.annotation runtime Ljavax/annotation/Nullable;
.end annotation
.end field
# instance fields
.field private e:Z
.field private f:Lj/a;
.annotation runtime Ljavax/annotation/Nullable;
.end annotation
.end field
.field private g:J
# direct methods
.method static constructor <clinit>()V
.registers 3
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, Lj/a;->h:J
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, Lj/a;->i:J
return-void
.end method
.method public constructor <init>()V
.registers 1
invoke-direct {p0}, Lj/t;-><init>()V
return-void
.end method
.method static i()Lj/a;
.registers 9
.annotation runtime Ljavax/annotation/Nullable;
.end annotation
const-class v0, Lj/a;
sget-object v1, Lj/a;->j:Lj/a;
iget-object v1, v1, Lj/a;->f:Lj/a;
const/4 v2, 0x0
invoke-static {}, Ljava/lang/System;->nanoTime()J
move-result-wide v3
if-nez v1, :cond_26
sget-wide v5, Lj/a;->h:J
invoke-virtual {v0, v5, v6}, Ljava/lang/Object;->wait(J)V
sget-object v0, Lj/a;->j:Lj/a;
iget-object v0, v0, Lj/a;->f:Lj/a;
if-nez v0, :cond_25
invoke-static {}, Ljava/lang/System;->nanoTime()J
move-result-wide v0
sub-long/2addr v0, v3
sget-wide v3, Lj/a;->i:J
cmp-long v5, v0, v3
if-ltz v5, :cond_25
sget-object v2, Lj/a;->j:Lj/a;
:cond_25
return-object v2
:cond_26
invoke-direct {v1, v3, v4}, Lj/a;->p(J)J
move-result-wide v3
const-wide/16 v5, 0x0
cmp-long v7, v3, v5
if-lez v7, :cond_3d
const-wide/32 v5, 0xf4240
div-long v7, v3, v5
mul-long v5, v5, v7
sub-long/2addr v3, v5
long-to-int v1, v3
invoke-virtual {v0, v7, v8, v1}, Ljava/lang/Object;->wait(JI)V
return-object v2
:cond_3d
sget-object v0, Lj/a;->j:Lj/a;
iget-object v3, v1, Lj/a;->f:Lj/a;
iput-object v3, v0, Lj/a;->f:Lj/a;
iput-object v2, v1, Lj/a;->f:Lj/a;
return-object v1
.end method
.method private static declared-synchronized j(Lj/a;)Z
.registers 4
const-class v0, Lj/a;
monitor-enter v0
:try_start_3
sget-object v1, Lj/a;->j:Lj/a;
:goto_5
if-eqz v1, :cond_17
iget-object v2, v1, Lj/a;->f:Lj/a;
if-ne v2, p0, :cond_15
iget-object v2, p0, Lj/a;->f:Lj/a;
iput-object v2, v1, Lj/a;->f:Lj/a;
const/4 v1, 0x0
iput-object v1, p0, Lj/a;->f:Lj/a;
:try_end_12
.catchall {:try_start_3 .. :try_end_12} :catchall_19
const/4 p0, 0x0
:goto_13
monitor-exit v0
return p0
:cond_15
move-object v1, v2
goto :goto_5
:cond_17
const/4 p0, 0x1
goto :goto_13
:catchall_19
move-exception p0
monitor-exit v0
goto :goto_1d
:goto_1c
throw p0
:goto_1d
goto :goto_1c
.end method
.method private p(J)J
.registers 5
iget-wide v0, p0, Lj/a;->g:J
sub-long/2addr v0, p1
return-wide v0
.end method
.method private static declared-synchronized q(Lj/a;JZ)V
.registers 10
const-class v0, Lj/a;
monitor-enter v0
:try_start_3
sget-object v1, Lj/a;->j:Lj/a;
if-nez v1, :cond_16
new-instance v1, Lj/a;
invoke-direct {v1}, Lj/a;-><init>()V
sput-object v1, Lj/a;->j:Lj/a;
new-instance v1, Lj/a$c;
invoke-direct {v1}, Lj/a$c;-><init>()V
invoke-virtual {v1}, Ljava/lang/Thread;->start()V
:cond_16
invoke-static {}, Ljava/lang/System;->nanoTime()J
move-result-wide v1
const-wide/16 v3, 0x0
cmp-long v5, p1, v3
if-eqz v5, :cond_2f
if-eqz p3, :cond_2f
invoke-virtual {p0}, Lj/t;->c()J
move-result-wide v3
sub-long/2addr v3, v1
invoke-static {p1, p2, v3, v4}, Ljava/lang/Math;->min(JJ)J
move-result-wide p1
:goto_2b
add-long/2addr p1, v1
iput-wide p1, p0, Lj/a;->g:J
goto :goto_3c
:cond_2f
cmp-long v5, p1, v3
if-eqz v5, :cond_34
goto :goto_2b
:cond_34
if-eqz p3, :cond_61
invoke-virtual {p0}, Lj/t;->c()J
move-result-wide p1
iput-wide p1, p0, Lj/a;->g:J
:goto_3c
invoke-direct {p0, v1, v2}, Lj/a;->p(J)J
move-result-wide p1
sget-object p3, Lj/a;->j:Lj/a;
:goto_42
iget-object v3, p3, Lj/a;->f:Lj/a;
if-eqz v3, :cond_52
invoke-direct {v3, v1, v2}, Lj/a;->p(J)J
move-result-wide v3
cmp-long v5, p1, v3
if-gez v5, :cond_4f
goto :goto_52
:cond_4f
iget-object p3, p3, Lj/a;->f:Lj/a;
goto :goto_42
:cond_52
:goto_52
iget-object p1, p3, Lj/a;->f:Lj/a;
iput-object p1, p0, Lj/a;->f:Lj/a;
iput-object p0, p3, Lj/a;->f:Lj/a;
sget-object p0, Lj/a;->j:Lj/a;
if-ne p3, p0, :cond_5f
invoke-virtual {v0}, Ljava/lang/Object;->notify()V
:try_end_5f
.catchall {:try_start_3 .. :try_end_5f} :catchall_67
:cond_5f
monitor-exit v0
return-void
:cond_61
:try_start_61
new-instance p0, Ljava/lang/AssertionError;
invoke-direct {p0}, Ljava/lang/AssertionError;-><init>()V
throw p0
:try_end_67
.catchall {:try_start_61 .. :try_end_67} :catchall_67
:catchall_67
move-exception p0
monitor-exit v0
goto :goto_6b
:goto_6a
throw p0
:goto_6b
goto :goto_6a
.end method
# virtual methods
.method public final k()V
.registers 7
iget-boolean v0, p0, Lj/a;->e:Z
if-nez v0, :cond_1c
invoke-virtual {p0}, Lj/t;->h()J
move-result-wide v0
invoke-virtual {p0}, Lj/t;->e()Z
move-result v2
const-wide/16 v3, 0x0
cmp-long v5, v0, v3
if-nez v5, :cond_15
if-nez v2, :cond_15
return-void
:cond_15
const/4 v3, 0x1
iput-boolean v3, p0, Lj/a;->e:Z
invoke-static {p0, v0, v1, v2}, Lj/a;->q(Lj/a;JZ)V
return-void
:cond_1c
new-instance v0, Ljava/lang/IllegalStateException;
const-string v1, "Unbalanced enter/exit"
invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw v0
.end method
.method final l(Ljava/io/IOException;)Ljava/io/IOException;
.registers 3
invoke-virtual {p0}, Lj/a;->n()Z
move-result v0
if-nez v0, :cond_7
return-object p1
:cond_7
invoke-virtual {p0, p1}, Lj/a;->o(Ljava/io/IOException;)Ljava/io/IOException;
move-result-object p1
return-object p1
.end method
.method final m(Z)V
.registers 3
invoke-virtual {p0}, Lj/a;->n()Z
move-result v0
if-eqz v0, :cond_f
if-nez p1, :cond_9
goto :goto_f
:cond_9
const/4 p1, 0x0
invoke-virtual {p0, p1}, Lj/a;->o(Ljava/io/IOException;)Ljava/io/IOException;
move-result-object p1
throw p1
:cond_f
:goto_f
return-void
.end method
.method public final n()Z
.registers 3
iget-boolean v0, p0, Lj/a;->e:Z
const/4 v1, 0x0
if-nez v0, :cond_6
return v1
:cond_6
iput-boolean v1, p0, Lj/a;->e:Z
invoke-static {p0}, Lj/a;->j(Lj/a;)Z
move-result v0
return v0
.end method
.method protected o(Ljava/io/IOException;)Ljava/io/IOException;
.registers 4
.param p1 # Ljava/io/IOException;
.annotation runtime Ljavax/annotation/Nullable;
.end annotation
.end param
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_c
invoke-virtual {v0, p1}, Ljava/io/InterruptedIOException;->initCause(Ljava/lang/Throwable;)Ljava/lang/Throwable;
:cond_c
return-object v0
.end method
.method public final r(Lj/r;)Lj/r;
.registers 3
new-instance v0, Lj/a$a;
invoke-direct {v0, p0, p1}, Lj/a$a;-><init>(Lj/a;Lj/r;)V
return-object v0
.end method
.method public final s(Lj/s;)Lj/s;
.registers 3
new-instance v0, Lj/a$b;
invoke-direct {v0, p0, p1}, Lj/a$b;-><init>(Lj/a;Lj/s;)V
return-object v0
.end method
.method protected t()V
.registers 1
return-void
.end method