504 lines
9.8 KiB
Smali
504 lines
9.8 KiB
Smali
.class public final Lg0/h0/j/n$b;
|
|
.super Ljava/lang/Object;
|
|
.source "Http2Stream.kt"
|
|
|
|
# interfaces
|
|
.implements Lh0/x;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
value = Lg0/h0/j/n;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x11
|
|
name = "b"
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field public final d:Lh0/e;
|
|
|
|
.field public final e:Lh0/e;
|
|
|
|
.field public f:Z
|
|
|
|
.field public final g:J
|
|
|
|
.field public h:Z
|
|
|
|
.field public final synthetic i:Lg0/h0/j/n;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Lg0/h0/j/n;JZ)V
|
|
.locals 0
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(JZ)V"
|
|
}
|
|
.end annotation
|
|
|
|
iput-object p1, p0, Lg0/h0/j/n$b;->i:Lg0/h0/j/n;
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
iput-wide p2, p0, Lg0/h0/j/n$b;->g:J
|
|
|
|
iput-boolean p4, p0, Lg0/h0/j/n$b;->h:Z
|
|
|
|
new-instance p1, Lh0/e;
|
|
|
|
invoke-direct {p1}, Lh0/e;-><init>()V
|
|
|
|
iput-object p1, p0, Lg0/h0/j/n$b;->d:Lh0/e;
|
|
|
|
new-instance p1, Lh0/e;
|
|
|
|
invoke-direct {p1}, Lh0/e;-><init>()V
|
|
|
|
iput-object p1, p0, Lg0/h0/j/n$b;->e:Lh0/e;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public G0(Lh0/e;J)J
|
|
.locals 11
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
const-string v0, "sink"
|
|
|
|
invoke-static {p1, v0}, Lc0/n/c/i;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-wide/16 v0, 0x0
|
|
|
|
cmp-long v2, p2, v0
|
|
|
|
if-ltz v2, :cond_0
|
|
|
|
const/4 v2, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v2, 0x0
|
|
|
|
:goto_0
|
|
if-eqz v2, :cond_b
|
|
|
|
:goto_1
|
|
iget-object v2, p0, Lg0/h0/j/n$b;->i:Lg0/h0/j/n;
|
|
|
|
monitor-enter v2
|
|
|
|
:try_start_0
|
|
iget-object v3, p0, Lg0/h0/j/n$b;->i:Lg0/h0/j/n;
|
|
|
|
iget-object v3, v3, Lg0/h0/j/n;->i:Lg0/h0/j/n$c;
|
|
|
|
invoke-virtual {v3}, Lh0/b;->i()V
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_1
|
|
|
|
:try_start_1
|
|
iget-object v3, p0, Lg0/h0/j/n$b;->i:Lg0/h0/j/n;
|
|
|
|
invoke-virtual {v3}, Lg0/h0/j/n;->f()Lg0/h0/j/a;
|
|
|
|
move-result-object v3
|
|
|
|
const/4 v4, 0x0
|
|
|
|
if-eqz v3, :cond_3
|
|
|
|
iget-object v3, p0, Lg0/h0/j/n$b;->i:Lg0/h0/j/n;
|
|
|
|
iget-object v3, v3, Lg0/h0/j/n;->l:Ljava/io/IOException;
|
|
|
|
if-eqz v3, :cond_1
|
|
|
|
:goto_2
|
|
move-object v4, v3
|
|
|
|
goto :goto_3
|
|
|
|
:cond_1
|
|
new-instance v3, Lokhttp3/internal/http2/StreamResetException;
|
|
|
|
iget-object v5, p0, Lg0/h0/j/n$b;->i:Lg0/h0/j/n;
|
|
|
|
invoke-virtual {v5}, Lg0/h0/j/n;->f()Lg0/h0/j/a;
|
|
|
|
move-result-object v5
|
|
|
|
if-eqz v5, :cond_2
|
|
|
|
invoke-direct {v3, v5}, Lokhttp3/internal/http2/StreamResetException;-><init>(Lg0/h0/j/a;)V
|
|
|
|
goto :goto_2
|
|
|
|
:cond_2
|
|
invoke-static {}, Lc0/n/c/i;->throwNpe()V
|
|
:try_end_1
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
throw v4
|
|
|
|
:cond_3
|
|
:goto_3
|
|
:try_start_2
|
|
iget-boolean v3, p0, Lg0/h0/j/n$b;->f:Z
|
|
|
|
if-nez v3, :cond_a
|
|
|
|
iget-object v3, p0, Lg0/h0/j/n$b;->e:Lh0/e;
|
|
|
|
iget-wide v5, v3, Lh0/e;->e:J
|
|
|
|
const-wide/16 v7, -0x1
|
|
|
|
cmp-long v3, v5, v0
|
|
|
|
if-lez v3, :cond_4
|
|
|
|
iget-object v0, p0, Lg0/h0/j/n$b;->e:Lh0/e;
|
|
|
|
iget-object v1, p0, Lg0/h0/j/n$b;->e:Lh0/e;
|
|
|
|
iget-wide v5, v1, Lh0/e;->e:J
|
|
|
|
invoke-static {p2, p3, v5, v6}, Ljava/lang/Math;->min(JJ)J
|
|
|
|
move-result-wide v5
|
|
|
|
invoke-virtual {v0, p1, v5, v6}, Lh0/e;->G0(Lh0/e;J)J
|
|
|
|
move-result-wide v0
|
|
|
|
iget-object v3, p0, Lg0/h0/j/n$b;->i:Lg0/h0/j/n;
|
|
|
|
iget-wide v5, v3, Lg0/h0/j/n;->a:J
|
|
|
|
add-long/2addr v5, v0
|
|
|
|
iput-wide v5, v3, Lg0/h0/j/n;->a:J
|
|
|
|
iget-object v3, p0, Lg0/h0/j/n$b;->i:Lg0/h0/j/n;
|
|
|
|
iget-wide v5, v3, Lg0/h0/j/n;->a:J
|
|
|
|
iget-object v3, p0, Lg0/h0/j/n$b;->i:Lg0/h0/j/n;
|
|
|
|
iget-wide v9, v3, Lg0/h0/j/n;->b:J
|
|
|
|
sub-long/2addr v5, v9
|
|
|
|
if-nez v4, :cond_6
|
|
|
|
iget-object v3, p0, Lg0/h0/j/n$b;->i:Lg0/h0/j/n;
|
|
|
|
iget-object v3, v3, Lg0/h0/j/n;->n:Lg0/h0/j/e;
|
|
|
|
iget-object v3, v3, Lg0/h0/j/e;->v:Lg0/h0/j/s;
|
|
|
|
invoke-virtual {v3}, Lg0/h0/j/s;->a()I
|
|
|
|
move-result v3
|
|
|
|
div-int/lit8 v3, v3, 0x2
|
|
|
|
int-to-long v9, v3
|
|
|
|
cmp-long v3, v5, v9
|
|
|
|
if-ltz v3, :cond_6
|
|
|
|
iget-object v3, p0, Lg0/h0/j/n$b;->i:Lg0/h0/j/n;
|
|
|
|
iget-object v3, v3, Lg0/h0/j/n;->n:Lg0/h0/j/e;
|
|
|
|
iget-object v9, p0, Lg0/h0/j/n$b;->i:Lg0/h0/j/n;
|
|
|
|
iget v9, v9, Lg0/h0/j/n;->m:I
|
|
|
|
invoke-virtual {v3, v9, v5, v6}, Lg0/h0/j/e;->l(IJ)V
|
|
|
|
iget-object v3, p0, Lg0/h0/j/n$b;->i:Lg0/h0/j/n;
|
|
|
|
iget-object v5, p0, Lg0/h0/j/n$b;->i:Lg0/h0/j/n;
|
|
|
|
iget-wide v5, v5, Lg0/h0/j/n;->a:J
|
|
|
|
iput-wide v5, v3, Lg0/h0/j/n;->b:J
|
|
|
|
goto :goto_4
|
|
|
|
:cond_4
|
|
iget-boolean v0, p0, Lg0/h0/j/n$b;->h:Z
|
|
|
|
if-nez v0, :cond_5
|
|
|
|
if-nez v4, :cond_5
|
|
|
|
iget-object v0, p0, Lg0/h0/j/n$b;->i:Lg0/h0/j/n;
|
|
|
|
invoke-virtual {v0}, Lg0/h0/j/n;->l()V
|
|
:try_end_2
|
|
.catchall {:try_start_2 .. :try_end_2} :catchall_0
|
|
|
|
const/4 v0, 0x1
|
|
|
|
move-wide v5, v7
|
|
|
|
goto :goto_5
|
|
|
|
:cond_5
|
|
move-wide v0, v7
|
|
|
|
:cond_6
|
|
:goto_4
|
|
const/4 v3, 0x0
|
|
|
|
move-wide v5, v0
|
|
|
|
const/4 v0, 0x0
|
|
|
|
:goto_5
|
|
:try_start_3
|
|
iget-object v1, p0, Lg0/h0/j/n$b;->i:Lg0/h0/j/n;
|
|
|
|
iget-object v1, v1, Lg0/h0/j/n;->i:Lg0/h0/j/n$c;
|
|
|
|
invoke-virtual {v1}, Lg0/h0/j/n$c;->m()V
|
|
:try_end_3
|
|
.catchall {:try_start_3 .. :try_end_3} :catchall_1
|
|
|
|
monitor-exit v2
|
|
|
|
if-eqz v0, :cond_7
|
|
|
|
const-wide/16 v0, 0x0
|
|
|
|
goto/16 :goto_1
|
|
|
|
:cond_7
|
|
cmp-long p1, v5, v7
|
|
|
|
if-eqz p1, :cond_8
|
|
|
|
invoke-virtual {p0, v5, v6}, Lg0/h0/j/n$b;->a(J)V
|
|
|
|
return-wide v5
|
|
|
|
:cond_8
|
|
if-nez v4, :cond_9
|
|
|
|
return-wide v7
|
|
|
|
:cond_9
|
|
throw v4
|
|
|
|
:cond_a
|
|
:try_start_4
|
|
new-instance p1, Ljava/io/IOException;
|
|
|
|
const-string p2, "stream closed"
|
|
|
|
invoke-direct {p1, p2}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
:try_end_4
|
|
.catchall {:try_start_4 .. :try_end_4} :catchall_0
|
|
|
|
:catchall_0
|
|
move-exception p1
|
|
|
|
:try_start_5
|
|
iget-object p2, p0, Lg0/h0/j/n$b;->i:Lg0/h0/j/n;
|
|
|
|
iget-object p2, p2, Lg0/h0/j/n;->i:Lg0/h0/j/n$c;
|
|
|
|
invoke-virtual {p2}, Lg0/h0/j/n$c;->m()V
|
|
|
|
throw p1
|
|
:try_end_5
|
|
.catchall {:try_start_5 .. :try_end_5} :catchall_1
|
|
|
|
:catchall_1
|
|
move-exception p1
|
|
|
|
monitor-exit v2
|
|
|
|
throw p1
|
|
|
|
:cond_b
|
|
const-string p1, "byteCount < 0: "
|
|
|
|
invoke-static {p1, p2, p3}, Lf/e/b/a/a;->n(Ljava/lang/String;J)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
new-instance p2, Ljava/lang/IllegalArgumentException;
|
|
|
|
invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-direct {p2, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p2
|
|
.end method
|
|
|
|
.method public final a(J)V
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lg0/h0/j/n$b;->i:Lg0/h0/j/n;
|
|
|
|
sget-boolean v1, Lg0/h0/c;->g:Z
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
invoke-static {v0}, Ljava/lang/Thread;->holdsLock(Ljava/lang/Object;)Z
|
|
|
|
move-result v1
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
new-instance p1, Ljava/lang/AssertionError;
|
|
|
|
const-string p2, "Thread "
|
|
|
|
invoke-static {p2}, Lf/e/b/a/a;->E(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-static {}, Ljava/lang/Thread;->currentThread()Ljava/lang/Thread;
|
|
|
|
move-result-object v1
|
|
|
|
const-string v2, "Thread.currentThread()"
|
|
|
|
invoke-static {v1, v2}, Lc0/n/c/i;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v1}, Ljava/lang/Thread;->getName()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {p2, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
const-string v1, " MUST NOT hold lock on "
|
|
|
|
invoke-virtual {p2, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-direct {p1, p2}, Ljava/lang/AssertionError;-><init>(Ljava/lang/Object;)V
|
|
|
|
throw p1
|
|
|
|
:cond_1
|
|
:goto_0
|
|
iget-object v0, p0, Lg0/h0/j/n$b;->i:Lg0/h0/j/n;
|
|
|
|
iget-object v0, v0, Lg0/h0/j/n;->n:Lg0/h0/j/e;
|
|
|
|
invoke-virtual {v0, p1, p2}, Lg0/h0/j/e;->f(J)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public close()V
|
|
.locals 6
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lg0/h0/j/n$b;->i:Lg0/h0/j/n;
|
|
|
|
monitor-enter v0
|
|
|
|
const/4 v1, 0x1
|
|
|
|
:try_start_0
|
|
iput-boolean v1, p0, Lg0/h0/j/n$b;->f:Z
|
|
|
|
iget-object v1, p0, Lg0/h0/j/n$b;->e:Lh0/e;
|
|
|
|
iget-wide v1, v1, Lh0/e;->e:J
|
|
|
|
iget-object v3, p0, Lg0/h0/j/n$b;->e:Lh0/e;
|
|
|
|
iget-wide v4, v3, Lh0/e;->e:J
|
|
|
|
invoke-virtual {v3, v4, v5}, Lh0/e;->skip(J)V
|
|
|
|
iget-object v3, p0, Lg0/h0/j/n$b;->i:Lg0/h0/j/n;
|
|
|
|
if-eqz v3, :cond_1
|
|
|
|
invoke-virtual {v3}, Ljava/lang/Object;->notifyAll()V
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
monitor-exit v0
|
|
|
|
const-wide/16 v3, 0x0
|
|
|
|
cmp-long v0, v1, v3
|
|
|
|
if-lez v0, :cond_0
|
|
|
|
invoke-virtual {p0, v1, v2}, Lg0/h0/j/n$b;->a(J)V
|
|
|
|
:cond_0
|
|
iget-object v0, p0, Lg0/h0/j/n$b;->i:Lg0/h0/j/n;
|
|
|
|
invoke-virtual {v0}, Lg0/h0/j/n;->a()V
|
|
|
|
return-void
|
|
|
|
:cond_1
|
|
:try_start_1
|
|
new-instance v1, Lkotlin/TypeCastException;
|
|
|
|
const-string v2, "null cannot be cast to non-null type java.lang.Object"
|
|
|
|
invoke-direct {v1, v2}, Lkotlin/TypeCastException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw v1
|
|
:try_end_1
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
:catchall_0
|
|
move-exception v1
|
|
|
|
monitor-exit v0
|
|
|
|
throw v1
|
|
.end method
|
|
|
|
.method public timeout()Lh0/y;
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lg0/h0/j/n$b;->i:Lg0/h0/j/n;
|
|
|
|
iget-object v0, v0, Lg0/h0/j/n;->i:Lg0/h0/j/n$c;
|
|
|
|
return-object v0
|
|
.end method
|