- Imported from https://github.com/supermegamestre/Project-Real-Resurrection-3 - APKTool decompilation (Smali bytecode) for modding and rebuilding APK - Supports both 32-bit (armeabi-v7a) and 64-bit (arm64-v8a) architectures - Includes full Smali source, resources, and native libraries - Ready to rebuild APK after modifications with apktool b command - Added comprehensive README-apktool.md with modding guide This branch complements the JADX branches: - Use JADX (main/discord-community) to UNDERSTAND code (readable Java) - Use APKTool (this branch) to MODIFY and REBUILD APK (editable Smali) Total: 44,417 files, 538.51 MB Smali source code
1176 lines
30 KiB
Smali
1176 lines
30 KiB
Smali
.class public final Lokhttp3/internal/connection/Transmitter;
|
|
.super Ljava/lang/Object;
|
|
.source "SourceFile"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lokhttp3/internal/connection/Transmitter$TransmitterReference;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field public final call:Lokhttp3/Call;
|
|
|
|
.field public callStackTrace:Ljava/lang/Object;
|
|
|
|
.field public canceled:Z
|
|
|
|
.field public final client:Lokhttp3/OkHttpClient;
|
|
|
|
.field public connection:Lokhttp3/internal/connection/RealConnection;
|
|
|
|
.field public final connectionPool:Lokhttp3/internal/connection/RealConnectionPool;
|
|
|
|
.field public final eventListener:Lokhttp3/EventListener;
|
|
|
|
.field public exchange:Lokhttp3/internal/connection/Exchange;
|
|
|
|
.field public exchangeFinder:Lokhttp3/internal/connection/ExchangeFinder;
|
|
|
|
.field public exchangeRequestDone:Z
|
|
|
|
.field public exchangeResponseDone:Z
|
|
|
|
.field public noMoreExchanges:Z
|
|
|
|
.field public request:Lokhttp3/Request;
|
|
|
|
.field public final timeout:Lokio/AsyncTimeout;
|
|
|
|
.field public timeoutEarlyExit:Z
|
|
|
|
|
|
# direct methods
|
|
.method static constructor <clinit>()V
|
|
.locals 0
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Lokhttp3/OkHttpClient;Lokhttp3/Call;)V
|
|
.locals 3
|
|
|
|
.line 79
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
.line 59
|
|
new-instance v0, Lokhttp3/internal/connection/Transmitter$1;
|
|
|
|
invoke-direct {v0, p0}, Lokhttp3/internal/connection/Transmitter$1;-><init>(Lokhttp3/internal/connection/Transmitter;)V
|
|
|
|
iput-object v0, p0, Lokhttp3/internal/connection/Transmitter;->timeout:Lokio/AsyncTimeout;
|
|
|
|
iput-object p1, p0, Lokhttp3/internal/connection/Transmitter;->client:Lokhttp3/OkHttpClient;
|
|
|
|
sget-object v1, Lokhttp3/internal/Internal;->instance:Lokhttp3/internal/Internal;
|
|
|
|
.line 81
|
|
invoke-virtual {p1}, Lokhttp3/OkHttpClient;->connectionPool()Lokhttp3/ConnectionPool;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v1, v2}, Lokhttp3/internal/Internal;->realConnectionPool(Lokhttp3/ConnectionPool;)Lokhttp3/internal/connection/RealConnectionPool;
|
|
|
|
move-result-object v1
|
|
|
|
iput-object v1, p0, Lokhttp3/internal/connection/Transmitter;->connectionPool:Lokhttp3/internal/connection/RealConnectionPool;
|
|
|
|
iput-object p2, p0, Lokhttp3/internal/connection/Transmitter;->call:Lokhttp3/Call;
|
|
|
|
.line 83
|
|
invoke-virtual {p1}, Lokhttp3/OkHttpClient;->eventListenerFactory()Lokhttp3/EventListener$Factory;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-interface {v1, p2}, Lokhttp3/EventListener$Factory;->create(Lokhttp3/Call;)Lokhttp3/EventListener;
|
|
|
|
move-result-object p2
|
|
|
|
iput-object p2, p0, Lokhttp3/internal/connection/Transmitter;->eventListener:Lokhttp3/EventListener;
|
|
|
|
.line 84
|
|
invoke-virtual {p1}, Lokhttp3/OkHttpClient;->callTimeoutMillis()I
|
|
|
|
move-result p1
|
|
|
|
int-to-long p1, p1
|
|
|
|
sget-object v1, Ljava/util/concurrent/TimeUnit;->MILLISECONDS:Ljava/util/concurrent/TimeUnit;
|
|
|
|
invoke-virtual {v0, p1, p2, v1}, Lokio/Timeout;->timeout(JLjava/util/concurrent/TimeUnit;)Lokio/Timeout;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public acquireConnectionNoEvents(Lokhttp3/internal/connection/RealConnection;)V
|
|
.locals 2
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/connection/Transmitter;->connection:Lokhttp3/internal/connection/RealConnection;
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
iput-object p1, p0, Lokhttp3/internal/connection/Transmitter;->connection:Lokhttp3/internal/connection/RealConnection;
|
|
|
|
.line 185
|
|
iget-object p1, p1, Lokhttp3/internal/connection/RealConnection;->transmitters:Ljava/util/List;
|
|
|
|
new-instance v0, Lokhttp3/internal/connection/Transmitter$TransmitterReference;
|
|
|
|
iget-object v1, p0, Lokhttp3/internal/connection/Transmitter;->callStackTrace:Ljava/lang/Object;
|
|
|
|
invoke-direct {v0, p0, v1}, Lokhttp3/internal/connection/Transmitter$TransmitterReference;-><init>(Lokhttp3/internal/connection/Transmitter;Ljava/lang/Object;)V
|
|
|
|
invoke-interface {p1, v0}, Ljava/util/List;->add(Ljava/lang/Object;)Z
|
|
|
|
return-void
|
|
|
|
.line 183
|
|
:cond_0
|
|
new-instance p1, Ljava/lang/IllegalStateException;
|
|
|
|
invoke-direct {p1}, Ljava/lang/IllegalStateException;-><init>()V
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public callStart()V
|
|
.locals 2
|
|
|
|
.line 116
|
|
invoke-static {}, Lokhttp3/internal/platform/Platform;->get()Lokhttp3/internal/platform/Platform;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "response.body().close()"
|
|
|
|
invoke-virtual {v0, v1}, Lokhttp3/internal/platform/Platform;->getStackTraceForCloseable(Ljava/lang/String;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
iput-object v0, p0, Lokhttp3/internal/connection/Transmitter;->callStackTrace:Ljava/lang/Object;
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/connection/Transmitter;->eventListener:Lokhttp3/EventListener;
|
|
|
|
iget-object v1, p0, Lokhttp3/internal/connection/Transmitter;->call:Lokhttp3/Call;
|
|
|
|
.line 117
|
|
invoke-virtual {v0, v1}, Lokhttp3/EventListener;->callStart(Lokhttp3/Call;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public canRetry()Z
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/connection/Transmitter;->exchangeFinder:Lokhttp3/internal/connection/ExchangeFinder;
|
|
|
|
.line 313
|
|
invoke-virtual {v0}, Lokhttp3/internal/connection/ExchangeFinder;->hasStreamFailure()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/connection/Transmitter;->exchangeFinder:Lokhttp3/internal/connection/ExchangeFinder;
|
|
|
|
invoke-virtual {v0}, Lokhttp3/internal/connection/ExchangeFinder;->hasRouteToTry()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
const/4 v0, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
:goto_0
|
|
return v0
|
|
.end method
|
|
|
|
.method public cancel()V
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/connection/Transmitter;->connectionPool:Lokhttp3/internal/connection/RealConnectionPool;
|
|
|
|
.line 334
|
|
monitor-enter v0
|
|
|
|
const/4 v1, 0x1
|
|
|
|
:try_start_0
|
|
iput-boolean v1, p0, Lokhttp3/internal/connection/Transmitter;->canceled:Z
|
|
|
|
iget-object v1, p0, Lokhttp3/internal/connection/Transmitter;->exchange:Lokhttp3/internal/connection/Exchange;
|
|
|
|
iget-object v2, p0, Lokhttp3/internal/connection/Transmitter;->exchangeFinder:Lokhttp3/internal/connection/ExchangeFinder;
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
.line 337
|
|
invoke-virtual {v2}, Lokhttp3/internal/connection/ExchangeFinder;->connectingConnection()Lokhttp3/internal/connection/RealConnection;
|
|
|
|
move-result-object v2
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
iget-object v2, p0, Lokhttp3/internal/connection/Transmitter;->exchangeFinder:Lokhttp3/internal/connection/ExchangeFinder;
|
|
|
|
.line 338
|
|
invoke-virtual {v2}, Lokhttp3/internal/connection/ExchangeFinder;->connectingConnection()Lokhttp3/internal/connection/RealConnection;
|
|
|
|
move-result-object v2
|
|
|
|
goto :goto_0
|
|
|
|
:catchall_0
|
|
move-exception v1
|
|
|
|
goto :goto_2
|
|
|
|
:cond_0
|
|
iget-object v2, p0, Lokhttp3/internal/connection/Transmitter;->connection:Lokhttp3/internal/connection/RealConnection;
|
|
|
|
.line 340
|
|
:goto_0
|
|
monitor-exit v0
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
.line 342
|
|
invoke-virtual {v1}, Lokhttp3/internal/connection/Exchange;->cancel()V
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
if-eqz v2, :cond_2
|
|
|
|
.line 344
|
|
invoke-virtual {v2}, Lokhttp3/internal/connection/RealConnection;->cancel()V
|
|
|
|
:cond_2
|
|
:goto_1
|
|
return-void
|
|
|
|
.line 340
|
|
:goto_2
|
|
:try_start_1
|
|
monitor-exit v0
|
|
:try_end_1
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
throw v1
|
|
.end method
|
|
|
|
.method public final createAddress(Lokhttp3/HttpUrl;)Lokhttp3/Address;
|
|
.locals 14
|
|
|
|
.line 146
|
|
invoke-virtual {p1}, Lokhttp3/HttpUrl;->isHttps()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/connection/Transmitter;->client:Lokhttp3/OkHttpClient;
|
|
|
|
.line 147
|
|
invoke-virtual {v0}, Lokhttp3/OkHttpClient;->sslSocketFactory()Ljavax/net/ssl/SSLSocketFactory;
|
|
|
|
move-result-object v0
|
|
|
|
iget-object v1, p0, Lokhttp3/internal/connection/Transmitter;->client:Lokhttp3/OkHttpClient;
|
|
|
|
.line 148
|
|
invoke-virtual {v1}, Lokhttp3/OkHttpClient;->hostnameVerifier()Ljavax/net/ssl/HostnameVerifier;
|
|
|
|
move-result-object v1
|
|
|
|
iget-object v2, p0, Lokhttp3/internal/connection/Transmitter;->client:Lokhttp3/OkHttpClient;
|
|
|
|
.line 149
|
|
invoke-virtual {v2}, Lokhttp3/OkHttpClient;->certificatePinner()Lokhttp3/CertificatePinner;
|
|
|
|
move-result-object v2
|
|
|
|
move-object v6, v0
|
|
|
|
move-object v7, v1
|
|
|
|
move-object v8, v2
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
move-object v6, v0
|
|
|
|
move-object v7, v6
|
|
|
|
move-object v8, v7
|
|
|
|
.line 152
|
|
:goto_0
|
|
new-instance v0, Lokhttp3/Address;
|
|
|
|
invoke-virtual {p1}, Lokhttp3/HttpUrl;->host()Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {p1}, Lokhttp3/HttpUrl;->port()I
|
|
|
|
move-result v3
|
|
|
|
iget-object p1, p0, Lokhttp3/internal/connection/Transmitter;->client:Lokhttp3/OkHttpClient;
|
|
|
|
invoke-virtual {p1}, Lokhttp3/OkHttpClient;->dns()Lokhttp3/Dns;
|
|
|
|
move-result-object v4
|
|
|
|
iget-object p1, p0, Lokhttp3/internal/connection/Transmitter;->client:Lokhttp3/OkHttpClient;
|
|
|
|
invoke-virtual {p1}, Lokhttp3/OkHttpClient;->socketFactory()Ljavax/net/SocketFactory;
|
|
|
|
move-result-object v5
|
|
|
|
iget-object p1, p0, Lokhttp3/internal/connection/Transmitter;->client:Lokhttp3/OkHttpClient;
|
|
|
|
.line 153
|
|
invoke-virtual {p1}, Lokhttp3/OkHttpClient;->proxyAuthenticator()Lokhttp3/Authenticator;
|
|
|
|
move-result-object v9
|
|
|
|
iget-object p1, p0, Lokhttp3/internal/connection/Transmitter;->client:Lokhttp3/OkHttpClient;
|
|
|
|
.line 154
|
|
invoke-virtual {p1}, Lokhttp3/OkHttpClient;->proxy()Ljava/net/Proxy;
|
|
|
|
move-result-object v10
|
|
|
|
iget-object p1, p0, Lokhttp3/internal/connection/Transmitter;->client:Lokhttp3/OkHttpClient;
|
|
|
|
invoke-virtual {p1}, Lokhttp3/OkHttpClient;->protocols()Ljava/util/List;
|
|
|
|
move-result-object v11
|
|
|
|
iget-object p1, p0, Lokhttp3/internal/connection/Transmitter;->client:Lokhttp3/OkHttpClient;
|
|
|
|
invoke-virtual {p1}, Lokhttp3/OkHttpClient;->connectionSpecs()Ljava/util/List;
|
|
|
|
move-result-object v12
|
|
|
|
iget-object p1, p0, Lokhttp3/internal/connection/Transmitter;->client:Lokhttp3/OkHttpClient;
|
|
|
|
invoke-virtual {p1}, Lokhttp3/OkHttpClient;->proxySelector()Ljava/net/ProxySelector;
|
|
|
|
move-result-object v13
|
|
|
|
move-object v1, v0
|
|
|
|
invoke-direct/range {v1 .. v13}, Lokhttp3/Address;-><init>(Ljava/lang/String;ILokhttp3/Dns;Ljavax/net/SocketFactory;Ljavax/net/ssl/SSLSocketFactory;Ljavax/net/ssl/HostnameVerifier;Lokhttp3/CertificatePinner;Lokhttp3/Authenticator;Ljava/net/Proxy;Ljava/util/List;Ljava/util/List;Ljava/net/ProxySelector;)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public exchangeDoneDueToException()V
|
|
.locals 2
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/connection/Transmitter;->connectionPool:Lokhttp3/internal/connection/RealConnectionPool;
|
|
|
|
.line 221
|
|
monitor-enter v0
|
|
|
|
:try_start_0
|
|
iget-boolean v1, p0, Lokhttp3/internal/connection/Transmitter;->noMoreExchanges:Z
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
iput-object v1, p0, Lokhttp3/internal/connection/Transmitter;->exchange:Lokhttp3/internal/connection/Exchange;
|
|
|
|
.line 224
|
|
monitor-exit v0
|
|
|
|
return-void
|
|
|
|
:catchall_0
|
|
move-exception v1
|
|
|
|
goto :goto_0
|
|
|
|
.line 222
|
|
:cond_0
|
|
new-instance v1, Ljava/lang/IllegalStateException;
|
|
|
|
invoke-direct {v1}, Ljava/lang/IllegalStateException;-><init>()V
|
|
|
|
throw v1
|
|
|
|
.line 224
|
|
:goto_0
|
|
monitor-exit v0
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
throw v1
|
|
.end method
|
|
|
|
.method public exchangeMessageDone(Lokhttp3/internal/connection/Exchange;ZZLjava/io/IOException;)Ljava/io/IOException;
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/connection/Transmitter;->connectionPool:Lokhttp3/internal/connection/RealConnectionPool;
|
|
|
|
.line 238
|
|
monitor-enter v0
|
|
|
|
:try_start_0
|
|
iget-object v1, p0, Lokhttp3/internal/connection/Transmitter;->exchange:Lokhttp3/internal/connection/Exchange;
|
|
|
|
if-eq p1, v1, :cond_0
|
|
|
|
.line 240
|
|
monitor-exit v0
|
|
|
|
return-object p4
|
|
|
|
:catchall_0
|
|
move-exception p1
|
|
|
|
goto :goto_2
|
|
|
|
:cond_0
|
|
const/4 p1, 0x1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
if-eqz p2, :cond_1
|
|
|
|
iget-boolean p2, p0, Lokhttp3/internal/connection/Transmitter;->exchangeRequestDone:Z
|
|
|
|
xor-int/2addr p2, p1
|
|
|
|
iput-boolean p1, p0, Lokhttp3/internal/connection/Transmitter;->exchangeRequestDone:Z
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
move p2, v2
|
|
|
|
:goto_0
|
|
if-eqz p3, :cond_3
|
|
|
|
iget-boolean p3, p0, Lokhttp3/internal/connection/Transmitter;->exchangeResponseDone:Z
|
|
|
|
if-nez p3, :cond_2
|
|
|
|
move p2, p1
|
|
|
|
:cond_2
|
|
iput-boolean p1, p0, Lokhttp3/internal/connection/Transmitter;->exchangeResponseDone:Z
|
|
|
|
:cond_3
|
|
iget-boolean p3, p0, Lokhttp3/internal/connection/Transmitter;->exchangeRequestDone:Z
|
|
|
|
if-eqz p3, :cond_4
|
|
|
|
iget-boolean p3, p0, Lokhttp3/internal/connection/Transmitter;->exchangeResponseDone:Z
|
|
|
|
if-eqz p3, :cond_4
|
|
|
|
if-eqz p2, :cond_4
|
|
|
|
.line 253
|
|
invoke-virtual {v1}, Lokhttp3/internal/connection/Exchange;->connection()Lokhttp3/internal/connection/RealConnection;
|
|
|
|
move-result-object p2
|
|
|
|
iget p3, p2, Lokhttp3/internal/connection/RealConnection;->successCount:I
|
|
|
|
add-int/2addr p3, p1
|
|
|
|
iput p3, p2, Lokhttp3/internal/connection/RealConnection;->successCount:I
|
|
|
|
const/4 p2, 0x0
|
|
|
|
iput-object p2, p0, Lokhttp3/internal/connection/Transmitter;->exchange:Lokhttp3/internal/connection/Exchange;
|
|
|
|
goto :goto_1
|
|
|
|
:cond_4
|
|
move p1, v2
|
|
|
|
.line 256
|
|
:goto_1
|
|
monitor-exit v0
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
if-eqz p1, :cond_5
|
|
|
|
.line 258
|
|
invoke-virtual {p0, p4, v2}, Lokhttp3/internal/connection/Transmitter;->maybeReleaseConnection(Ljava/io/IOException;Z)Ljava/io/IOException;
|
|
|
|
move-result-object p4
|
|
|
|
:cond_5
|
|
return-object p4
|
|
|
|
.line 256
|
|
:goto_2
|
|
:try_start_1
|
|
monitor-exit v0
|
|
:try_end_1
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public hasExchange()Z
|
|
.locals 2
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/connection/Transmitter;->connectionPool:Lokhttp3/internal/connection/RealConnectionPool;
|
|
|
|
.line 317
|
|
monitor-enter v0
|
|
|
|
:try_start_0
|
|
iget-object v1, p0, Lokhttp3/internal/connection/Transmitter;->exchange:Lokhttp3/internal/connection/Exchange;
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
const/4 v1, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v1, 0x0
|
|
|
|
.line 318
|
|
:goto_0
|
|
monitor-exit v0
|
|
|
|
return v1
|
|
|
|
:catchall_0
|
|
move-exception v1
|
|
|
|
.line 319
|
|
monitor-exit v0
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
throw v1
|
|
.end method
|
|
|
|
.method public isCanceled()Z
|
|
.locals 2
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/connection/Transmitter;->connectionPool:Lokhttp3/internal/connection/RealConnectionPool;
|
|
|
|
.line 349
|
|
monitor-enter v0
|
|
|
|
:try_start_0
|
|
iget-boolean v1, p0, Lokhttp3/internal/connection/Transmitter;->canceled:Z
|
|
|
|
.line 350
|
|
monitor-exit v0
|
|
|
|
return v1
|
|
|
|
:catchall_0
|
|
move-exception v1
|
|
|
|
.line 351
|
|
monitor-exit v0
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
throw v1
|
|
.end method
|
|
|
|
.method public final maybeReleaseConnection(Ljava/io/IOException;Z)Ljava/io/IOException;
|
|
.locals 5
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/connection/Transmitter;->connectionPool:Lokhttp3/internal/connection/RealConnectionPool;
|
|
|
|
.line 283
|
|
monitor-enter v0
|
|
|
|
if-eqz p2, :cond_1
|
|
|
|
:try_start_0
|
|
iget-object v1, p0, Lokhttp3/internal/connection/Transmitter;->exchange:Lokhttp3/internal/connection/Exchange;
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
.line 285
|
|
:cond_0
|
|
new-instance p1, Ljava/lang/IllegalStateException;
|
|
|
|
const-string p2, "cannot release connection while it is in use"
|
|
|
|
invoke-direct {p1, p2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
|
|
:catchall_0
|
|
move-exception p1
|
|
|
|
goto :goto_4
|
|
|
|
:cond_1
|
|
:goto_0
|
|
iget-object v1, p0, Lokhttp3/internal/connection/Transmitter;->connection:Lokhttp3/internal/connection/RealConnection;
|
|
|
|
const/4 v2, 0x0
|
|
|
|
if-eqz v1, :cond_3
|
|
|
|
iget-object v3, p0, Lokhttp3/internal/connection/Transmitter;->exchange:Lokhttp3/internal/connection/Exchange;
|
|
|
|
if-nez v3, :cond_3
|
|
|
|
if-nez p2, :cond_2
|
|
|
|
iget-boolean p2, p0, Lokhttp3/internal/connection/Transmitter;->noMoreExchanges:Z
|
|
|
|
if-eqz p2, :cond_3
|
|
|
|
.line 289
|
|
:cond_2
|
|
invoke-virtual {p0}, Lokhttp3/internal/connection/Transmitter;->releaseConnectionNoEvents()Ljava/net/Socket;
|
|
|
|
move-result-object p2
|
|
|
|
goto :goto_1
|
|
|
|
:cond_3
|
|
move-object p2, v2
|
|
|
|
:goto_1
|
|
iget-object v3, p0, Lokhttp3/internal/connection/Transmitter;->connection:Lokhttp3/internal/connection/RealConnection;
|
|
|
|
if-eqz v3, :cond_4
|
|
|
|
move-object v1, v2
|
|
|
|
:cond_4
|
|
iget-boolean v2, p0, Lokhttp3/internal/connection/Transmitter;->noMoreExchanges:Z
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/4 v4, 0x1
|
|
|
|
if-eqz v2, :cond_5
|
|
|
|
iget-object v2, p0, Lokhttp3/internal/connection/Transmitter;->exchange:Lokhttp3/internal/connection/Exchange;
|
|
|
|
if-nez v2, :cond_5
|
|
|
|
move v2, v4
|
|
|
|
goto :goto_2
|
|
|
|
:cond_5
|
|
move v2, v3
|
|
|
|
.line 293
|
|
:goto_2
|
|
monitor-exit v0
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
.line 294
|
|
invoke-static {p2}, Lokhttp3/internal/Util;->closeQuietly(Ljava/net/Socket;)V
|
|
|
|
if-eqz v1, :cond_6
|
|
|
|
iget-object p2, p0, Lokhttp3/internal/connection/Transmitter;->eventListener:Lokhttp3/EventListener;
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/connection/Transmitter;->call:Lokhttp3/Call;
|
|
|
|
.line 297
|
|
invoke-virtual {p2, v0, v1}, Lokhttp3/EventListener;->connectionReleased(Lokhttp3/Call;Lokhttp3/Connection;)V
|
|
|
|
:cond_6
|
|
if-eqz v2, :cond_9
|
|
|
|
if-eqz p1, :cond_7
|
|
|
|
move v3, v4
|
|
|
|
.line 302
|
|
:cond_7
|
|
invoke-virtual {p0, p1}, Lokhttp3/internal/connection/Transmitter;->timeoutExit(Ljava/io/IOException;)Ljava/io/IOException;
|
|
|
|
move-result-object p1
|
|
|
|
if-eqz v3, :cond_8
|
|
|
|
iget-object p2, p0, Lokhttp3/internal/connection/Transmitter;->eventListener:Lokhttp3/EventListener;
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/connection/Transmitter;->call:Lokhttp3/Call;
|
|
|
|
.line 304
|
|
invoke-virtual {p2, v0, p1}, Lokhttp3/EventListener;->callFailed(Lokhttp3/Call;Ljava/io/IOException;)V
|
|
|
|
goto :goto_3
|
|
|
|
:cond_8
|
|
iget-object p2, p0, Lokhttp3/internal/connection/Transmitter;->eventListener:Lokhttp3/EventListener;
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/connection/Transmitter;->call:Lokhttp3/Call;
|
|
|
|
.line 306
|
|
invoke-virtual {p2, v0}, Lokhttp3/EventListener;->callEnd(Lokhttp3/Call;)V
|
|
|
|
:cond_9
|
|
:goto_3
|
|
return-object p1
|
|
|
|
.line 293
|
|
:goto_4
|
|
:try_start_1
|
|
monitor-exit v0
|
|
:try_end_1
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public newExchange(Lokhttp3/Interceptor$Chain;Z)Lokhttp3/internal/connection/Exchange;
|
|
.locals 8
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/connection/Transmitter;->connectionPool:Lokhttp3/internal/connection/RealConnectionPool;
|
|
|
|
.line 159
|
|
monitor-enter v0
|
|
|
|
:try_start_0
|
|
iget-boolean v1, p0, Lokhttp3/internal/connection/Transmitter;->noMoreExchanges:Z
|
|
|
|
if-nez v1, :cond_1
|
|
|
|
iget-object v1, p0, Lokhttp3/internal/connection/Transmitter;->exchange:Lokhttp3/internal/connection/Exchange;
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
.line 167
|
|
monitor-exit v0
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_1
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/connection/Transmitter;->exchangeFinder:Lokhttp3/internal/connection/ExchangeFinder;
|
|
|
|
iget-object v1, p0, Lokhttp3/internal/connection/Transmitter;->client:Lokhttp3/OkHttpClient;
|
|
|
|
.line 169
|
|
invoke-virtual {v0, v1, p1, p2}, Lokhttp3/internal/connection/ExchangeFinder;->find(Lokhttp3/OkHttpClient;Lokhttp3/Interceptor$Chain;Z)Lokhttp3/internal/http/ExchangeCodec;
|
|
|
|
move-result-object v7
|
|
|
|
.line 170
|
|
new-instance p1, Lokhttp3/internal/connection/Exchange;
|
|
|
|
iget-object v4, p0, Lokhttp3/internal/connection/Transmitter;->call:Lokhttp3/Call;
|
|
|
|
iget-object v5, p0, Lokhttp3/internal/connection/Transmitter;->eventListener:Lokhttp3/EventListener;
|
|
|
|
iget-object v6, p0, Lokhttp3/internal/connection/Transmitter;->exchangeFinder:Lokhttp3/internal/connection/ExchangeFinder;
|
|
|
|
move-object v2, p1
|
|
|
|
move-object v3, p0
|
|
|
|
invoke-direct/range {v2 .. v7}, Lokhttp3/internal/connection/Exchange;-><init>(Lokhttp3/internal/connection/Transmitter;Lokhttp3/Call;Lokhttp3/EventListener;Lokhttp3/internal/connection/ExchangeFinder;Lokhttp3/internal/http/ExchangeCodec;)V
|
|
|
|
iget-object p2, p0, Lokhttp3/internal/connection/Transmitter;->connectionPool:Lokhttp3/internal/connection/RealConnectionPool;
|
|
|
|
.line 172
|
|
monitor-enter p2
|
|
|
|
:try_start_1
|
|
iput-object p1, p0, Lokhttp3/internal/connection/Transmitter;->exchange:Lokhttp3/internal/connection/Exchange;
|
|
|
|
const/4 v0, 0x0
|
|
|
|
iput-boolean v0, p0, Lokhttp3/internal/connection/Transmitter;->exchangeRequestDone:Z
|
|
|
|
iput-boolean v0, p0, Lokhttp3/internal/connection/Transmitter;->exchangeResponseDone:Z
|
|
|
|
.line 176
|
|
monitor-exit p2
|
|
|
|
return-object p1
|
|
|
|
:catchall_0
|
|
move-exception p1
|
|
|
|
.line 177
|
|
monitor-exit p2
|
|
:try_end_1
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
throw p1
|
|
|
|
:catchall_1
|
|
move-exception p1
|
|
|
|
goto :goto_0
|
|
|
|
.line 164
|
|
:cond_0
|
|
:try_start_2
|
|
new-instance p1, Ljava/lang/IllegalStateException;
|
|
|
|
const-string p2, "cannot make a new request because the previous response is still open: please call response.close()"
|
|
|
|
invoke-direct {p1, p2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
|
|
.line 161
|
|
:cond_1
|
|
new-instance p1, Ljava/lang/IllegalStateException;
|
|
|
|
const-string p2, "released"
|
|
|
|
invoke-direct {p1, p2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
|
|
.line 167
|
|
:goto_0
|
|
monitor-exit v0
|
|
:try_end_2
|
|
.catchall {:try_start_2 .. :try_end_2} :catchall_1
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public noMoreExchanges(Ljava/io/IOException;)Ljava/io/IOException;
|
|
.locals 2
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/connection/Transmitter;->connectionPool:Lokhttp3/internal/connection/RealConnectionPool;
|
|
|
|
.line 264
|
|
monitor-enter v0
|
|
|
|
const/4 v1, 0x1
|
|
|
|
:try_start_0
|
|
iput-boolean v1, p0, Lokhttp3/internal/connection/Transmitter;->noMoreExchanges:Z
|
|
|
|
.line 266
|
|
monitor-exit v0
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 267
|
|
invoke-virtual {p0, p1, v0}, Lokhttp3/internal/connection/Transmitter;->maybeReleaseConnection(Ljava/io/IOException;Z)Ljava/io/IOException;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
|
|
:catchall_0
|
|
move-exception p1
|
|
|
|
.line 266
|
|
:try_start_1
|
|
monitor-exit v0
|
|
:try_end_1
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public prepareToConnect(Lokhttp3/Request;)V
|
|
.locals 7
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/connection/Transmitter;->request:Lokhttp3/Request;
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
.line 126
|
|
invoke-virtual {v0}, Lokhttp3/Request;->url()Lokhttp3/HttpUrl;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p1}, Lokhttp3/Request;->url()Lokhttp3/HttpUrl;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-static {v0, v1}, Lokhttp3/internal/Util;->sameConnection(Lokhttp3/HttpUrl;Lokhttp3/HttpUrl;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/connection/Transmitter;->exchangeFinder:Lokhttp3/internal/connection/ExchangeFinder;
|
|
|
|
invoke-virtual {v0}, Lokhttp3/internal/connection/ExchangeFinder;->hasRouteToTry()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
iget-object v0, p0, Lokhttp3/internal/connection/Transmitter;->exchange:Lokhttp3/internal/connection/Exchange;
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/connection/Transmitter;->exchangeFinder:Lokhttp3/internal/connection/ExchangeFinder;
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
const/4 v0, 0x1
|
|
|
|
const/4 v1, 0x0
|
|
|
|
.line 132
|
|
invoke-virtual {p0, v1, v0}, Lokhttp3/internal/connection/Transmitter;->maybeReleaseConnection(Ljava/io/IOException;Z)Ljava/io/IOException;
|
|
|
|
iput-object v1, p0, Lokhttp3/internal/connection/Transmitter;->exchangeFinder:Lokhttp3/internal/connection/ExchangeFinder;
|
|
|
|
goto :goto_0
|
|
|
|
.line 129
|
|
:cond_1
|
|
new-instance p1, Ljava/lang/IllegalStateException;
|
|
|
|
invoke-direct {p1}, Ljava/lang/IllegalStateException;-><init>()V
|
|
|
|
throw p1
|
|
|
|
:cond_2
|
|
:goto_0
|
|
iput-object p1, p0, Lokhttp3/internal/connection/Transmitter;->request:Lokhttp3/Request;
|
|
|
|
.line 138
|
|
new-instance v6, Lokhttp3/internal/connection/ExchangeFinder;
|
|
|
|
iget-object v2, p0, Lokhttp3/internal/connection/Transmitter;->connectionPool:Lokhttp3/internal/connection/RealConnectionPool;
|
|
|
|
invoke-virtual {p1}, Lokhttp3/Request;->url()Lokhttp3/HttpUrl;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p0, p1}, Lokhttp3/internal/connection/Transmitter;->createAddress(Lokhttp3/HttpUrl;)Lokhttp3/Address;
|
|
|
|
move-result-object v3
|
|
|
|
iget-object v4, p0, Lokhttp3/internal/connection/Transmitter;->call:Lokhttp3/Call;
|
|
|
|
iget-object v5, p0, Lokhttp3/internal/connection/Transmitter;->eventListener:Lokhttp3/EventListener;
|
|
|
|
move-object v0, v6
|
|
|
|
move-object v1, p0
|
|
|
|
invoke-direct/range {v0 .. v5}, Lokhttp3/internal/connection/ExchangeFinder;-><init>(Lokhttp3/internal/connection/Transmitter;Lokhttp3/internal/connection/RealConnectionPool;Lokhttp3/Address;Lokhttp3/Call;Lokhttp3/EventListener;)V
|
|
|
|
iput-object v6, p0, Lokhttp3/internal/connection/Transmitter;->exchangeFinder:Lokhttp3/internal/connection/ExchangeFinder;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public releaseConnectionNoEvents()Ljava/net/Socket;
|
|
.locals 4
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/connection/Transmitter;->connection:Lokhttp3/internal/connection/RealConnection;
|
|
|
|
.line 196
|
|
iget-object v0, v0, Lokhttp3/internal/connection/RealConnection;->transmitters:Ljava/util/List;
|
|
|
|
invoke-interface {v0}, Ljava/util/List;->size()I
|
|
|
|
move-result v0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
:goto_0
|
|
const/4 v2, -0x1
|
|
|
|
if-ge v1, v0, :cond_1
|
|
|
|
iget-object v3, p0, Lokhttp3/internal/connection/Transmitter;->connection:Lokhttp3/internal/connection/RealConnection;
|
|
|
|
.line 197
|
|
iget-object v3, v3, Lokhttp3/internal/connection/RealConnection;->transmitters:Ljava/util/List;
|
|
|
|
invoke-interface {v3, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;
|
|
|
|
move-result-object v3
|
|
|
|
check-cast v3, Ljava/lang/ref/Reference;
|
|
|
|
.line 198
|
|
invoke-virtual {v3}, Ljava/lang/ref/Reference;->get()Ljava/lang/Object;
|
|
|
|
move-result-object v3
|
|
|
|
if-ne v3, p0, :cond_0
|
|
|
|
goto :goto_1
|
|
|
|
:cond_0
|
|
add-int/lit8 v1, v1, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
move v1, v2
|
|
|
|
:goto_1
|
|
if-eq v1, v2, :cond_3
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/connection/Transmitter;->connection:Lokhttp3/internal/connection/RealConnection;
|
|
|
|
.line 207
|
|
iget-object v2, v0, Lokhttp3/internal/connection/RealConnection;->transmitters:Ljava/util/List;
|
|
|
|
invoke-interface {v2, v1}, Ljava/util/List;->remove(I)Ljava/lang/Object;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
iput-object v1, p0, Lokhttp3/internal/connection/Transmitter;->connection:Lokhttp3/internal/connection/RealConnection;
|
|
|
|
.line 210
|
|
iget-object v2, v0, Lokhttp3/internal/connection/RealConnection;->transmitters:Ljava/util/List;
|
|
|
|
invoke-interface {v2}, Ljava/util/List;->isEmpty()Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_2
|
|
|
|
.line 211
|
|
invoke-static {}, Ljava/lang/System;->nanoTime()J
|
|
|
|
move-result-wide v2
|
|
|
|
iput-wide v2, v0, Lokhttp3/internal/connection/RealConnection;->idleAtNanos:J
|
|
|
|
iget-object v2, p0, Lokhttp3/internal/connection/Transmitter;->connectionPool:Lokhttp3/internal/connection/RealConnectionPool;
|
|
|
|
.line 212
|
|
invoke-virtual {v2, v0}, Lokhttp3/internal/connection/RealConnectionPool;->connectionBecameIdle(Lokhttp3/internal/connection/RealConnection;)Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_2
|
|
|
|
.line 213
|
|
invoke-virtual {v0}, Lokhttp3/internal/connection/RealConnection;->socket()Ljava/net/Socket;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
|
|
:cond_2
|
|
return-object v1
|
|
|
|
.line 204
|
|
:cond_3
|
|
new-instance v0, Ljava/lang/IllegalStateException;
|
|
|
|
invoke-direct {v0}, Ljava/lang/IllegalStateException;-><init>()V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public timeoutEarlyExit()V
|
|
.locals 1
|
|
|
|
iget-boolean v0, p0, Lokhttp3/internal/connection/Transmitter;->timeoutEarlyExit:Z
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
const/4 v0, 0x1
|
|
|
|
iput-boolean v0, p0, Lokhttp3/internal/connection/Transmitter;->timeoutEarlyExit:Z
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/connection/Transmitter;->timeout:Lokio/AsyncTimeout;
|
|
|
|
.line 102
|
|
invoke-virtual {v0}, Lokio/AsyncTimeout;->exit()Z
|
|
|
|
return-void
|
|
|
|
.line 100
|
|
:cond_0
|
|
new-instance v0, Ljava/lang/IllegalStateException;
|
|
|
|
invoke-direct {v0}, Ljava/lang/IllegalStateException;-><init>()V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public timeoutEnter()V
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/connection/Transmitter;->timeout:Lokio/AsyncTimeout;
|
|
|
|
.line 92
|
|
invoke-virtual {v0}, Lokio/AsyncTimeout;->enter()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final timeoutExit(Ljava/io/IOException;)Ljava/io/IOException;
|
|
.locals 2
|
|
|
|
iget-boolean v0, p0, Lokhttp3/internal/connection/Transmitter;->timeoutEarlyExit:Z
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
return-object p1
|
|
|
|
:cond_0
|
|
iget-object v0, p0, Lokhttp3/internal/connection/Transmitter;->timeout:Lokio/AsyncTimeout;
|
|
|
|
.line 107
|
|
invoke-virtual {v0}, Lokio/AsyncTimeout;->exit()Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
return-object p1
|
|
|
|
.line 109
|
|
:cond_1
|
|
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_2
|
|
|
|
.line 110
|
|
invoke-virtual {v0, p1}, Ljava/lang/Throwable;->initCause(Ljava/lang/Throwable;)Ljava/lang/Throwable;
|
|
|
|
:cond_2
|
|
return-object v0
|
|
.end method
|