1295 lines
31 KiB
Smali
1295 lines
31 KiB
Smali
.class public final Lokhttp3/internal/connection/StreamAllocation;
|
|
.super Ljava/lang/Object;
|
|
.source "StreamAllocation.java"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lokhttp3/internal/connection/StreamAllocation$StreamAllocationReference;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field static final synthetic b:Z
|
|
|
|
|
|
# instance fields
|
|
.field public final a:Lokhttp3/Address;
|
|
|
|
.field private c:Lokhttp3/Route;
|
|
|
|
.field private final d:Lokhttp3/ConnectionPool;
|
|
|
|
.field private final e:Ljava/lang/Object;
|
|
|
|
.field private final f:Lokhttp3/internal/connection/RouteSelector;
|
|
|
|
.field private g:I
|
|
|
|
.field private h:Lokhttp3/internal/connection/RealConnection;
|
|
|
|
.field private i:Z
|
|
|
|
.field private j:Z
|
|
|
|
.field private k:Lokhttp3/internal/http/HttpCodec;
|
|
|
|
|
|
# direct methods
|
|
.method static constructor <clinit>()V
|
|
.locals 1
|
|
|
|
.line 72
|
|
const-class v0, Lokhttp3/internal/connection/StreamAllocation;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Class;->desiredAssertionStatus()Z
|
|
|
|
move-result v0
|
|
|
|
xor-int/lit8 v0, v0, 0x1
|
|
|
|
sput-boolean v0, Lokhttp3/internal/connection/StreamAllocation;->b:Z
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Lokhttp3/ConnectionPool;Lokhttp3/Address;Ljava/lang/Object;)V
|
|
.locals 1
|
|
|
|
.line 86
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
.line 87
|
|
iput-object p1, p0, Lokhttp3/internal/connection/StreamAllocation;->d:Lokhttp3/ConnectionPool;
|
|
|
|
.line 88
|
|
iput-object p2, p0, Lokhttp3/internal/connection/StreamAllocation;->a:Lokhttp3/Address;
|
|
|
|
.line 89
|
|
new-instance p1, Lokhttp3/internal/connection/RouteSelector;
|
|
|
|
invoke-direct {p0}, Lokhttp3/internal/connection/StreamAllocation;->g()Lokhttp3/internal/connection/RouteDatabase;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-direct {p1, p2, v0}, Lokhttp3/internal/connection/RouteSelector;-><init>(Lokhttp3/Address;Lokhttp3/internal/connection/RouteDatabase;)V
|
|
|
|
iput-object p1, p0, Lokhttp3/internal/connection/StreamAllocation;->f:Lokhttp3/internal/connection/RouteSelector;
|
|
|
|
.line 90
|
|
iput-object p3, p0, Lokhttp3/internal/connection/StreamAllocation;->e:Ljava/lang/Object;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private a(ZZZ)Ljava/net/Socket;
|
|
.locals 1
|
|
|
|
.line 259
|
|
sget-boolean v0, Lokhttp3/internal/connection/StreamAllocation;->b:Z
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/connection/StreamAllocation;->d:Lokhttp3/ConnectionPool;
|
|
|
|
invoke-static {v0}, Ljava/lang/Thread;->holdsLock(Ljava/lang/Object;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
new-instance p1, Ljava/lang/AssertionError;
|
|
|
|
invoke-direct {p1}, Ljava/lang/AssertionError;-><init>()V
|
|
|
|
throw p1
|
|
|
|
:cond_1
|
|
:goto_0
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p3, :cond_2
|
|
|
|
.line 262
|
|
iput-object v0, p0, Lokhttp3/internal/connection/StreamAllocation;->k:Lokhttp3/internal/http/HttpCodec;
|
|
|
|
:cond_2
|
|
const/4 p3, 0x1
|
|
|
|
if-eqz p2, :cond_3
|
|
|
|
.line 265
|
|
iput-boolean p3, p0, Lokhttp3/internal/connection/StreamAllocation;->i:Z
|
|
|
|
.line 268
|
|
:cond_3
|
|
iget-object p2, p0, Lokhttp3/internal/connection/StreamAllocation;->h:Lokhttp3/internal/connection/RealConnection;
|
|
|
|
if-eqz p2, :cond_7
|
|
|
|
if-eqz p1, :cond_4
|
|
|
|
.line 270
|
|
iget-object p1, p0, Lokhttp3/internal/connection/StreamAllocation;->h:Lokhttp3/internal/connection/RealConnection;
|
|
|
|
iput-boolean p3, p1, Lokhttp3/internal/connection/RealConnection;->a:Z
|
|
|
|
.line 272
|
|
:cond_4
|
|
iget-object p1, p0, Lokhttp3/internal/connection/StreamAllocation;->k:Lokhttp3/internal/http/HttpCodec;
|
|
|
|
if-nez p1, :cond_7
|
|
|
|
iget-boolean p1, p0, Lokhttp3/internal/connection/StreamAllocation;->i:Z
|
|
|
|
if-nez p1, :cond_5
|
|
|
|
iget-object p1, p0, Lokhttp3/internal/connection/StreamAllocation;->h:Lokhttp3/internal/connection/RealConnection;
|
|
|
|
iget-boolean p1, p1, Lokhttp3/internal/connection/RealConnection;->a:Z
|
|
|
|
if-eqz p1, :cond_7
|
|
|
|
.line 273
|
|
:cond_5
|
|
iget-object p1, p0, Lokhttp3/internal/connection/StreamAllocation;->h:Lokhttp3/internal/connection/RealConnection;
|
|
|
|
invoke-direct {p0, p1}, Lokhttp3/internal/connection/StreamAllocation;->c(Lokhttp3/internal/connection/RealConnection;)V
|
|
|
|
.line 274
|
|
iget-object p1, p0, Lokhttp3/internal/connection/StreamAllocation;->h:Lokhttp3/internal/connection/RealConnection;
|
|
|
|
iget-object p1, p1, Lokhttp3/internal/connection/RealConnection;->d:Ljava/util/List;
|
|
|
|
invoke-interface {p1}, Ljava/util/List;->isEmpty()Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_6
|
|
|
|
.line 275
|
|
iget-object p1, p0, Lokhttp3/internal/connection/StreamAllocation;->h:Lokhttp3/internal/connection/RealConnection;
|
|
|
|
invoke-static {}, Ljava/lang/System;->nanoTime()J
|
|
|
|
move-result-wide p2
|
|
|
|
iput-wide p2, p1, Lokhttp3/internal/connection/RealConnection;->e:J
|
|
|
|
.line 276
|
|
sget-object p1, Lokhttp3/internal/Internal;->a:Lokhttp3/internal/Internal;
|
|
|
|
iget-object p2, p0, Lokhttp3/internal/connection/StreamAllocation;->d:Lokhttp3/ConnectionPool;
|
|
|
|
iget-object p3, p0, Lokhttp3/internal/connection/StreamAllocation;->h:Lokhttp3/internal/connection/RealConnection;
|
|
|
|
invoke-virtual {p1, p2, p3}, Lokhttp3/internal/Internal;->a(Lokhttp3/ConnectionPool;Lokhttp3/internal/connection/RealConnection;)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_6
|
|
|
|
.line 277
|
|
iget-object p1, p0, Lokhttp3/internal/connection/StreamAllocation;->h:Lokhttp3/internal/connection/RealConnection;
|
|
|
|
invoke-virtual {p1}, Lokhttp3/internal/connection/RealConnection;->d()Ljava/net/Socket;
|
|
|
|
move-result-object p1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_6
|
|
move-object p1, v0
|
|
|
|
.line 280
|
|
:goto_1
|
|
iput-object v0, p0, Lokhttp3/internal/connection/StreamAllocation;->h:Lokhttp3/internal/connection/RealConnection;
|
|
|
|
goto :goto_2
|
|
|
|
:cond_7
|
|
move-object p1, v0
|
|
|
|
:goto_2
|
|
return-object p1
|
|
.end method
|
|
|
|
.method private a(IIIZ)Lokhttp3/internal/connection/RealConnection;
|
|
.locals 4
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
.line 149
|
|
iget-object v0, p0, Lokhttp3/internal/connection/StreamAllocation;->d:Lokhttp3/ConnectionPool;
|
|
|
|
monitor-enter v0
|
|
|
|
.line 150
|
|
:try_start_0
|
|
iget-boolean v1, p0, Lokhttp3/internal/connection/StreamAllocation;->i:Z
|
|
|
|
if-nez v1, :cond_7
|
|
|
|
.line 151
|
|
iget-object v1, p0, Lokhttp3/internal/connection/StreamAllocation;->k:Lokhttp3/internal/http/HttpCodec;
|
|
|
|
if-nez v1, :cond_6
|
|
|
|
.line 152
|
|
iget-boolean v1, p0, Lokhttp3/internal/connection/StreamAllocation;->j:Z
|
|
|
|
if-nez v1, :cond_5
|
|
|
|
.line 155
|
|
iget-object v1, p0, Lokhttp3/internal/connection/StreamAllocation;->h:Lokhttp3/internal/connection/RealConnection;
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
.line 156
|
|
iget-boolean v2, v1, Lokhttp3/internal/connection/RealConnection;->a:Z
|
|
|
|
if-nez v2, :cond_0
|
|
|
|
.line 157
|
|
monitor-exit v0
|
|
|
|
return-object v1
|
|
|
|
.line 161
|
|
:cond_0
|
|
sget-object v1, Lokhttp3/internal/Internal;->a:Lokhttp3/internal/Internal;
|
|
|
|
iget-object v2, p0, Lokhttp3/internal/connection/StreamAllocation;->d:Lokhttp3/ConnectionPool;
|
|
|
|
iget-object v3, p0, Lokhttp3/internal/connection/StreamAllocation;->a:Lokhttp3/Address;
|
|
|
|
invoke-virtual {v1, v2, v3, p0}, Lokhttp3/internal/Internal;->a(Lokhttp3/ConnectionPool;Lokhttp3/Address;Lokhttp3/internal/connection/StreamAllocation;)Lokhttp3/internal/connection/RealConnection;
|
|
|
|
.line 162
|
|
iget-object v1, p0, Lokhttp3/internal/connection/StreamAllocation;->h:Lokhttp3/internal/connection/RealConnection;
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
.line 163
|
|
iget-object p1, p0, Lokhttp3/internal/connection/StreamAllocation;->h:Lokhttp3/internal/connection/RealConnection;
|
|
|
|
monitor-exit v0
|
|
|
|
return-object p1
|
|
|
|
.line 166
|
|
:cond_1
|
|
iget-object v1, p0, Lokhttp3/internal/connection/StreamAllocation;->c:Lokhttp3/Route;
|
|
|
|
.line 167
|
|
monitor-exit v0
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_2
|
|
|
|
if-nez v1, :cond_2
|
|
|
|
.line 171
|
|
iget-object v0, p0, Lokhttp3/internal/connection/StreamAllocation;->f:Lokhttp3/internal/connection/RouteSelector;
|
|
|
|
invoke-virtual {v0}, Lokhttp3/internal/connection/RouteSelector;->b()Lokhttp3/Route;
|
|
|
|
move-result-object v1
|
|
|
|
.line 177
|
|
:cond_2
|
|
iget-object v2, p0, Lokhttp3/internal/connection/StreamAllocation;->d:Lokhttp3/ConnectionPool;
|
|
|
|
monitor-enter v2
|
|
|
|
.line 178
|
|
:try_start_1
|
|
iput-object v1, p0, Lokhttp3/internal/connection/StreamAllocation;->c:Lokhttp3/Route;
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 179
|
|
iput v0, p0, Lokhttp3/internal/connection/StreamAllocation;->g:I
|
|
|
|
.line 180
|
|
new-instance v0, Lokhttp3/internal/connection/RealConnection;
|
|
|
|
iget-object v3, p0, Lokhttp3/internal/connection/StreamAllocation;->d:Lokhttp3/ConnectionPool;
|
|
|
|
invoke-direct {v0, v3, v1}, Lokhttp3/internal/connection/RealConnection;-><init>(Lokhttp3/ConnectionPool;Lokhttp3/Route;)V
|
|
|
|
.line 181
|
|
invoke-virtual {p0, v0}, Lokhttp3/internal/connection/StreamAllocation;->a(Lokhttp3/internal/connection/RealConnection;)V
|
|
|
|
.line 182
|
|
iget-boolean v1, p0, Lokhttp3/internal/connection/StreamAllocation;->j:Z
|
|
|
|
if-nez v1, :cond_4
|
|
|
|
.line 183
|
|
monitor-exit v2
|
|
:try_end_1
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_1
|
|
|
|
.line 186
|
|
invoke-virtual {v0, p1, p2, p3, p4}, Lokhttp3/internal/connection/RealConnection;->a(IIIZ)V
|
|
|
|
.line 187
|
|
invoke-direct {p0}, Lokhttp3/internal/connection/StreamAllocation;->g()Lokhttp3/internal/connection/RouteDatabase;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {v0}, Lokhttp3/internal/connection/RealConnection;->a()Lokhttp3/Route;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-virtual {p1, p2}, Lokhttp3/internal/connection/RouteDatabase;->b(Lokhttp3/Route;)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
.line 190
|
|
iget-object p2, p0, Lokhttp3/internal/connection/StreamAllocation;->d:Lokhttp3/ConnectionPool;
|
|
|
|
monitor-enter p2
|
|
|
|
.line 192
|
|
:try_start_2
|
|
sget-object p3, Lokhttp3/internal/Internal;->a:Lokhttp3/internal/Internal;
|
|
|
|
iget-object p4, p0, Lokhttp3/internal/connection/StreamAllocation;->d:Lokhttp3/ConnectionPool;
|
|
|
|
invoke-virtual {p3, p4, v0}, Lokhttp3/internal/Internal;->b(Lokhttp3/ConnectionPool;Lokhttp3/internal/connection/RealConnection;)V
|
|
|
|
.line 196
|
|
invoke-virtual {v0}, Lokhttp3/internal/connection/RealConnection;->e()Z
|
|
|
|
move-result p3
|
|
|
|
if-eqz p3, :cond_3
|
|
|
|
.line 197
|
|
sget-object p1, Lokhttp3/internal/Internal;->a:Lokhttp3/internal/Internal;
|
|
|
|
iget-object p3, p0, Lokhttp3/internal/connection/StreamAllocation;->d:Lokhttp3/ConnectionPool;
|
|
|
|
iget-object p4, p0, Lokhttp3/internal/connection/StreamAllocation;->a:Lokhttp3/Address;
|
|
|
|
invoke-virtual {p1, p3, p4, p0}, Lokhttp3/internal/Internal;->b(Lokhttp3/ConnectionPool;Lokhttp3/Address;Lokhttp3/internal/connection/StreamAllocation;)Ljava/net/Socket;
|
|
|
|
move-result-object p1
|
|
|
|
.line 198
|
|
iget-object v0, p0, Lokhttp3/internal/connection/StreamAllocation;->h:Lokhttp3/internal/connection/RealConnection;
|
|
|
|
.line 200
|
|
:cond_3
|
|
monitor-exit p2
|
|
:try_end_2
|
|
.catchall {:try_start_2 .. :try_end_2} :catchall_0
|
|
|
|
.line 201
|
|
invoke-static {p1}, Lokhttp3/internal/Util;->a(Ljava/net/Socket;)V
|
|
|
|
return-object v0
|
|
|
|
:catchall_0
|
|
move-exception p1
|
|
|
|
.line 200
|
|
:try_start_3
|
|
monitor-exit p2
|
|
:try_end_3
|
|
.catchall {:try_start_3 .. :try_end_3} :catchall_0
|
|
|
|
throw p1
|
|
|
|
.line 182
|
|
:cond_4
|
|
:try_start_4
|
|
new-instance p1, Ljava/io/IOException;
|
|
|
|
const-string p2, "Canceled"
|
|
|
|
invoke-direct {p1, p2}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
|
|
:catchall_1
|
|
move-exception p1
|
|
|
|
.line 183
|
|
monitor-exit v2
|
|
:try_end_4
|
|
.catchall {:try_start_4 .. :try_end_4} :catchall_1
|
|
|
|
throw p1
|
|
|
|
.line 152
|
|
:cond_5
|
|
:try_start_5
|
|
new-instance p1, Ljava/io/IOException;
|
|
|
|
const-string p2, "Canceled"
|
|
|
|
invoke-direct {p1, p2}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
|
|
.line 151
|
|
:cond_6
|
|
new-instance p1, Ljava/lang/IllegalStateException;
|
|
|
|
const-string p2, "codec != null"
|
|
|
|
invoke-direct {p1, p2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
|
|
.line 150
|
|
:cond_7
|
|
new-instance p1, Ljava/lang/IllegalStateException;
|
|
|
|
const-string p2, "released"
|
|
|
|
invoke-direct {p1, p2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
|
|
:catchall_2
|
|
move-exception p1
|
|
|
|
.line 167
|
|
monitor-exit v0
|
|
:try_end_5
|
|
.catchall {:try_start_5 .. :try_end_5} :catchall_2
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method private a(IIIZZ)Lokhttp3/internal/connection/RealConnection;
|
|
.locals 3
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
.line 121
|
|
:goto_0
|
|
invoke-direct {p0, p1, p2, p3, p4}, Lokhttp3/internal/connection/StreamAllocation;->a(IIIZ)Lokhttp3/internal/connection/RealConnection;
|
|
|
|
move-result-object v0
|
|
|
|
.line 125
|
|
iget-object v1, p0, Lokhttp3/internal/connection/StreamAllocation;->d:Lokhttp3/ConnectionPool;
|
|
|
|
monitor-enter v1
|
|
|
|
.line 126
|
|
:try_start_0
|
|
iget v2, v0, Lokhttp3/internal/connection/RealConnection;->b:I
|
|
|
|
if-nez v2, :cond_0
|
|
|
|
.line 127
|
|
monitor-exit v1
|
|
|
|
return-object v0
|
|
|
|
.line 129
|
|
:cond_0
|
|
monitor-exit v1
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
.line 133
|
|
invoke-virtual {v0, p5}, Lokhttp3/internal/connection/RealConnection;->a(Z)Z
|
|
|
|
move-result v1
|
|
|
|
if-nez v1, :cond_1
|
|
|
|
.line 134
|
|
invoke-virtual {p0}, Lokhttp3/internal/connection/StreamAllocation;->d()V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
return-object v0
|
|
|
|
:catchall_0
|
|
move-exception p1
|
|
|
|
.line 129
|
|
:try_start_1
|
|
monitor-exit v1
|
|
:try_end_1
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method private c(Lokhttp3/internal/connection/RealConnection;)V
|
|
.locals 3
|
|
|
|
.line 349
|
|
iget-object v0, p1, Lokhttp3/internal/connection/RealConnection;->d:Ljava/util/List;
|
|
|
|
invoke-interface {v0}, Ljava/util/List;->size()I
|
|
|
|
move-result v0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
:goto_0
|
|
if-ge v1, v0, :cond_1
|
|
|
|
.line 350
|
|
iget-object v2, p1, Lokhttp3/internal/connection/RealConnection;->d:Ljava/util/List;
|
|
|
|
invoke-interface {v2, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Ljava/lang/ref/Reference;
|
|
|
|
.line 351
|
|
invoke-virtual {v2}, Ljava/lang/ref/Reference;->get()Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
if-ne v2, p0, :cond_0
|
|
|
|
.line 352
|
|
iget-object p1, p1, Lokhttp3/internal/connection/RealConnection;->d:Ljava/util/List;
|
|
|
|
invoke-interface {p1, v1}, Ljava/util/List;->remove(I)Ljava/lang/Object;
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
add-int/lit8 v1, v1, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
.line 356
|
|
:cond_1
|
|
new-instance p1, Ljava/lang/IllegalStateException;
|
|
|
|
invoke-direct {p1}, Ljava/lang/IllegalStateException;-><init>()V
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method private g()Lokhttp3/internal/connection/RouteDatabase;
|
|
.locals 2
|
|
|
|
.line 227
|
|
sget-object v0, Lokhttp3/internal/Internal;->a:Lokhttp3/internal/Internal;
|
|
|
|
iget-object v1, p0, Lokhttp3/internal/connection/StreamAllocation;->d:Lokhttp3/ConnectionPool;
|
|
|
|
invoke-virtual {v0, v1}, Lokhttp3/internal/Internal;->a(Lokhttp3/ConnectionPool;)Lokhttp3/internal/connection/RouteDatabase;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public a()Lokhttp3/internal/http/HttpCodec;
|
|
.locals 2
|
|
|
|
.line 221
|
|
iget-object v0, p0, Lokhttp3/internal/connection/StreamAllocation;->d:Lokhttp3/ConnectionPool;
|
|
|
|
monitor-enter v0
|
|
|
|
.line 222
|
|
:try_start_0
|
|
iget-object v1, p0, Lokhttp3/internal/connection/StreamAllocation;->k:Lokhttp3/internal/http/HttpCodec;
|
|
|
|
monitor-exit v0
|
|
|
|
return-object v1
|
|
|
|
:catchall_0
|
|
move-exception v1
|
|
|
|
.line 223
|
|
monitor-exit v0
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
throw v1
|
|
.end method
|
|
|
|
.method public a(Lokhttp3/OkHttpClient;Z)Lokhttp3/internal/http/HttpCodec;
|
|
.locals 6
|
|
|
|
.line 94
|
|
invoke-virtual {p1}, Lokhttp3/OkHttpClient;->a()I
|
|
|
|
move-result v1
|
|
|
|
.line 95
|
|
invoke-virtual {p1}, Lokhttp3/OkHttpClient;->b()I
|
|
|
|
move-result v2
|
|
|
|
.line 96
|
|
invoke-virtual {p1}, Lokhttp3/OkHttpClient;->c()I
|
|
|
|
move-result v3
|
|
|
|
.line 97
|
|
invoke-virtual {p1}, Lokhttp3/OkHttpClient;->s()Z
|
|
|
|
move-result v4
|
|
|
|
move-object v0, p0
|
|
|
|
move v5, p2
|
|
|
|
.line 100
|
|
:try_start_0
|
|
invoke-direct/range {v0 .. v5}, Lokhttp3/internal/connection/StreamAllocation;->a(IIIZZ)Lokhttp3/internal/connection/RealConnection;
|
|
|
|
move-result-object p2
|
|
|
|
.line 102
|
|
invoke-virtual {p2, p1, p0}, Lokhttp3/internal/connection/RealConnection;->a(Lokhttp3/OkHttpClient;Lokhttp3/internal/connection/StreamAllocation;)Lokhttp3/internal/http/HttpCodec;
|
|
|
|
move-result-object p1
|
|
|
|
.line 104
|
|
iget-object p2, p0, Lokhttp3/internal/connection/StreamAllocation;->d:Lokhttp3/ConnectionPool;
|
|
|
|
monitor-enter p2
|
|
:try_end_0
|
|
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
.line 105
|
|
:try_start_1
|
|
iput-object p1, p0, Lokhttp3/internal/connection/StreamAllocation;->k:Lokhttp3/internal/http/HttpCodec;
|
|
|
|
.line 106
|
|
monitor-exit p2
|
|
|
|
return-object p1
|
|
|
|
:catchall_0
|
|
move-exception p1
|
|
|
|
.line 107
|
|
monitor-exit p2
|
|
:try_end_1
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
:try_start_2
|
|
throw p1
|
|
:try_end_2
|
|
.catch Ljava/io/IOException; {:try_start_2 .. :try_end_2} :catch_0
|
|
|
|
:catch_0
|
|
move-exception p1
|
|
|
|
.line 109
|
|
new-instance p2, Lokhttp3/internal/connection/RouteException;
|
|
|
|
invoke-direct {p2, p1}, Lokhttp3/internal/connection/RouteException;-><init>(Ljava/io/IOException;)V
|
|
|
|
throw p2
|
|
.end method
|
|
|
|
.method public a(Ljava/io/IOException;)V
|
|
.locals 6
|
|
|
|
.line 305
|
|
iget-object v0, p0, Lokhttp3/internal/connection/StreamAllocation;->d:Lokhttp3/ConnectionPool;
|
|
|
|
monitor-enter v0
|
|
|
|
.line 306
|
|
:try_start_0
|
|
instance-of v1, p1, Lokhttp3/internal/http2/StreamResetException;
|
|
|
|
const/4 v2, 0x0
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/4 v4, 0x1
|
|
|
|
if-eqz v1, :cond_2
|
|
|
|
.line 307
|
|
check-cast p1, Lokhttp3/internal/http2/StreamResetException;
|
|
|
|
.line 308
|
|
iget-object v1, p1, Lokhttp3/internal/http2/StreamResetException;->errorCode:Lokhttp3/internal/http2/ErrorCode;
|
|
|
|
sget-object v5, Lokhttp3/internal/http2/ErrorCode;->REFUSED_STREAM:Lokhttp3/internal/http2/ErrorCode;
|
|
|
|
if-ne v1, v5, :cond_0
|
|
|
|
.line 309
|
|
iget v1, p0, Lokhttp3/internal/connection/StreamAllocation;->g:I
|
|
|
|
add-int/2addr v1, v4
|
|
|
|
iput v1, p0, Lokhttp3/internal/connection/StreamAllocation;->g:I
|
|
|
|
.line 313
|
|
:cond_0
|
|
iget-object p1, p1, Lokhttp3/internal/http2/StreamResetException;->errorCode:Lokhttp3/internal/http2/ErrorCode;
|
|
|
|
sget-object v1, Lokhttp3/internal/http2/ErrorCode;->REFUSED_STREAM:Lokhttp3/internal/http2/ErrorCode;
|
|
|
|
if-ne p1, v1, :cond_1
|
|
|
|
iget p1, p0, Lokhttp3/internal/connection/StreamAllocation;->g:I
|
|
|
|
if-le p1, v4, :cond_6
|
|
|
|
.line 315
|
|
:cond_1
|
|
iput-object v2, p0, Lokhttp3/internal/connection/StreamAllocation;->c:Lokhttp3/Route;
|
|
|
|
goto :goto_0
|
|
|
|
.line 317
|
|
:cond_2
|
|
iget-object v1, p0, Lokhttp3/internal/connection/StreamAllocation;->h:Lokhttp3/internal/connection/RealConnection;
|
|
|
|
if-eqz v1, :cond_6
|
|
|
|
iget-object v1, p0, Lokhttp3/internal/connection/StreamAllocation;->h:Lokhttp3/internal/connection/RealConnection;
|
|
|
|
.line 318
|
|
invoke-virtual {v1}, Lokhttp3/internal/connection/RealConnection;->e()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_3
|
|
|
|
instance-of v1, p1, Lokhttp3/internal/http2/ConnectionShutdownException;
|
|
|
|
if-eqz v1, :cond_6
|
|
|
|
.line 322
|
|
:cond_3
|
|
iget-object v1, p0, Lokhttp3/internal/connection/StreamAllocation;->h:Lokhttp3/internal/connection/RealConnection;
|
|
|
|
iget v1, v1, Lokhttp3/internal/connection/RealConnection;->b:I
|
|
|
|
if-nez v1, :cond_5
|
|
|
|
.line 323
|
|
iget-object v1, p0, Lokhttp3/internal/connection/StreamAllocation;->c:Lokhttp3/Route;
|
|
|
|
if-eqz v1, :cond_4
|
|
|
|
if-eqz p1, :cond_4
|
|
|
|
.line 324
|
|
iget-object v1, p0, Lokhttp3/internal/connection/StreamAllocation;->f:Lokhttp3/internal/connection/RouteSelector;
|
|
|
|
iget-object v5, p0, Lokhttp3/internal/connection/StreamAllocation;->c:Lokhttp3/Route;
|
|
|
|
invoke-virtual {v1, v5, p1}, Lokhttp3/internal/connection/RouteSelector;->a(Lokhttp3/Route;Ljava/io/IOException;)V
|
|
|
|
.line 326
|
|
:cond_4
|
|
iput-object v2, p0, Lokhttp3/internal/connection/StreamAllocation;->c:Lokhttp3/Route;
|
|
|
|
:cond_5
|
|
:goto_0
|
|
const/4 p1, 0x1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_6
|
|
const/4 p1, 0x0
|
|
|
|
.line 329
|
|
:goto_1
|
|
invoke-direct {p0, p1, v3, v4}, Lokhttp3/internal/connection/StreamAllocation;->a(ZZZ)Ljava/net/Socket;
|
|
|
|
move-result-object p1
|
|
|
|
.line 330
|
|
monitor-exit v0
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
.line 332
|
|
invoke-static {p1}, Lokhttp3/internal/Util;->a(Ljava/net/Socket;)V
|
|
|
|
return-void
|
|
|
|
:catchall_0
|
|
move-exception p1
|
|
|
|
.line 330
|
|
:try_start_1
|
|
monitor-exit v0
|
|
:try_end_1
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public a(Lokhttp3/internal/connection/RealConnection;)V
|
|
.locals 2
|
|
|
|
.line 340
|
|
sget-boolean v0, Lokhttp3/internal/connection/StreamAllocation;->b:Z
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/connection/StreamAllocation;->d:Lokhttp3/ConnectionPool;
|
|
|
|
invoke-static {v0}, Ljava/lang/Thread;->holdsLock(Ljava/lang/Object;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
new-instance p1, Ljava/lang/AssertionError;
|
|
|
|
invoke-direct {p1}, Ljava/lang/AssertionError;-><init>()V
|
|
|
|
throw p1
|
|
|
|
.line 341
|
|
:cond_1
|
|
:goto_0
|
|
iget-object v0, p0, Lokhttp3/internal/connection/StreamAllocation;->h:Lokhttp3/internal/connection/RealConnection;
|
|
|
|
if-nez v0, :cond_2
|
|
|
|
.line 343
|
|
iput-object p1, p0, Lokhttp3/internal/connection/StreamAllocation;->h:Lokhttp3/internal/connection/RealConnection;
|
|
|
|
.line 344
|
|
iget-object p1, p1, Lokhttp3/internal/connection/RealConnection;->d:Ljava/util/List;
|
|
|
|
new-instance v0, Lokhttp3/internal/connection/StreamAllocation$StreamAllocationReference;
|
|
|
|
iget-object v1, p0, Lokhttp3/internal/connection/StreamAllocation;->e:Ljava/lang/Object;
|
|
|
|
invoke-direct {v0, p0, v1}, Lokhttp3/internal/connection/StreamAllocation$StreamAllocationReference;-><init>(Lokhttp3/internal/connection/StreamAllocation;Ljava/lang/Object;)V
|
|
|
|
invoke-interface {p1, v0}, Ljava/util/List;->add(Ljava/lang/Object;)Z
|
|
|
|
return-void
|
|
|
|
.line 341
|
|
:cond_2
|
|
new-instance p1, Ljava/lang/IllegalStateException;
|
|
|
|
invoke-direct {p1}, Ljava/lang/IllegalStateException;-><init>()V
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public a(ZLokhttp3/internal/http/HttpCodec;)V
|
|
.locals 3
|
|
|
|
.line 208
|
|
iget-object v0, p0, Lokhttp3/internal/connection/StreamAllocation;->d:Lokhttp3/ConnectionPool;
|
|
|
|
monitor-enter v0
|
|
|
|
if-eqz p2, :cond_1
|
|
|
|
.line 209
|
|
:try_start_0
|
|
iget-object v1, p0, Lokhttp3/internal/connection/StreamAllocation;->k:Lokhttp3/internal/http/HttpCodec;
|
|
|
|
if-ne p2, v1, :cond_1
|
|
|
|
const/4 p2, 0x1
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
.line 213
|
|
iget-object v1, p0, Lokhttp3/internal/connection/StreamAllocation;->h:Lokhttp3/internal/connection/RealConnection;
|
|
|
|
iget v2, v1, Lokhttp3/internal/connection/RealConnection;->b:I
|
|
|
|
add-int/2addr v2, p2
|
|
|
|
iput v2, v1, Lokhttp3/internal/connection/RealConnection;->b:I
|
|
|
|
:cond_0
|
|
const/4 v1, 0x0
|
|
|
|
.line 215
|
|
invoke-direct {p0, p1, v1, p2}, Lokhttp3/internal/connection/StreamAllocation;->a(ZZZ)Ljava/net/Socket;
|
|
|
|
move-result-object p1
|
|
|
|
.line 216
|
|
monitor-exit v0
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
.line 217
|
|
invoke-static {p1}, Lokhttp3/internal/Util;->a(Ljava/net/Socket;)V
|
|
|
|
return-void
|
|
|
|
:catchall_0
|
|
move-exception p1
|
|
|
|
goto :goto_0
|
|
|
|
.line 210
|
|
:cond_1
|
|
:try_start_1
|
|
new-instance p1, Ljava/lang/IllegalStateException;
|
|
|
|
new-instance v1, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v2, "expected "
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
iget-object v2, p0, Lokhttp3/internal/connection/StreamAllocation;->k:Lokhttp3/internal/http/HttpCodec;
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
const-string v2, " but was "
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-direct {p1, p2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
|
|
.line 216
|
|
:goto_0
|
|
monitor-exit v0
|
|
:try_end_1
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public b(Lokhttp3/internal/connection/RealConnection;)Ljava/net/Socket;
|
|
.locals 3
|
|
|
|
.line 368
|
|
sget-boolean v0, Lokhttp3/internal/connection/StreamAllocation;->b:Z
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/connection/StreamAllocation;->d:Lokhttp3/ConnectionPool;
|
|
|
|
invoke-static {v0}, Ljava/lang/Thread;->holdsLock(Ljava/lang/Object;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
new-instance p1, Ljava/lang/AssertionError;
|
|
|
|
invoke-direct {p1}, Ljava/lang/AssertionError;-><init>()V
|
|
|
|
throw p1
|
|
|
|
.line 369
|
|
:cond_1
|
|
:goto_0
|
|
iget-object v0, p0, Lokhttp3/internal/connection/StreamAllocation;->k:Lokhttp3/internal/http/HttpCodec;
|
|
|
|
if-nez v0, :cond_2
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/connection/StreamAllocation;->h:Lokhttp3/internal/connection/RealConnection;
|
|
|
|
iget-object v0, v0, Lokhttp3/internal/connection/RealConnection;->d:Ljava/util/List;
|
|
|
|
invoke-interface {v0}, Ljava/util/List;->size()I
|
|
|
|
move-result v0
|
|
|
|
const/4 v1, 0x1
|
|
|
|
if-ne v0, v1, :cond_2
|
|
|
|
.line 372
|
|
iget-object v0, p0, Lokhttp3/internal/connection/StreamAllocation;->h:Lokhttp3/internal/connection/RealConnection;
|
|
|
|
iget-object v0, v0, Lokhttp3/internal/connection/RealConnection;->d:Ljava/util/List;
|
|
|
|
const/4 v2, 0x0
|
|
|
|
invoke-interface {v0, v2}, Ljava/util/List;->get(I)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Ljava/lang/ref/Reference;
|
|
|
|
.line 373
|
|
invoke-direct {p0, v1, v2, v2}, Lokhttp3/internal/connection/StreamAllocation;->a(ZZZ)Ljava/net/Socket;
|
|
|
|
move-result-object v1
|
|
|
|
.line 376
|
|
iput-object p1, p0, Lokhttp3/internal/connection/StreamAllocation;->h:Lokhttp3/internal/connection/RealConnection;
|
|
|
|
.line 377
|
|
iget-object p1, p1, Lokhttp3/internal/connection/RealConnection;->d:Ljava/util/List;
|
|
|
|
invoke-interface {p1, v0}, Ljava/util/List;->add(Ljava/lang/Object;)Z
|
|
|
|
return-object v1
|
|
|
|
.line 369
|
|
:cond_2
|
|
new-instance p1, Ljava/lang/IllegalStateException;
|
|
|
|
invoke-direct {p1}, Ljava/lang/IllegalStateException;-><init>()V
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public declared-synchronized b()Lokhttp3/internal/connection/RealConnection;
|
|
.locals 1
|
|
|
|
monitor-enter p0
|
|
|
|
.line 231
|
|
:try_start_0
|
|
iget-object v0, p0, Lokhttp3/internal/connection/StreamAllocation;->h:Lokhttp3/internal/connection/RealConnection;
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
monitor-exit p0
|
|
|
|
return-object v0
|
|
|
|
:catchall_0
|
|
move-exception v0
|
|
|
|
monitor-exit p0
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public c()V
|
|
.locals 3
|
|
|
|
.line 236
|
|
iget-object v0, p0, Lokhttp3/internal/connection/StreamAllocation;->d:Lokhttp3/ConnectionPool;
|
|
|
|
monitor-enter v0
|
|
|
|
const/4 v1, 0x1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
.line 237
|
|
:try_start_0
|
|
invoke-direct {p0, v2, v1, v2}, Lokhttp3/internal/connection/StreamAllocation;->a(ZZZ)Ljava/net/Socket;
|
|
|
|
move-result-object v1
|
|
|
|
.line 238
|
|
monitor-exit v0
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
.line 239
|
|
invoke-static {v1}, Lokhttp3/internal/Util;->a(Ljava/net/Socket;)V
|
|
|
|
return-void
|
|
|
|
:catchall_0
|
|
move-exception v1
|
|
|
|
.line 238
|
|
:try_start_1
|
|
monitor-exit v0
|
|
:try_end_1
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
throw v1
|
|
.end method
|
|
|
|
.method public d()V
|
|
.locals 3
|
|
|
|
.line 245
|
|
iget-object v0, p0, Lokhttp3/internal/connection/StreamAllocation;->d:Lokhttp3/ConnectionPool;
|
|
|
|
monitor-enter v0
|
|
|
|
const/4 v1, 0x1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
.line 246
|
|
:try_start_0
|
|
invoke-direct {p0, v1, v2, v2}, Lokhttp3/internal/connection/StreamAllocation;->a(ZZZ)Ljava/net/Socket;
|
|
|
|
move-result-object v1
|
|
|
|
.line 247
|
|
monitor-exit v0
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
.line 248
|
|
invoke-static {v1}, Lokhttp3/internal/Util;->a(Ljava/net/Socket;)V
|
|
|
|
return-void
|
|
|
|
:catchall_0
|
|
move-exception v1
|
|
|
|
.line 247
|
|
:try_start_1
|
|
monitor-exit v0
|
|
:try_end_1
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
throw v1
|
|
.end method
|
|
|
|
.method public e()V
|
|
.locals 3
|
|
|
|
.line 289
|
|
iget-object v0, p0, Lokhttp3/internal/connection/StreamAllocation;->d:Lokhttp3/ConnectionPool;
|
|
|
|
monitor-enter v0
|
|
|
|
const/4 v1, 0x1
|
|
|
|
.line 290
|
|
:try_start_0
|
|
iput-boolean v1, p0, Lokhttp3/internal/connection/StreamAllocation;->j:Z
|
|
|
|
.line 291
|
|
iget-object v1, p0, Lokhttp3/internal/connection/StreamAllocation;->k:Lokhttp3/internal/http/HttpCodec;
|
|
|
|
.line 292
|
|
iget-object v2, p0, Lokhttp3/internal/connection/StreamAllocation;->h:Lokhttp3/internal/connection/RealConnection;
|
|
|
|
.line 293
|
|
monitor-exit v0
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
.line 295
|
|
invoke-interface {v1}, Lokhttp3/internal/http/HttpCodec;->c()V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
if-eqz v2, :cond_1
|
|
|
|
.line 297
|
|
invoke-virtual {v2}, Lokhttp3/internal/connection/RealConnection;->c()V
|
|
|
|
:cond_1
|
|
:goto_0
|
|
return-void
|
|
|
|
:catchall_0
|
|
move-exception v1
|
|
|
|
.line 293
|
|
:try_start_1
|
|
monitor-exit v0
|
|
:try_end_1
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
throw v1
|
|
.end method
|
|
|
|
.method public f()Z
|
|
.locals 1
|
|
|
|
.line 383
|
|
iget-object v0, p0, Lokhttp3/internal/connection/StreamAllocation;->c:Lokhttp3/Route;
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/connection/StreamAllocation;->f:Lokhttp3/internal/connection/RouteSelector;
|
|
|
|
invoke-virtual {v0}, Lokhttp3/internal/connection/RouteSelector;->a()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
:goto_0
|
|
const/4 v0, 0x1
|
|
|
|
:goto_1
|
|
return v0
|
|
.end method
|
|
|
|
.method public toString()Ljava/lang/String;
|
|
.locals 1
|
|
|
|
.line 387
|
|
invoke-virtual {p0}, Lokhttp3/internal/connection/StreamAllocation;->b()Lokhttp3/internal/connection/RealConnection;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 388
|
|
invoke-virtual {v0}, Lokhttp3/internal/connection/RealConnection;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
iget-object v0, p0, Lokhttp3/internal/connection/StreamAllocation;->a:Lokhttp3/Address;
|
|
|
|
invoke-virtual {v0}, Lokhttp3/Address;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
:goto_0
|
|
return-object v0
|
|
.end method
|