2455 lines
55 KiB
Smali
2455 lines
55 KiB
Smali
.class public final Lo0/g0/d/i;
|
|
.super Lo0/g0/g/e$c;
|
|
.source "RealConnection.kt"
|
|
|
|
# interfaces
|
|
.implements Lo0/k;
|
|
|
|
|
|
# instance fields
|
|
.field public b:Ljava/net/Socket;
|
|
|
|
.field public c:Ljava/net/Socket;
|
|
|
|
.field public d:Lo0/v;
|
|
|
|
.field public e:Lo0/y;
|
|
|
|
.field public f:Lo0/g0/g/e;
|
|
|
|
.field public g:Lp0/g;
|
|
|
|
.field public h:Lokio/BufferedSink;
|
|
|
|
.field public i:Z
|
|
|
|
.field public j:I
|
|
|
|
.field public k:I
|
|
|
|
.field public l:I
|
|
|
|
.field public m:I
|
|
|
|
.field public final n:Ljava/util/List;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/List<",
|
|
"Ljava/lang/ref/Reference<",
|
|
"Lo0/g0/d/m;",
|
|
">;>;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public o:J
|
|
|
|
.field public final p:Lo0/g0/d/j;
|
|
|
|
.field public final q:Lo0/e0;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Lo0/g0/d/j;Lo0/e0;)V
|
|
.locals 1
|
|
|
|
const-string v0, "connectionPool"
|
|
|
|
invoke-static {p1, v0}, Lk0/o/c/i;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v0, "route"
|
|
|
|
invoke-static {p2, v0}, Lk0/o/c/i;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-direct {p0}, Lo0/g0/g/e$c;-><init>()V
|
|
|
|
iput-object p1, p0, Lo0/g0/d/i;->p:Lo0/g0/d/j;
|
|
|
|
iput-object p2, p0, Lo0/g0/d/i;->q:Lo0/e0;
|
|
|
|
const/4 p1, 0x1
|
|
|
|
iput p1, p0, Lo0/g0/d/i;->m:I
|
|
|
|
new-instance p1, Ljava/util/ArrayList;
|
|
|
|
invoke-direct {p1}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
iput-object p1, p0, Lo0/g0/d/i;->n:Ljava/util/List;
|
|
|
|
const-wide p1, 0x7fffffffffffffffL
|
|
|
|
iput-wide p1, p0, Lo0/g0/d/i;->o:J
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public a()Lo0/y;
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lo0/g0/d/i;->e:Lo0/y;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
return-object v0
|
|
|
|
:cond_0
|
|
invoke-static {}, Lk0/o/c/i;->throwNpe()V
|
|
|
|
const/4 v0, 0x0
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public b(Lo0/g0/g/e;)V
|
|
.locals 1
|
|
|
|
const-string v0, "connection"
|
|
|
|
invoke-static {p1, v0}, Lk0/o/c/i;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
iget-object v0, p0, Lo0/g0/d/i;->p:Lo0/g0/d/j;
|
|
|
|
monitor-enter v0
|
|
|
|
:try_start_0
|
|
invoke-virtual {p1}, Lo0/g0/g/e;->c()I
|
|
|
|
move-result p1
|
|
|
|
iput p1, p0, Lo0/g0/d/i;->m:I
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
monitor-exit v0
|
|
|
|
return-void
|
|
|
|
:catchall_0
|
|
move-exception p1
|
|
|
|
monitor-exit v0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public c(Lo0/g0/g/l;)V
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
const-string v0, "stream"
|
|
|
|
invoke-static {p1, v0}, Lk0/o/c/i;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
sget-object v0, Lo0/g0/g/a;->h:Lo0/g0/g/a;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-virtual {p1, v0, v1}, Lo0/g0/g/l;->c(Lo0/g0/g/a;Ljava/io/IOException;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final d(IIIIZLo0/f;Lo0/t;)V
|
|
.locals 14
|
|
|
|
move-object v7, p0
|
|
|
|
move-object/from16 v8, p6
|
|
|
|
move-object/from16 v9, p7
|
|
|
|
const-string v0, "call"
|
|
|
|
invoke-static {v8, v0}, Lk0/o/c/i;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v0, "eventListener"
|
|
|
|
invoke-static {v9, v0}, Lk0/o/c/i;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
iget-object v0, v7, Lo0/g0/d/i;->e:Lo0/y;
|
|
|
|
const/4 v10, 0x1
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
const/4 v0, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
:goto_0
|
|
if-eqz v0, :cond_14
|
|
|
|
iget-object v0, v7, Lo0/g0/d/i;->q:Lo0/e0;
|
|
|
|
iget-object v0, v0, Lo0/e0;->a:Lo0/a;
|
|
|
|
iget-object v0, v0, Lo0/a;->c:Ljava/util/List;
|
|
|
|
new-instance v11, Lo0/g0/d/b;
|
|
|
|
invoke-direct {v11, v0}, Lo0/g0/d/b;-><init>(Ljava/util/List;)V
|
|
|
|
iget-object v1, v7, Lo0/g0/d/i;->q:Lo0/e0;
|
|
|
|
iget-object v1, v1, Lo0/e0;->a:Lo0/a;
|
|
|
|
iget-object v2, v1, Lo0/a;->f:Ljavax/net/ssl/SSLSocketFactory;
|
|
|
|
if-nez v2, :cond_3
|
|
|
|
sget-object v1, Lo0/m;->h:Lo0/m;
|
|
|
|
invoke-interface {v0, v1}, Ljava/util/List;->contains(Ljava/lang/Object;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
iget-object v0, v7, Lo0/g0/d/i;->q:Lo0/e0;
|
|
|
|
iget-object v0, v0, Lo0/e0;->a:Lo0/a;
|
|
|
|
iget-object v0, v0, Lo0/a;->a:Lo0/w;
|
|
|
|
iget-object v0, v0, Lo0/w;->e:Ljava/lang/String;
|
|
|
|
sget-object v1, Lo0/g0/h/f;->c:Lo0/g0/h/f$a;
|
|
|
|
sget-object v1, Lo0/g0/h/f;->a:Lo0/g0/h/f;
|
|
|
|
invoke-virtual {v1, v0}, Lo0/g0/h/f;->j(Ljava/lang/String;)Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
new-instance v1, Lokhttp3/internal/connection/RouteException;
|
|
|
|
new-instance v2, Ljava/net/UnknownServiceException;
|
|
|
|
const-string v3, "CLEARTEXT communication to "
|
|
|
|
const-string v4, " not permitted by network security policy"
|
|
|
|
invoke-static {v3, v0, v4}, Lf/e/b/a/a;->q(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-direct {v2, v0}, Ljava/net/UnknownServiceException;-><init>(Ljava/lang/String;)V
|
|
|
|
invoke-direct {v1, v2}, Lokhttp3/internal/connection/RouteException;-><init>(Ljava/io/IOException;)V
|
|
|
|
throw v1
|
|
|
|
:cond_2
|
|
new-instance v0, Lokhttp3/internal/connection/RouteException;
|
|
|
|
new-instance v1, Ljava/net/UnknownServiceException;
|
|
|
|
const-string v2, "CLEARTEXT communication not enabled for client"
|
|
|
|
invoke-direct {v1, v2}, Ljava/net/UnknownServiceException;-><init>(Ljava/lang/String;)V
|
|
|
|
invoke-direct {v0, v1}, Lokhttp3/internal/connection/RouteException;-><init>(Ljava/io/IOException;)V
|
|
|
|
throw v0
|
|
|
|
:cond_3
|
|
iget-object v0, v1, Lo0/a;->b:Ljava/util/List;
|
|
|
|
sget-object v1, Lo0/y;->h:Lo0/y;
|
|
|
|
invoke-interface {v0, v1}, Ljava/util/List;->contains(Ljava/lang/Object;)Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_13
|
|
|
|
:goto_1
|
|
const/4 v12, 0x0
|
|
|
|
move-object v13, v12
|
|
|
|
:goto_2
|
|
:try_start_0
|
|
iget-object v0, v7, Lo0/g0/d/i;->q:Lo0/e0;
|
|
|
|
invoke-virtual {v0}, Lo0/e0;->a()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_5
|
|
|
|
move-object v1, p0
|
|
|
|
move v2, p1
|
|
|
|
move/from16 v3, p2
|
|
|
|
move/from16 v4, p3
|
|
|
|
move-object/from16 v5, p6
|
|
|
|
move-object/from16 v6, p7
|
|
|
|
invoke-virtual/range {v1 .. v6}, Lo0/g0/d/i;->f(IIILo0/f;Lo0/t;)V
|
|
|
|
iget-object v0, v7, Lo0/g0/d/i;->b:Ljava/net/Socket;
|
|
:try_end_0
|
|
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_2
|
|
|
|
if-nez v0, :cond_4
|
|
|
|
goto :goto_4
|
|
|
|
:cond_4
|
|
move v1, p1
|
|
|
|
move/from16 v2, p2
|
|
|
|
goto :goto_3
|
|
|
|
:cond_5
|
|
move v1, p1
|
|
|
|
move/from16 v2, p2
|
|
|
|
:try_start_1
|
|
invoke-virtual {p0, p1, v2, v8, v9}, Lo0/g0/d/i;->e(IILo0/f;Lo0/t;)V
|
|
:try_end_1
|
|
.catch Ljava/io/IOException; {:try_start_1 .. :try_end_1} :catch_1
|
|
|
|
:goto_3
|
|
move/from16 v3, p4
|
|
|
|
:try_start_2
|
|
invoke-virtual {p0, v11, v3, v8, v9}, Lo0/g0/d/i;->g(Lo0/g0/d/b;ILo0/f;Lo0/t;)V
|
|
|
|
iget-object v0, v7, Lo0/g0/d/i;->q:Lo0/e0;
|
|
|
|
iget-object v0, v0, Lo0/e0;->c:Ljava/net/InetSocketAddress;
|
|
|
|
iget-object v4, v7, Lo0/g0/d/i;->q:Lo0/e0;
|
|
|
|
iget-object v4, v4, Lo0/e0;->b:Ljava/net/Proxy;
|
|
|
|
const-string v5, "call"
|
|
|
|
invoke-static {v8, v5}, Lk0/o/c/i;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v5, "inetSocketAddress"
|
|
|
|
invoke-static {v0, v5}, Lk0/o/c/i;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v0, "proxy"
|
|
|
|
invoke-static {v4, v0}, Lk0/o/c/i;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
:try_end_2
|
|
.catch Ljava/io/IOException; {:try_start_2 .. :try_end_2} :catch_0
|
|
|
|
:goto_4
|
|
iget-object v0, v7, Lo0/g0/d/i;->q:Lo0/e0;
|
|
|
|
invoke-virtual {v0}, Lo0/e0;->a()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_7
|
|
|
|
iget-object v0, v7, Lo0/g0/d/i;->b:Ljava/net/Socket;
|
|
|
|
if-eqz v0, :cond_6
|
|
|
|
goto :goto_5
|
|
|
|
:cond_6
|
|
new-instance v0, Lokhttp3/internal/connection/RouteException;
|
|
|
|
new-instance v1, Ljava/net/ProtocolException;
|
|
|
|
const-string v2, "Too many tunnel connections attempted: 21"
|
|
|
|
invoke-direct {v1, v2}, Ljava/net/ProtocolException;-><init>(Ljava/lang/String;)V
|
|
|
|
invoke-direct {v0, v1}, Lokhttp3/internal/connection/RouteException;-><init>(Ljava/io/IOException;)V
|
|
|
|
throw v0
|
|
|
|
:cond_7
|
|
:goto_5
|
|
iget-object v0, v7, Lo0/g0/d/i;->f:Lo0/g0/g/e;
|
|
|
|
if-eqz v0, :cond_8
|
|
|
|
iget-object v1, v7, Lo0/g0/d/i;->p:Lo0/g0/d/j;
|
|
|
|
monitor-enter v1
|
|
|
|
:try_start_3
|
|
invoke-virtual {v0}, Lo0/g0/g/e;->c()I
|
|
|
|
move-result v0
|
|
|
|
iput v0, v7, Lo0/g0/d/i;->m:I
|
|
:try_end_3
|
|
.catchall {:try_start_3 .. :try_end_3} :catchall_0
|
|
|
|
monitor-exit v1
|
|
|
|
goto :goto_6
|
|
|
|
:catchall_0
|
|
move-exception v0
|
|
|
|
monitor-exit v1
|
|
|
|
throw v0
|
|
|
|
:cond_8
|
|
:goto_6
|
|
return-void
|
|
|
|
:catch_0
|
|
move-exception v0
|
|
|
|
goto :goto_8
|
|
|
|
:catch_1
|
|
move-exception v0
|
|
|
|
:goto_7
|
|
move/from16 v3, p4
|
|
|
|
goto :goto_8
|
|
|
|
:catch_2
|
|
move-exception v0
|
|
|
|
move v1, p1
|
|
|
|
move/from16 v2, p2
|
|
|
|
goto :goto_7
|
|
|
|
:goto_8
|
|
iget-object v4, v7, Lo0/g0/d/i;->c:Ljava/net/Socket;
|
|
|
|
if-eqz v4, :cond_9
|
|
|
|
invoke-static {v4}, Lo0/g0/b;->g(Ljava/net/Socket;)V
|
|
|
|
:cond_9
|
|
iget-object v4, v7, Lo0/g0/d/i;->b:Ljava/net/Socket;
|
|
|
|
if-eqz v4, :cond_a
|
|
|
|
invoke-static {v4}, Lo0/g0/b;->g(Ljava/net/Socket;)V
|
|
|
|
:cond_a
|
|
iput-object v12, v7, Lo0/g0/d/i;->c:Ljava/net/Socket;
|
|
|
|
iput-object v12, v7, Lo0/g0/d/i;->b:Ljava/net/Socket;
|
|
|
|
iput-object v12, v7, Lo0/g0/d/i;->g:Lp0/g;
|
|
|
|
iput-object v12, v7, Lo0/g0/d/i;->h:Lokio/BufferedSink;
|
|
|
|
iput-object v12, v7, Lo0/g0/d/i;->d:Lo0/v;
|
|
|
|
iput-object v12, v7, Lo0/g0/d/i;->e:Lo0/y;
|
|
|
|
iput-object v12, v7, Lo0/g0/d/i;->f:Lo0/g0/g/e;
|
|
|
|
iget-object v4, v7, Lo0/g0/d/i;->q:Lo0/e0;
|
|
|
|
iget-object v5, v4, Lo0/e0;->c:Ljava/net/InetSocketAddress;
|
|
|
|
iget-object v4, v4, Lo0/e0;->b:Ljava/net/Proxy;
|
|
|
|
const-string v6, "call"
|
|
|
|
invoke-static {v8, v6}, Lk0/o/c/i;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v6, "inetSocketAddress"
|
|
|
|
invoke-static {v5, v6}, Lk0/o/c/i;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v5, "proxy"
|
|
|
|
invoke-static {v4, v5}, Lk0/o/c/i;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v4, "ioe"
|
|
|
|
invoke-static {v0, v4}, Lk0/o/c/i;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
if-nez v13, :cond_b
|
|
|
|
new-instance v13, Lokhttp3/internal/connection/RouteException;
|
|
|
|
invoke-direct {v13, v0}, Lokhttp3/internal/connection/RouteException;-><init>(Ljava/io/IOException;)V
|
|
|
|
goto :goto_9
|
|
|
|
:cond_b
|
|
const-string v4, "e"
|
|
|
|
invoke-static {v0, v4}, Lk0/o/c/i;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
iget-object v4, v13, Lokhttp3/internal/connection/RouteException;->firstConnectException:Ljava/io/IOException;
|
|
|
|
invoke-virtual {v4, v0}, Ljava/io/IOException;->addSuppressed(Ljava/lang/Throwable;)V
|
|
|
|
iput-object v0, v13, Lokhttp3/internal/connection/RouteException;->lastConnectException:Ljava/io/IOException;
|
|
|
|
:goto_9
|
|
if-eqz p5, :cond_12
|
|
|
|
const-string v4, "e"
|
|
|
|
invoke-static {v0, v4}, Lk0/o/c/i;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
iput-boolean v10, v11, Lo0/g0/d/b;->c:Z
|
|
|
|
iget-boolean v4, v11, Lo0/g0/d/b;->b:Z
|
|
|
|
if-nez v4, :cond_c
|
|
|
|
goto :goto_a
|
|
|
|
:cond_c
|
|
instance-of v4, v0, Ljava/net/ProtocolException;
|
|
|
|
if-eqz v4, :cond_d
|
|
|
|
goto :goto_a
|
|
|
|
:cond_d
|
|
instance-of v4, v0, Ljava/io/InterruptedIOException;
|
|
|
|
if-eqz v4, :cond_e
|
|
|
|
goto :goto_a
|
|
|
|
:cond_e
|
|
instance-of v4, v0, Ljavax/net/ssl/SSLHandshakeException;
|
|
|
|
if-eqz v4, :cond_f
|
|
|
|
invoke-virtual {v0}, Ljava/io/IOException;->getCause()Ljava/lang/Throwable;
|
|
|
|
move-result-object v4
|
|
|
|
instance-of v4, v4, Ljava/security/cert/CertificateException;
|
|
|
|
if-eqz v4, :cond_f
|
|
|
|
goto :goto_a
|
|
|
|
:cond_f
|
|
instance-of v4, v0, Ljavax/net/ssl/SSLPeerUnverifiedException;
|
|
|
|
if-eqz v4, :cond_10
|
|
|
|
goto :goto_a
|
|
|
|
:cond_10
|
|
instance-of v0, v0, Ljavax/net/ssl/SSLException;
|
|
|
|
if-eqz v0, :cond_11
|
|
|
|
const/4 v0, 0x1
|
|
|
|
goto :goto_b
|
|
|
|
:cond_11
|
|
:goto_a
|
|
const/4 v0, 0x0
|
|
|
|
:goto_b
|
|
if-eqz v0, :cond_12
|
|
|
|
goto/16 :goto_2
|
|
|
|
:cond_12
|
|
throw v13
|
|
|
|
:cond_13
|
|
new-instance v0, Lokhttp3/internal/connection/RouteException;
|
|
|
|
new-instance v1, Ljava/net/UnknownServiceException;
|
|
|
|
const-string v2, "H2_PRIOR_KNOWLEDGE cannot be used with HTTPS"
|
|
|
|
invoke-direct {v1, v2}, Ljava/net/UnknownServiceException;-><init>(Ljava/lang/String;)V
|
|
|
|
invoke-direct {v0, v1}, Lokhttp3/internal/connection/RouteException;-><init>(Ljava/io/IOException;)V
|
|
|
|
throw v0
|
|
|
|
:cond_14
|
|
const-string v0, "already connected"
|
|
|
|
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 e(IILo0/f;Lo0/t;)V
|
|
.locals 6
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
const-string v0, "$receiver"
|
|
|
|
iget-object v1, p0, Lo0/g0/d/i;->q:Lo0/e0;
|
|
|
|
iget-object v2, v1, Lo0/e0;->b:Ljava/net/Proxy;
|
|
|
|
iget-object v1, v1, Lo0/e0;->a:Lo0/a;
|
|
|
|
invoke-virtual {v2}, Ljava/net/Proxy;->type()Ljava/net/Proxy$Type;
|
|
|
|
move-result-object v3
|
|
|
|
const/4 v4, 0x0
|
|
|
|
if-nez v3, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
sget-object v5, Lo0/g0/d/e;->a:[I
|
|
|
|
invoke-virtual {v3}, Ljava/net/Proxy$Type;->ordinal()I
|
|
|
|
move-result v3
|
|
|
|
aget v3, v5, v3
|
|
|
|
const/4 v5, 0x1
|
|
|
|
if-eq v3, v5, :cond_1
|
|
|
|
const/4 v5, 0x2
|
|
|
|
if-eq v3, v5, :cond_1
|
|
|
|
:goto_0
|
|
new-instance v1, Ljava/net/Socket;
|
|
|
|
invoke-direct {v1, v2}, Ljava/net/Socket;-><init>(Ljava/net/Proxy;)V
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
iget-object v1, v1, Lo0/a;->e:Ljavax/net/SocketFactory;
|
|
|
|
invoke-virtual {v1}, Ljavax/net/SocketFactory;->createSocket()Ljava/net/Socket;
|
|
|
|
move-result-object v1
|
|
|
|
if-eqz v1, :cond_4
|
|
|
|
:goto_1
|
|
iput-object v1, p0, Lo0/g0/d/i;->b:Ljava/net/Socket;
|
|
|
|
iget-object v3, p0, Lo0/g0/d/i;->q:Lo0/e0;
|
|
|
|
iget-object v3, v3, Lo0/e0;->c:Ljava/net/InetSocketAddress;
|
|
|
|
if-eqz p4, :cond_3
|
|
|
|
const-string p4, "call"
|
|
|
|
invoke-static {p3, p4}, Lk0/o/c/i;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string p3, "inetSocketAddress"
|
|
|
|
invoke-static {v3, p3}, Lk0/o/c/i;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string p3, "proxy"
|
|
|
|
invoke-static {v2, p3}, Lk0/o/c/i;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v1, p2}, Ljava/net/Socket;->setSoTimeout(I)V
|
|
|
|
:try_start_0
|
|
sget-object p2, Lo0/g0/h/f;->c:Lo0/g0/h/f$a;
|
|
|
|
sget-object p2, Lo0/g0/h/f;->a:Lo0/g0/h/f;
|
|
|
|
iget-object p3, p0, Lo0/g0/d/i;->q:Lo0/e0;
|
|
|
|
iget-object p3, p3, Lo0/e0;->c:Ljava/net/InetSocketAddress;
|
|
|
|
invoke-virtual {p2, v1, p3, p1}, Lo0/g0/h/f;->g(Ljava/net/Socket;Ljava/net/InetSocketAddress;I)V
|
|
:try_end_0
|
|
.catch Ljava/net/ConnectException; {:try_start_0 .. :try_end_0} :catch_1
|
|
|
|
:try_start_1
|
|
invoke-static {v1}, Lf/n/a/k/a;->U(Ljava/net/Socket;)Lp0/w;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-static {p1, v0}, Lk0/o/c/i;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
new-instance p2, Lp0/q;
|
|
|
|
invoke-direct {p2, p1}, Lp0/q;-><init>(Lp0/w;)V
|
|
|
|
iput-object p2, p0, Lo0/g0/d/i;->g:Lp0/g;
|
|
|
|
invoke-static {v1}, Lf/n/a/k/a;->T(Ljava/net/Socket;)Lp0/u;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-static {p1, v0}, Lk0/o/c/i;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
new-instance p2, Lp0/p;
|
|
|
|
invoke-direct {p2, p1}, Lp0/p;-><init>(Lp0/u;)V
|
|
|
|
iput-object p2, p0, Lo0/g0/d/i;->h:Lokio/BufferedSink;
|
|
:try_end_1
|
|
.catch Ljava/lang/NullPointerException; {:try_start_1 .. :try_end_1} :catch_0
|
|
|
|
goto :goto_2
|
|
|
|
:catch_0
|
|
move-exception p1
|
|
|
|
invoke-virtual {p1}, Ljava/lang/NullPointerException;->getMessage()Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
const-string p3, "throw with null exception"
|
|
|
|
invoke-static {p2, p3}, Lk0/o/c/i;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
move-result p2
|
|
|
|
if-nez p2, :cond_2
|
|
|
|
:goto_2
|
|
return-void
|
|
|
|
:cond_2
|
|
new-instance p2, Ljava/io/IOException;
|
|
|
|
invoke-direct {p2, p1}, Ljava/io/IOException;-><init>(Ljava/lang/Throwable;)V
|
|
|
|
throw p2
|
|
|
|
:catch_1
|
|
move-exception p1
|
|
|
|
new-instance p2, Ljava/net/ConnectException;
|
|
|
|
const-string p3, "Failed to connect to "
|
|
|
|
invoke-static {p3}, Lf/e/b/a/a;->D(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object p3
|
|
|
|
iget-object p4, p0, Lo0/g0/d/i;->q:Lo0/e0;
|
|
|
|
iget-object p4, p4, Lo0/e0;->c:Ljava/net/InetSocketAddress;
|
|
|
|
invoke-virtual {p3, p4}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p3
|
|
|
|
invoke-direct {p2, p3}, Ljava/net/ConnectException;-><init>(Ljava/lang/String;)V
|
|
|
|
invoke-virtual {p2, p1}, Ljava/net/ConnectException;->initCause(Ljava/lang/Throwable;)Ljava/lang/Throwable;
|
|
|
|
throw p2
|
|
|
|
:cond_3
|
|
throw v4
|
|
|
|
:cond_4
|
|
invoke-static {}, Lk0/o/c/i;->throwNpe()V
|
|
|
|
throw v4
|
|
.end method
|
|
|
|
.method public final f(IIILo0/f;Lo0/t;)V
|
|
.locals 18
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
move-object/from16 v0, p0
|
|
|
|
move/from16 v1, p2
|
|
|
|
move-object/from16 v2, p4
|
|
|
|
new-instance v3, Lo0/a0$a;
|
|
|
|
invoke-direct {v3}, Lo0/a0$a;-><init>()V
|
|
|
|
iget-object v4, v0, Lo0/g0/d/i;->q:Lo0/e0;
|
|
|
|
iget-object v4, v4, Lo0/e0;->a:Lo0/a;
|
|
|
|
iget-object v4, v4, Lo0/a;->a:Lo0/w;
|
|
|
|
invoke-virtual {v3, v4}, Lo0/a0$a;->g(Lo0/w;)Lo0/a0$a;
|
|
|
|
const-string v4, "CONNECT"
|
|
|
|
const/4 v5, 0x0
|
|
|
|
invoke-virtual {v3, v4, v5}, Lo0/a0$a;->d(Ljava/lang/String;Lokhttp3/RequestBody;)Lo0/a0$a;
|
|
|
|
iget-object v4, v0, Lo0/g0/d/i;->q:Lo0/e0;
|
|
|
|
iget-object v4, v4, Lo0/e0;->a:Lo0/a;
|
|
|
|
iget-object v4, v4, Lo0/a;->a:Lo0/w;
|
|
|
|
const/4 v6, 0x1
|
|
|
|
invoke-static {v4, v6}, Lo0/g0/b;->D(Lo0/w;Z)Ljava/lang/String;
|
|
|
|
move-result-object v4
|
|
|
|
const-string v7, "Host"
|
|
|
|
invoke-virtual {v3, v7, v4}, Lo0/a0$a;->c(Ljava/lang/String;Ljava/lang/String;)Lo0/a0$a;
|
|
|
|
const-string v4, "Proxy-Connection"
|
|
|
|
const-string v7, "name"
|
|
|
|
invoke-static {v4, v7}, Lk0/o/c/i;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v8, "Keep-Alive"
|
|
|
|
const-string v9, "value"
|
|
|
|
invoke-static {v8, v9}, Lk0/o/c/i;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
iget-object v10, v3, Lo0/a0$a;->c:Lokhttp3/Headers$a;
|
|
|
|
invoke-virtual {v10, v4, v8}, Lokhttp3/Headers$a;->e(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Headers$a;
|
|
|
|
const-string v4, "User-Agent"
|
|
|
|
invoke-static {v4, v7}, Lk0/o/c/i;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v8, "okhttp/4.2.1"
|
|
|
|
invoke-static {v8, v9}, Lk0/o/c/i;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
iget-object v10, v3, Lo0/a0$a;->c:Lokhttp3/Headers$a;
|
|
|
|
invoke-virtual {v10, v4, v8}, Lokhttp3/Headers$a;->e(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Headers$a;
|
|
|
|
invoke-virtual {v3}, Lo0/a0$a;->b()Lo0/a0;
|
|
|
|
move-result-object v3
|
|
|
|
new-instance v4, Lokhttp3/Response$a;
|
|
|
|
invoke-direct {v4}, Lokhttp3/Response$a;-><init>()V
|
|
|
|
invoke-virtual {v4, v3}, Lokhttp3/Response$a;->g(Lo0/a0;)Lokhttp3/Response$a;
|
|
|
|
sget-object v8, Lo0/y;->e:Lo0/y;
|
|
|
|
invoke-virtual {v4, v8}, Lokhttp3/Response$a;->f(Lo0/y;)Lokhttp3/Response$a;
|
|
|
|
const/16 v8, 0x197
|
|
|
|
iput v8, v4, Lokhttp3/Response$a;->c:I
|
|
|
|
const-string v8, "Preemptive Authenticate"
|
|
|
|
invoke-virtual {v4, v8}, Lokhttp3/Response$a;->e(Ljava/lang/String;)Lokhttp3/Response$a;
|
|
|
|
sget-object v8, Lo0/g0/b;->c:Lokhttp3/ResponseBody;
|
|
|
|
iput-object v8, v4, Lokhttp3/Response$a;->g:Lokhttp3/ResponseBody;
|
|
|
|
const-wide/16 v10, -0x1
|
|
|
|
iput-wide v10, v4, Lokhttp3/Response$a;->k:J
|
|
|
|
iput-wide v10, v4, Lokhttp3/Response$a;->l:J
|
|
|
|
const-string v8, "Proxy-Authenticate"
|
|
|
|
invoke-static {v8, v7}, Lk0/o/c/i;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v7, "OkHttp-Preemptive"
|
|
|
|
invoke-static {v7, v9}, Lk0/o/c/i;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
iget-object v9, v4, Lokhttp3/Response$a;->f:Lokhttp3/Headers$a;
|
|
|
|
invoke-virtual {v9, v8, v7}, Lokhttp3/Headers$a;->e(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Headers$a;
|
|
|
|
invoke-virtual {v4}, Lokhttp3/Response$a;->a()Lokhttp3/Response;
|
|
|
|
move-result-object v4
|
|
|
|
iget-object v7, v0, Lo0/g0/d/i;->q:Lo0/e0;
|
|
|
|
iget-object v8, v7, Lo0/e0;->a:Lo0/a;
|
|
|
|
iget-object v8, v8, Lo0/a;->i:Lo0/c;
|
|
|
|
invoke-interface {v8, v7, v4}, Lo0/c;->a(Lo0/e0;Lokhttp3/Response;)Lo0/a0;
|
|
|
|
move-result-object v4
|
|
|
|
if-eqz v4, :cond_0
|
|
|
|
move-object v3, v4
|
|
|
|
:cond_0
|
|
iget-object v4, v3, Lo0/a0;->b:Lo0/w;
|
|
|
|
const/4 v7, 0x0
|
|
|
|
:goto_0
|
|
const/16 v8, 0x15
|
|
|
|
if-ge v7, v8, :cond_b
|
|
|
|
move/from16 v8, p1
|
|
|
|
move-object/from16 v9, p5
|
|
|
|
invoke-virtual {v0, v8, v1, v2, v9}, Lo0/g0/d/i;->e(IILo0/f;Lo0/t;)V
|
|
|
|
new-instance v10, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v10}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v11, "CONNECT "
|
|
|
|
invoke-virtual {v10, v11}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-static {v4, v6}, Lo0/g0/b;->D(Lo0/w;Z)Ljava/lang/String;
|
|
|
|
move-result-object v6
|
|
|
|
invoke-virtual {v10, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
const-string v6, " HTTP/1.1"
|
|
|
|
invoke-virtual {v10, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v10}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v6
|
|
|
|
:goto_1
|
|
iget-object v10, v0, Lo0/g0/d/i;->g:Lp0/g;
|
|
|
|
if-eqz v10, :cond_a
|
|
|
|
iget-object v11, v0, Lo0/g0/d/i;->h:Lokio/BufferedSink;
|
|
|
|
if-eqz v11, :cond_9
|
|
|
|
new-instance v12, Lo0/g0/f/a;
|
|
|
|
invoke-direct {v12, v5, v5, v10, v11}, Lo0/g0/f/a;-><init>(Lo0/x;Lo0/g0/d/i;Lp0/g;Lokio/BufferedSink;)V
|
|
|
|
invoke-interface {v10}, Lp0/w;->timeout()Lp0/x;
|
|
|
|
move-result-object v5
|
|
|
|
int-to-long v13, v1
|
|
|
|
sget-object v15, Ljava/util/concurrent/TimeUnit;->MILLISECONDS:Ljava/util/concurrent/TimeUnit;
|
|
|
|
invoke-virtual {v5, v13, v14, v15}, Lp0/x;->g(JLjava/util/concurrent/TimeUnit;)Lp0/x;
|
|
|
|
invoke-interface {v11}, Lp0/u;->timeout()Lp0/x;
|
|
|
|
move-result-object v5
|
|
|
|
move/from16 v13, p3
|
|
|
|
int-to-long v14, v13
|
|
|
|
sget-object v1, Ljava/util/concurrent/TimeUnit;->MILLISECONDS:Ljava/util/concurrent/TimeUnit;
|
|
|
|
invoke-virtual {v5, v14, v15, v1}, Lp0/x;->g(JLjava/util/concurrent/TimeUnit;)Lp0/x;
|
|
|
|
iget-object v1, v3, Lo0/a0;->d:Lokhttp3/Headers;
|
|
|
|
invoke-virtual {v12, v1, v6}, Lo0/g0/f/a;->m(Lokhttp3/Headers;Ljava/lang/String;)V
|
|
|
|
iget-object v1, v12, Lo0/g0/f/a;->g:Lokio/BufferedSink;
|
|
|
|
invoke-interface {v1}, Lokio/BufferedSink;->flush()V
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-virtual {v12, v1}, Lo0/g0/f/a;->e(Z)Lokhttp3/Response$a;
|
|
|
|
move-result-object v1
|
|
|
|
if-eqz v1, :cond_8
|
|
|
|
invoke-virtual {v1, v3}, Lokhttp3/Response$a;->g(Lo0/a0;)Lokhttp3/Response$a;
|
|
|
|
invoke-virtual {v1}, Lokhttp3/Response$a;->a()Lokhttp3/Response;
|
|
|
|
move-result-object v1
|
|
|
|
const-string v3, "response"
|
|
|
|
invoke-static {v1, v3}, Lk0/o/c/i;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-static {v1}, Lo0/g0/b;->n(Lokhttp3/Response;)J
|
|
|
|
move-result-wide v14
|
|
|
|
const-wide/16 v16, -0x1
|
|
|
|
cmp-long v3, v14, v16
|
|
|
|
if-nez v3, :cond_1
|
|
|
|
goto :goto_2
|
|
|
|
:cond_1
|
|
invoke-virtual {v12, v14, v15}, Lo0/g0/f/a;->j(J)Lp0/w;
|
|
|
|
move-result-object v3
|
|
|
|
const v5, 0x7fffffff
|
|
|
|
sget-object v12, Ljava/util/concurrent/TimeUnit;->MILLISECONDS:Ljava/util/concurrent/TimeUnit;
|
|
|
|
invoke-static {v3, v5, v12}, Lo0/g0/b;->z(Lp0/w;ILjava/util/concurrent/TimeUnit;)Z
|
|
|
|
check-cast v3, Lo0/g0/f/a$d;
|
|
|
|
invoke-virtual {v3}, Lo0/g0/f/a$d;->close()V
|
|
|
|
:goto_2
|
|
iget v3, v1, Lokhttp3/Response;->g:I
|
|
|
|
const/16 v5, 0xc8
|
|
|
|
if-eq v3, v5, :cond_5
|
|
|
|
const/16 v5, 0x197
|
|
|
|
if-ne v3, v5, :cond_4
|
|
|
|
iget-object v3, v0, Lo0/g0/d/i;->q:Lo0/e0;
|
|
|
|
iget-object v5, v3, Lo0/e0;->a:Lo0/a;
|
|
|
|
iget-object v5, v5, Lo0/a;->i:Lo0/c;
|
|
|
|
invoke-interface {v5, v3, v1}, Lo0/c;->a(Lo0/e0;Lokhttp3/Response;)Lo0/a0;
|
|
|
|
move-result-object v3
|
|
|
|
if-eqz v3, :cond_3
|
|
|
|
const/4 v5, 0x2
|
|
|
|
const-string v10, "Connection"
|
|
|
|
const/4 v11, 0x0
|
|
|
|
invoke-static {v1, v10, v11, v5}, Lokhttp3/Response;->a(Lokhttp3/Response;Ljava/lang/String;Ljava/lang/String;I)Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
const-string v5, "close"
|
|
|
|
const/4 v10, 0x1
|
|
|
|
invoke-static {v5, v1, v10}, Lk0/u/k;->equals(Ljava/lang/String;Ljava/lang/String;Z)Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_2
|
|
|
|
goto :goto_3
|
|
|
|
:cond_2
|
|
const/4 v5, 0x0
|
|
|
|
move/from16 v1, p2
|
|
|
|
goto/16 :goto_1
|
|
|
|
:cond_3
|
|
new-instance v1, Ljava/io/IOException;
|
|
|
|
const-string v2, "Failed to authenticate with proxy"
|
|
|
|
invoke-direct {v1, v2}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw v1
|
|
|
|
:cond_4
|
|
new-instance v2, Ljava/io/IOException;
|
|
|
|
const-string v3, "Unexpected response code for CONNECT: "
|
|
|
|
invoke-static {v3}, Lf/e/b/a/a;->D(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object v3
|
|
|
|
iget v1, v1, Lokhttp3/Response;->g:I
|
|
|
|
invoke-virtual {v3, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-direct {v2, v1}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw v2
|
|
|
|
:cond_5
|
|
invoke-interface {v10}, Lp0/g;->h()Lp0/e;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1}, Lp0/e;->J()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_7
|
|
|
|
invoke-interface {v11}, Lokio/BufferedSink;->h()Lp0/e;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1}, Lp0/e;->J()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_7
|
|
|
|
const/4 v1, 0x0
|
|
|
|
move-object v3, v1
|
|
|
|
:goto_3
|
|
if-eqz v3, :cond_b
|
|
|
|
iget-object v1, v0, Lo0/g0/d/i;->b:Ljava/net/Socket;
|
|
|
|
if-eqz v1, :cond_6
|
|
|
|
invoke-static {v1}, Lo0/g0/b;->g(Ljava/net/Socket;)V
|
|
|
|
:cond_6
|
|
const/4 v1, 0x0
|
|
|
|
iput-object v1, v0, Lo0/g0/d/i;->b:Ljava/net/Socket;
|
|
|
|
iput-object v1, v0, Lo0/g0/d/i;->h:Lokio/BufferedSink;
|
|
|
|
iput-object v1, v0, Lo0/g0/d/i;->g:Lp0/g;
|
|
|
|
iget-object v1, v0, Lo0/g0/d/i;->q:Lo0/e0;
|
|
|
|
iget-object v5, v1, Lo0/e0;->c:Ljava/net/InetSocketAddress;
|
|
|
|
iget-object v1, v1, Lo0/e0;->b:Ljava/net/Proxy;
|
|
|
|
const-string v6, "call"
|
|
|
|
invoke-static {v2, v6}, Lk0/o/c/i;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v6, "inetSocketAddress"
|
|
|
|
invoke-static {v5, v6}, Lk0/o/c/i;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v5, "proxy"
|
|
|
|
invoke-static {v1, v5}, Lk0/o/c/i;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
add-int/lit8 v7, v7, 0x1
|
|
|
|
const/4 v5, 0x0
|
|
|
|
const/4 v6, 0x1
|
|
|
|
move/from16 v1, p2
|
|
|
|
goto/16 :goto_0
|
|
|
|
:cond_7
|
|
new-instance v1, Ljava/io/IOException;
|
|
|
|
const-string v2, "TLS tunnel buffered too many bytes!"
|
|
|
|
invoke-direct {v1, v2}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw v1
|
|
|
|
:cond_8
|
|
invoke-static {}, Lk0/o/c/i;->throwNpe()V
|
|
|
|
const/4 v1, 0x0
|
|
|
|
throw v1
|
|
|
|
:cond_9
|
|
invoke-static {}, Lk0/o/c/i;->throwNpe()V
|
|
|
|
throw v5
|
|
|
|
:cond_a
|
|
invoke-static {}, Lk0/o/c/i;->throwNpe()V
|
|
|
|
throw v5
|
|
|
|
:cond_b
|
|
return-void
|
|
.end method
|
|
|
|
.method public final g(Lo0/g0/d/b;ILo0/f;Lo0/t;)V
|
|
.locals 16
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
move-object/from16 v1, p0
|
|
|
|
move/from16 v0, p2
|
|
|
|
move-object/from16 v2, p3
|
|
|
|
sget-object v3, Lo0/y;->h:Lo0/y;
|
|
|
|
sget-object v4, Lo0/y;->e:Lo0/y;
|
|
|
|
iget-object v5, v1, Lo0/g0/d/i;->q:Lo0/e0;
|
|
|
|
iget-object v5, v5, Lo0/e0;->a:Lo0/a;
|
|
|
|
iget-object v6, v5, Lo0/a;->f:Ljavax/net/ssl/SSLSocketFactory;
|
|
|
|
if-nez v6, :cond_1
|
|
|
|
iget-object v2, v5, Lo0/a;->b:Ljava/util/List;
|
|
|
|
invoke-interface {v2, v3}, Ljava/util/List;->contains(Ljava/lang/Object;)Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
iget-object v2, v1, Lo0/g0/d/i;->b:Ljava/net/Socket;
|
|
|
|
iput-object v2, v1, Lo0/g0/d/i;->c:Ljava/net/Socket;
|
|
|
|
iput-object v3, v1, Lo0/g0/d/i;->e:Lo0/y;
|
|
|
|
invoke-virtual {v1, v0}, Lo0/g0/d/i;->l(I)V
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
iget-object v0, v1, Lo0/g0/d/i;->b:Ljava/net/Socket;
|
|
|
|
iput-object v0, v1, Lo0/g0/d/i;->c:Ljava/net/Socket;
|
|
|
|
iput-object v4, v1, Lo0/g0/d/i;->e:Lo0/y;
|
|
|
|
return-void
|
|
|
|
:cond_1
|
|
const-string v3, "call"
|
|
|
|
invoke-static {v2, v3}, Lk0/o/c/i;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v5, "$receiver"
|
|
|
|
iget-object v6, v1, Lo0/g0/d/i;->q:Lo0/e0;
|
|
|
|
iget-object v6, v6, Lo0/e0;->a:Lo0/a;
|
|
|
|
iget-object v7, v6, Lo0/a;->f:Ljavax/net/ssl/SSLSocketFactory;
|
|
|
|
const/4 v8, 0x0
|
|
|
|
if-eqz v7, :cond_c
|
|
|
|
:try_start_0
|
|
iget-object v9, v1, Lo0/g0/d/i;->b:Ljava/net/Socket;
|
|
|
|
iget-object v10, v6, Lo0/a;->a:Lo0/w;
|
|
|
|
iget-object v10, v10, Lo0/w;->e:Ljava/lang/String;
|
|
|
|
iget-object v11, v6, Lo0/a;->a:Lo0/w;
|
|
|
|
iget v11, v11, Lo0/w;->f:I
|
|
|
|
const/4 v12, 0x1
|
|
|
|
invoke-virtual {v7, v9, v10, v11, v12}, Ljavax/net/ssl/SSLSocketFactory;->createSocket(Ljava/net/Socket;Ljava/lang/String;IZ)Ljava/net/Socket;
|
|
|
|
move-result-object v7
|
|
|
|
if-eqz v7, :cond_b
|
|
|
|
check-cast v7, Ljavax/net/ssl/SSLSocket;
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_1
|
|
|
|
move-object/from16 v9, p1
|
|
|
|
:try_start_1
|
|
invoke-virtual {v9, v7}, Lo0/g0/d/b;->a(Ljavax/net/ssl/SSLSocket;)Lo0/m;
|
|
|
|
move-result-object v9
|
|
|
|
iget-boolean v10, v9, Lo0/m;->b:Z
|
|
|
|
if-eqz v10, :cond_2
|
|
|
|
sget-object v10, Lo0/g0/h/f;->c:Lo0/g0/h/f$a;
|
|
|
|
sget-object v10, Lo0/g0/h/f;->a:Lo0/g0/h/f;
|
|
|
|
iget-object v11, v6, Lo0/a;->a:Lo0/w;
|
|
|
|
iget-object v11, v11, Lo0/w;->e:Ljava/lang/String;
|
|
|
|
iget-object v13, v6, Lo0/a;->b:Ljava/util/List;
|
|
|
|
invoke-virtual {v10, v7, v11, v13}, Lo0/g0/h/f;->e(Ljavax/net/ssl/SSLSocket;Ljava/lang/String;Ljava/util/List;)V
|
|
|
|
:cond_2
|
|
invoke-virtual {v7}, Ljavax/net/ssl/SSLSocket;->startHandshake()V
|
|
|
|
invoke-virtual {v7}, Ljavax/net/ssl/SSLSocket;->getSession()Ljavax/net/ssl/SSLSession;
|
|
|
|
move-result-object v10
|
|
|
|
sget-object v11, Lo0/v;->f:Lo0/v$a;
|
|
|
|
const-string v13, "sslSocketSession"
|
|
|
|
invoke-static {v10, v13}, Lk0/o/c/i;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v11, v10}, Lo0/v$a;->a(Ljavax/net/ssl/SSLSession;)Lo0/v;
|
|
|
|
move-result-object v11
|
|
|
|
iget-object v13, v6, Lo0/a;->g:Ljavax/net/ssl/HostnameVerifier;
|
|
|
|
if-eqz v13, :cond_a
|
|
|
|
iget-object v14, v6, Lo0/a;->a:Lo0/w;
|
|
|
|
iget-object v14, v14, Lo0/w;->e:Ljava/lang/String;
|
|
|
|
invoke-interface {v13, v14, v10}, Ljavax/net/ssl/HostnameVerifier;->verify(Ljava/lang/String;Ljavax/net/ssl/SSLSession;)Z
|
|
|
|
move-result v10
|
|
|
|
if-nez v10, :cond_5
|
|
|
|
invoke-virtual {v11}, Lo0/v;->b()Ljava/util/List;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-interface {v0}, Ljava/util/Collection;->isEmpty()Z
|
|
|
|
move-result v2
|
|
|
|
xor-int/2addr v2, v12
|
|
|
|
if-eqz v2, :cond_4
|
|
|
|
const/4 v2, 0x0
|
|
|
|
invoke-interface {v0, v2}, Ljava/util/List;->get(I)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
if-nez v0, :cond_3
|
|
|
|
new-instance v0, Lkotlin/TypeCastException;
|
|
|
|
const-string v2, "null cannot be cast to non-null type java.security.cert.X509Certificate"
|
|
|
|
invoke-direct {v0, v2}, Lkotlin/TypeCastException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_3
|
|
check-cast v0, Ljava/security/cert/X509Certificate;
|
|
|
|
new-instance v2, Ljavax/net/ssl/SSLPeerUnverifiedException;
|
|
|
|
new-instance v3, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v4, "\n |Hostname "
|
|
|
|
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
iget-object v4, v6, Lo0/a;->a:Lo0/w;
|
|
|
|
iget-object v4, v4, Lo0/w;->e:Ljava/lang/String;
|
|
|
|
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
const-string v4, " not verified:\n | certificate: "
|
|
|
|
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
sget-object v4, Lo0/h;->d:Lo0/h$a;
|
|
|
|
invoke-virtual {v4, v0}, Lo0/h$a;->a(Ljava/security/cert/Certificate;)Ljava/lang/String;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
const-string v4, "\n | DN: "
|
|
|
|
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0}, Ljava/security/cert/X509Certificate;->getSubjectDN()Ljava/security/Principal;
|
|
|
|
move-result-object v4
|
|
|
|
const-string v5, "cert.subjectDN"
|
|
|
|
invoke-static {v4, v5}, Lk0/o/c/i;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-interface {v4}, Ljava/security/Principal;->getName()Ljava/lang/String;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
const-string v4, "\n | subjectAltNames: "
|
|
|
|
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
sget-object v4, Lo0/g0/j/d;->a:Lo0/g0/j/d;
|
|
|
|
const-string v5, "certificate"
|
|
|
|
invoke-static {v0, v5}, Lk0/o/c/i;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const/4 v5, 0x7
|
|
|
|
invoke-virtual {v4, v0, v5}, Lo0/g0/j/d;->a(Ljava/security/cert/X509Certificate;I)Ljava/util/List;
|
|
|
|
move-result-object v5
|
|
|
|
const/4 v6, 0x2
|
|
|
|
invoke-virtual {v4, v0, v6}, Lo0/g0/j/d;->a(Ljava/security/cert/X509Certificate;I)Ljava/util/List;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v5, v0}, Lk0/j/l;->plus(Ljava/util/Collection;Ljava/lang/Iterable;)Ljava/util/List;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v3, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
const-string v0, "\n "
|
|
|
|
invoke-virtual {v3, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v0, v8, v12}, Lk0/u/g;->trimMargin$default(Ljava/lang/String;Ljava/lang/String;I)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-direct {v2, v0}, Ljavax/net/ssl/SSLPeerUnverifiedException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw v2
|
|
|
|
:cond_4
|
|
new-instance v0, Ljavax/net/ssl/SSLPeerUnverifiedException;
|
|
|
|
new-instance v2, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v3, "Hostname "
|
|
|
|
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
iget-object v3, v6, Lo0/a;->a:Lo0/w;
|
|
|
|
iget-object v3, v3, Lo0/w;->e:Ljava/lang/String;
|
|
|
|
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
const-string v3, " not verified (no certificates)"
|
|
|
|
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-direct {v0, v2}, Ljavax/net/ssl/SSLPeerUnverifiedException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_5
|
|
iget-object v10, v6, Lo0/a;->h:Lo0/h;
|
|
|
|
if-eqz v10, :cond_9
|
|
|
|
new-instance v12, Lo0/v;
|
|
|
|
iget-object v13, v11, Lo0/v;->b:Lo0/f0;
|
|
|
|
iget-object v14, v11, Lo0/v;->c:Lo0/j;
|
|
|
|
iget-object v15, v11, Lo0/v;->d:Ljava/util/List;
|
|
|
|
new-instance v8, Lo0/g0/d/f;
|
|
|
|
invoke-direct {v8, v10, v11, v6}, Lo0/g0/d/f;-><init>(Lo0/h;Lo0/v;Lo0/a;)V
|
|
|
|
invoke-direct {v12, v13, v14, v15, v8}, Lo0/v;-><init>(Lo0/f0;Lo0/j;Ljava/util/List;Lkotlin/jvm/functions/Function0;)V
|
|
|
|
iput-object v12, v1, Lo0/g0/d/i;->d:Lo0/v;
|
|
|
|
iget-object v6, v6, Lo0/a;->a:Lo0/w;
|
|
|
|
iget-object v6, v6, Lo0/w;->e:Ljava/lang/String;
|
|
|
|
new-instance v8, Lo0/g0/d/g;
|
|
|
|
invoke-direct {v8, v1}, Lo0/g0/d/g;-><init>(Lo0/g0/d/i;)V
|
|
|
|
invoke-virtual {v10, v6, v8}, Lo0/h;->a(Ljava/lang/String;Lkotlin/jvm/functions/Function0;)V
|
|
|
|
iget-boolean v6, v9, Lo0/m;->b:Z
|
|
|
|
if-eqz v6, :cond_6
|
|
|
|
sget-object v6, Lo0/g0/h/f;->c:Lo0/g0/h/f$a;
|
|
|
|
sget-object v6, Lo0/g0/h/f;->a:Lo0/g0/h/f;
|
|
|
|
invoke-virtual {v6, v7}, Lo0/g0/h/f;->h(Ljavax/net/ssl/SSLSocket;)Ljava/lang/String;
|
|
|
|
move-result-object v8
|
|
|
|
goto :goto_0
|
|
|
|
:cond_6
|
|
const/4 v8, 0x0
|
|
|
|
:goto_0
|
|
iput-object v7, v1, Lo0/g0/d/i;->c:Ljava/net/Socket;
|
|
|
|
invoke-static {v7}, Lf/n/a/k/a;->U(Ljava/net/Socket;)Lp0/w;
|
|
|
|
move-result-object v6
|
|
|
|
invoke-static {v6, v5}, Lk0/o/c/i;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
new-instance v9, Lp0/q;
|
|
|
|
invoke-direct {v9, v6}, Lp0/q;-><init>(Lp0/w;)V
|
|
|
|
iput-object v9, v1, Lo0/g0/d/i;->g:Lp0/g;
|
|
|
|
invoke-static {v7}, Lf/n/a/k/a;->T(Ljava/net/Socket;)Lp0/u;
|
|
|
|
move-result-object v6
|
|
|
|
invoke-static {v6, v5}, Lk0/o/c/i;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
new-instance v5, Lp0/p;
|
|
|
|
invoke-direct {v5, v6}, Lp0/p;-><init>(Lp0/u;)V
|
|
|
|
iput-object v5, v1, Lo0/g0/d/i;->h:Lokio/BufferedSink;
|
|
|
|
if-eqz v8, :cond_7
|
|
|
|
sget-object v4, Lo0/y;->k:Lo0/y$a;
|
|
|
|
invoke-virtual {v4, v8}, Lo0/y$a;->a(Ljava/lang/String;)Lo0/y;
|
|
|
|
move-result-object v4
|
|
|
|
:cond_7
|
|
iput-object v4, v1, Lo0/g0/d/i;->e:Lo0/y;
|
|
:try_end_1
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
sget-object v4, Lo0/g0/h/f;->c:Lo0/g0/h/f$a;
|
|
|
|
sget-object v4, Lo0/g0/h/f;->a:Lo0/g0/h/f;
|
|
|
|
invoke-virtual {v4, v7}, Lo0/g0/h/f;->a(Ljavax/net/ssl/SSLSocket;)V
|
|
|
|
invoke-static {v2, v3}, Lk0/o/c/i;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
iget-object v2, v1, Lo0/g0/d/i;->e:Lo0/y;
|
|
|
|
sget-object v3, Lo0/y;->g:Lo0/y;
|
|
|
|
if-ne v2, v3, :cond_8
|
|
|
|
invoke-virtual {v1, v0}, Lo0/g0/d/i;->l(I)V
|
|
|
|
:cond_8
|
|
return-void
|
|
|
|
:cond_9
|
|
:try_start_2
|
|
invoke-static {}, Lk0/o/c/i;->throwNpe()V
|
|
:try_end_2
|
|
.catchall {:try_start_2 .. :try_end_2} :catchall_0
|
|
|
|
const/4 v2, 0x0
|
|
|
|
throw v2
|
|
|
|
:cond_a
|
|
:try_start_3
|
|
invoke-static {}, Lk0/o/c/i;->throwNpe()V
|
|
:try_end_3
|
|
.catchall {:try_start_3 .. :try_end_3} :catchall_0
|
|
|
|
const/4 v2, 0x0
|
|
|
|
throw v2
|
|
|
|
:catchall_0
|
|
move-exception v0
|
|
|
|
move-object v8, v7
|
|
|
|
goto :goto_2
|
|
|
|
:cond_b
|
|
:try_start_4
|
|
new-instance v0, Lkotlin/TypeCastException;
|
|
|
|
const-string v2, "null cannot be cast to non-null type javax.net.ssl.SSLSocket"
|
|
|
|
invoke-direct {v0, v2}, Lkotlin/TypeCastException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:catchall_1
|
|
move-exception v0
|
|
|
|
move-object v2, v8
|
|
|
|
goto :goto_1
|
|
|
|
:cond_c
|
|
invoke-static {}, Lk0/o/c/i;->throwNpe()V
|
|
:try_end_4
|
|
.catchall {:try_start_4 .. :try_end_4} :catchall_2
|
|
|
|
const/4 v2, 0x0
|
|
|
|
throw v2
|
|
|
|
:catchall_2
|
|
move-exception v0
|
|
|
|
const/4 v2, 0x0
|
|
|
|
:goto_1
|
|
move-object v8, v2
|
|
|
|
:goto_2
|
|
if-eqz v8, :cond_d
|
|
|
|
sget-object v2, Lo0/g0/h/f;->c:Lo0/g0/h/f$a;
|
|
|
|
sget-object v2, Lo0/g0/h/f;->a:Lo0/g0/h/f;
|
|
|
|
invoke-virtual {v2, v8}, Lo0/g0/h/f;->a(Ljavax/net/ssl/SSLSocket;)V
|
|
|
|
:cond_d
|
|
if-eqz v8, :cond_e
|
|
|
|
invoke-static {v8}, Lo0/g0/b;->g(Ljava/net/Socket;)V
|
|
|
|
:cond_e
|
|
throw v0
|
|
.end method
|
|
|
|
.method public final h()Z
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lo0/g0/d/i;->f:Lo0/g0/g/e;
|
|
|
|
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 final i(Lo0/x;Lokhttp3/Interceptor$Chain;)Lo0/g0/e/d;
|
|
.locals 6
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/net/SocketException;
|
|
}
|
|
.end annotation
|
|
|
|
const-string v0, "client"
|
|
|
|
invoke-static {p1, v0}, Lk0/o/c/i;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v0, "chain"
|
|
|
|
invoke-static {p2, v0}, Lk0/o/c/i;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
iget-object v0, p0, Lo0/g0/d/i;->c:Ljava/net/Socket;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-eqz v0, :cond_3
|
|
|
|
iget-object v2, p0, Lo0/g0/d/i;->g:Lp0/g;
|
|
|
|
if-eqz v2, :cond_2
|
|
|
|
iget-object v3, p0, Lo0/g0/d/i;->h:Lokio/BufferedSink;
|
|
|
|
if-eqz v3, :cond_1
|
|
|
|
iget-object v1, p0, Lo0/g0/d/i;->f:Lo0/g0/g/e;
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
new-instance v0, Lo0/g0/g/j;
|
|
|
|
invoke-direct {v0, p1, p0, p2, v1}, Lo0/g0/g/j;-><init>(Lo0/x;Lo0/g0/d/i;Lokhttp3/Interceptor$Chain;Lo0/g0/g/e;)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
invoke-interface {p2}, Lokhttp3/Interceptor$Chain;->b()I
|
|
|
|
move-result v1
|
|
|
|
invoke-virtual {v0, v1}, Ljava/net/Socket;->setSoTimeout(I)V
|
|
|
|
invoke-interface {v2}, Lp0/w;->timeout()Lp0/x;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-interface {p2}, Lokhttp3/Interceptor$Chain;->b()I
|
|
|
|
move-result v1
|
|
|
|
int-to-long v4, v1
|
|
|
|
sget-object v1, Ljava/util/concurrent/TimeUnit;->MILLISECONDS:Ljava/util/concurrent/TimeUnit;
|
|
|
|
invoke-virtual {v0, v4, v5, v1}, Lp0/x;->g(JLjava/util/concurrent/TimeUnit;)Lp0/x;
|
|
|
|
invoke-interface {v3}, Lp0/u;->timeout()Lp0/x;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-interface {p2}, Lokhttp3/Interceptor$Chain;->c()I
|
|
|
|
move-result p2
|
|
|
|
int-to-long v4, p2
|
|
|
|
sget-object p2, Ljava/util/concurrent/TimeUnit;->MILLISECONDS:Ljava/util/concurrent/TimeUnit;
|
|
|
|
invoke-virtual {v0, v4, v5, p2}, Lp0/x;->g(JLjava/util/concurrent/TimeUnit;)Lp0/x;
|
|
|
|
new-instance v0, Lo0/g0/f/a;
|
|
|
|
invoke-direct {v0, p1, p0, v2, v3}, Lo0/g0/f/a;-><init>(Lo0/x;Lo0/g0/d/i;Lp0/g;Lokio/BufferedSink;)V
|
|
|
|
:goto_0
|
|
return-object v0
|
|
|
|
:cond_1
|
|
invoke-static {}, Lk0/o/c/i;->throwNpe()V
|
|
|
|
throw v1
|
|
|
|
:cond_2
|
|
invoke-static {}, Lk0/o/c/i;->throwNpe()V
|
|
|
|
throw v1
|
|
|
|
:cond_3
|
|
invoke-static {}, Lk0/o/c/i;->throwNpe()V
|
|
|
|
throw v1
|
|
.end method
|
|
|
|
.method public final j()V
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lo0/g0/d/i;->p:Lo0/g0/d/j;
|
|
|
|
invoke-static {v0}, Ljava/lang/Thread;->holdsLock(Ljava/lang/Object;)Z
|
|
|
|
move-result v0
|
|
|
|
const/4 v1, 0x1
|
|
|
|
xor-int/2addr v0, v1
|
|
|
|
sget-boolean v2, Lk0/i;->a:Z
|
|
|
|
if-eqz v2, :cond_1
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const-string v0, "Assertion failed"
|
|
|
|
new-instance v1, Ljava/lang/AssertionError;
|
|
|
|
invoke-direct {v1, v0}, Ljava/lang/AssertionError;-><init>(Ljava/lang/Object;)V
|
|
|
|
throw v1
|
|
|
|
:cond_1
|
|
:goto_0
|
|
iget-object v0, p0, Lo0/g0/d/i;->p:Lo0/g0/d/j;
|
|
|
|
monitor-enter v0
|
|
|
|
:try_start_0
|
|
iput-boolean v1, p0, Lo0/g0/d/i;->i:Z
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
monitor-exit v0
|
|
|
|
return-void
|
|
|
|
:catchall_0
|
|
move-exception v1
|
|
|
|
monitor-exit v0
|
|
|
|
throw v1
|
|
.end method
|
|
|
|
.method public k()Ljava/net/Socket;
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lo0/g0/d/i;->c:Ljava/net/Socket;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
return-object v0
|
|
|
|
:cond_0
|
|
invoke-static {}, Lk0/o/c/i;->throwNpe()V
|
|
|
|
const/4 v0, 0x0
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public final l(I)V
|
|
.locals 9
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lo0/g0/d/i;->c:Ljava/net/Socket;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-eqz v0, :cond_c
|
|
|
|
iget-object v2, p0, Lo0/g0/d/i;->g:Lp0/g;
|
|
|
|
if-eqz v2, :cond_b
|
|
|
|
iget-object v3, p0, Lo0/g0/d/i;->h:Lokio/BufferedSink;
|
|
|
|
if-eqz v3, :cond_a
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-virtual {v0, v1}, Ljava/net/Socket;->setSoTimeout(I)V
|
|
|
|
new-instance v4, Lo0/g0/g/e$b;
|
|
|
|
const/4 v5, 0x1
|
|
|
|
invoke-direct {v4, v5}, Lo0/g0/g/e$b;-><init>(Z)V
|
|
|
|
iget-object v6, p0, Lo0/g0/d/i;->q:Lo0/e0;
|
|
|
|
iget-object v6, v6, Lo0/e0;->a:Lo0/a;
|
|
|
|
iget-object v6, v6, Lo0/a;->a:Lo0/w;
|
|
|
|
iget-object v6, v6, Lo0/w;->e:Ljava/lang/String;
|
|
|
|
const-string v7, "socket"
|
|
|
|
invoke-static {v0, v7}, Lk0/o/c/i;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v7, "connectionName"
|
|
|
|
invoke-static {v6, v7}, Lk0/o/c/i;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v7, "source"
|
|
|
|
invoke-static {v2, v7}, Lk0/o/c/i;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v7, "sink"
|
|
|
|
invoke-static {v3, v7}, Lk0/o/c/i;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
iput-object v0, v4, Lo0/g0/g/e$b;->a:Ljava/net/Socket;
|
|
|
|
iput-object v6, v4, Lo0/g0/g/e$b;->b:Ljava/lang/String;
|
|
|
|
iput-object v2, v4, Lo0/g0/g/e$b;->c:Lp0/g;
|
|
|
|
iput-object v3, v4, Lo0/g0/g/e$b;->d:Lokio/BufferedSink;
|
|
|
|
const-string v0, "listener"
|
|
|
|
invoke-static {p0, v0}, Lk0/o/c/i;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
iput-object p0, v4, Lo0/g0/g/e$b;->e:Lo0/g0/g/e$c;
|
|
|
|
iput p1, v4, Lo0/g0/g/e$b;->g:I
|
|
|
|
new-instance p1, Lo0/g0/g/e;
|
|
|
|
invoke-direct {p1, v4}, Lo0/g0/g/e;-><init>(Lo0/g0/g/e$b;)V
|
|
|
|
iput-object p1, p0, Lo0/g0/d/i;->f:Lo0/g0/g/e;
|
|
|
|
iget-object v0, p1, Lo0/g0/g/e;->v:Lo0/g0/g/m;
|
|
|
|
monitor-enter v0
|
|
|
|
:try_start_0
|
|
iget-boolean v2, v0, Lo0/g0/g/m;->f:Z
|
|
|
|
if-nez v2, :cond_9
|
|
|
|
iget-boolean v2, v0, Lo0/g0/g/m;->i:Z
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_1
|
|
|
|
if-nez v2, :cond_0
|
|
|
|
monitor-exit v0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
:try_start_1
|
|
sget-object v2, Lo0/g0/g/m;->j:Ljava/util/logging/Logger;
|
|
|
|
sget-object v3, Ljava/util/logging/Level;->FINE:Ljava/util/logging/Level;
|
|
|
|
invoke-virtual {v2, v3}, Ljava/util/logging/Logger;->isLoggable(Ljava/util/logging/Level;)Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_1
|
|
|
|
sget-object v2, Lo0/g0/g/m;->j:Ljava/util/logging/Logger;
|
|
|
|
new-instance v3, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v4, ">> CONNECTION "
|
|
|
|
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
sget-object v4, Lo0/g0/g/d;->a:Lokio/ByteString;
|
|
|
|
invoke-virtual {v4}, Lokio/ByteString;->i()Ljava/lang/String;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
new-array v4, v1, [Ljava/lang/Object;
|
|
|
|
invoke-static {v3, v4}, Lo0/g0/b;->l(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {v2, v3}, Ljava/util/logging/Logger;->fine(Ljava/lang/String;)V
|
|
|
|
:cond_1
|
|
iget-object v2, v0, Lo0/g0/g/m;->h:Lokio/BufferedSink;
|
|
|
|
sget-object v3, Lo0/g0/g/d;->a:Lokio/ByteString;
|
|
|
|
invoke-interface {v2, v3}, Lokio/BufferedSink;->y0(Lokio/ByteString;)Lokio/BufferedSink;
|
|
|
|
iget-object v2, v0, Lo0/g0/g/m;->h:Lokio/BufferedSink;
|
|
|
|
invoke-interface {v2}, Lokio/BufferedSink;->flush()V
|
|
:try_end_1
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_1
|
|
|
|
monitor-exit v0
|
|
|
|
:goto_0
|
|
iget-object v0, p1, Lo0/g0/g/e;->v:Lo0/g0/g/m;
|
|
|
|
iget-object v2, p1, Lo0/g0/g/e;->o:Lo0/g0/g/q;
|
|
|
|
monitor-enter v0
|
|
|
|
:try_start_2
|
|
const-string v3, "settings"
|
|
|
|
invoke-static {v2, v3}, Lk0/o/c/i;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
iget-boolean v3, v0, Lo0/g0/g/m;->f:Z
|
|
|
|
if-nez v3, :cond_8
|
|
|
|
iget v3, v2, Lo0/g0/g/q;->a:I
|
|
|
|
invoke-static {v3}, Ljava/lang/Integer;->bitCount(I)I
|
|
|
|
move-result v3
|
|
|
|
mul-int/lit8 v3, v3, 0x6
|
|
|
|
const/4 v4, 0x4
|
|
|
|
invoke-virtual {v0, v1, v3, v4, v1}, Lo0/g0/g/m;->c(IIII)V
|
|
|
|
const/16 v3, 0xa
|
|
|
|
const/4 v6, 0x0
|
|
|
|
:goto_1
|
|
if-ge v6, v3, :cond_6
|
|
|
|
shl-int v7, v5, v6
|
|
|
|
iget v8, v2, Lo0/g0/g/q;->a:I
|
|
|
|
and-int/2addr v7, v8
|
|
|
|
if-eqz v7, :cond_2
|
|
|
|
const/4 v7, 0x1
|
|
|
|
goto :goto_2
|
|
|
|
:cond_2
|
|
const/4 v7, 0x0
|
|
|
|
:goto_2
|
|
if-nez v7, :cond_3
|
|
|
|
goto :goto_4
|
|
|
|
:cond_3
|
|
if-eq v6, v4, :cond_5
|
|
|
|
const/4 v7, 0x7
|
|
|
|
if-eq v6, v7, :cond_4
|
|
|
|
move v7, v6
|
|
|
|
goto :goto_3
|
|
|
|
:cond_4
|
|
const/4 v7, 0x4
|
|
|
|
goto :goto_3
|
|
|
|
:cond_5
|
|
const/4 v7, 0x3
|
|
|
|
:goto_3
|
|
iget-object v8, v0, Lo0/g0/g/m;->h:Lokio/BufferedSink;
|
|
|
|
invoke-interface {v8, v7}, Lokio/BufferedSink;->writeShort(I)Lokio/BufferedSink;
|
|
|
|
iget-object v7, v0, Lo0/g0/g/m;->h:Lokio/BufferedSink;
|
|
|
|
iget-object v8, v2, Lo0/g0/g/q;->b:[I
|
|
|
|
aget v8, v8, v6
|
|
|
|
invoke-interface {v7, v8}, Lokio/BufferedSink;->writeInt(I)Lokio/BufferedSink;
|
|
|
|
:goto_4
|
|
add-int/lit8 v6, v6, 0x1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_6
|
|
iget-object v2, v0, Lo0/g0/g/m;->h:Lokio/BufferedSink;
|
|
|
|
invoke-interface {v2}, Lokio/BufferedSink;->flush()V
|
|
:try_end_2
|
|
.catchall {:try_start_2 .. :try_end_2} :catchall_0
|
|
|
|
monitor-exit v0
|
|
|
|
iget-object v0, p1, Lo0/g0/g/e;->o:Lo0/g0/g/q;
|
|
|
|
invoke-virtual {v0}, Lo0/g0/g/q;->a()I
|
|
|
|
move-result v0
|
|
|
|
const v2, 0xffff
|
|
|
|
if-eq v0, v2, :cond_7
|
|
|
|
iget-object v3, p1, Lo0/g0/g/e;->v:Lo0/g0/g/m;
|
|
|
|
sub-int/2addr v0, v2
|
|
|
|
int-to-long v4, v0
|
|
|
|
invoke-virtual {v3, v1, v4, v5}, Lo0/g0/g/m;->i(IJ)V
|
|
|
|
:cond_7
|
|
new-instance v0, Ljava/lang/Thread;
|
|
|
|
iget-object v1, p1, Lo0/g0/g/e;->w:Lo0/g0/g/e$d;
|
|
|
|
const-string v2, "OkHttp "
|
|
|
|
invoke-static {v2}, Lf/e/b/a/a;->D(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object v2
|
|
|
|
iget-object p1, p1, Lo0/g0/g/e;->g:Ljava/lang/String;
|
|
|
|
invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-direct {v0, v1, p1}, Ljava/lang/Thread;-><init>(Ljava/lang/Runnable;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Thread;->start()V
|
|
|
|
return-void
|
|
|
|
:cond_8
|
|
:try_start_3
|
|
new-instance p1, Ljava/io/IOException;
|
|
|
|
const-string v1, "closed"
|
|
|
|
invoke-direct {p1, v1}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
:try_end_3
|
|
.catchall {:try_start_3 .. :try_end_3} :catchall_0
|
|
|
|
:catchall_0
|
|
move-exception p1
|
|
|
|
monitor-exit v0
|
|
|
|
throw p1
|
|
|
|
:cond_9
|
|
:try_start_4
|
|
new-instance p1, Ljava/io/IOException;
|
|
|
|
const-string v1, "closed"
|
|
|
|
invoke-direct {p1, v1}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
:try_end_4
|
|
.catchall {:try_start_4 .. :try_end_4} :catchall_1
|
|
|
|
:catchall_1
|
|
move-exception p1
|
|
|
|
monitor-exit v0
|
|
|
|
throw p1
|
|
|
|
:cond_a
|
|
invoke-static {}, Lk0/o/c/i;->throwNpe()V
|
|
|
|
throw v1
|
|
|
|
:cond_b
|
|
invoke-static {}, Lk0/o/c/i;->throwNpe()V
|
|
|
|
throw v1
|
|
|
|
:cond_c
|
|
invoke-static {}, Lk0/o/c/i;->throwNpe()V
|
|
|
|
throw v1
|
|
.end method
|
|
|
|
.method public final m(Lo0/w;)Z
|
|
.locals 4
|
|
|
|
const-string v0, "url"
|
|
|
|
invoke-static {p1, v0}, Lk0/o/c/i;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
iget-object v0, p0, Lo0/g0/d/i;->q:Lo0/e0;
|
|
|
|
iget-object v0, v0, Lo0/e0;->a:Lo0/a;
|
|
|
|
iget-object v0, v0, Lo0/a;->a:Lo0/w;
|
|
|
|
iget v1, p1, Lo0/w;->f:I
|
|
|
|
iget v2, v0, Lo0/w;->f:I
|
|
|
|
const/4 v3, 0x0
|
|
|
|
if-eq v1, v2, :cond_0
|
|
|
|
return v3
|
|
|
|
:cond_0
|
|
iget-object v1, p1, Lo0/w;->e:Ljava/lang/String;
|
|
|
|
iget-object v0, v0, Lo0/w;->e:Ljava/lang/String;
|
|
|
|
invoke-static {v1, v0}, Lk0/o/c/i;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
move-result v0
|
|
|
|
const/4 v1, 0x1
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
return v1
|
|
|
|
:cond_1
|
|
iget-object v0, p0, Lo0/g0/d/i;->d:Lo0/v;
|
|
|
|
if-eqz v0, :cond_4
|
|
|
|
sget-object v2, Lo0/g0/j/d;->a:Lo0/g0/j/d;
|
|
|
|
iget-object p1, p1, Lo0/w;->e:Ljava/lang/String;
|
|
|
|
if-eqz v0, :cond_3
|
|
|
|
invoke-virtual {v0}, Lo0/v;->b()Ljava/util/List;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-interface {v0, v3}, Ljava/util/List;->get(I)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
check-cast v0, Ljava/security/cert/X509Certificate;
|
|
|
|
invoke-virtual {v2, p1, v0}, Lo0/g0/j/d;->b(Ljava/lang/String;Ljava/security/cert/X509Certificate;)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_4
|
|
|
|
const/4 v3, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
new-instance p1, Lkotlin/TypeCastException;
|
|
|
|
const-string v0, "null cannot be cast to non-null type java.security.cert.X509Certificate"
|
|
|
|
invoke-direct {p1, v0}, Lkotlin/TypeCastException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
|
|
:cond_3
|
|
invoke-static {}, Lk0/o/c/i;->throwNpe()V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
throw p1
|
|
|
|
:cond_4
|
|
:goto_0
|
|
return v3
|
|
.end method
|
|
|
|
.method public toString()Ljava/lang/String;
|
|
.locals 2
|
|
|
|
const-string v0, "Connection{"
|
|
|
|
invoke-static {v0}, Lf/e/b/a/a;->D(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object v0
|
|
|
|
iget-object v1, p0, Lo0/g0/d/i;->q:Lo0/e0;
|
|
|
|
iget-object v1, v1, Lo0/e0;->a:Lo0/a;
|
|
|
|
iget-object v1, v1, Lo0/a;->a:Lo0/w;
|
|
|
|
iget-object v1, v1, Lo0/w;->e:Ljava/lang/String;
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
const/16 v1, 0x3a
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
|
|
|
|
iget-object v1, p0, Lo0/g0/d/i;->q:Lo0/e0;
|
|
|
|
iget-object v1, v1, Lo0/e0;->a:Lo0/a;
|
|
|
|
iget-object v1, v1, Lo0/a;->a:Lo0/w;
|
|
|
|
iget v1, v1, Lo0/w;->f:I
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
const/16 v1, 0x2c
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
|
|
|
|
const-string v1, " proxy="
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
iget-object v1, p0, Lo0/g0/d/i;->q:Lo0/e0;
|
|
|
|
iget-object v1, v1, Lo0/e0;->b:Ljava/net/Proxy;
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
const-string v1, " hostAddress="
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
iget-object v1, p0, Lo0/g0/d/i;->q:Lo0/e0;
|
|
|
|
iget-object v1, v1, Lo0/e0;->c:Ljava/net/InetSocketAddress;
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
const-string v1, " cipherSuite="
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
iget-object v1, p0, Lo0/g0/d/i;->d:Lo0/v;
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
iget-object v1, v1, Lo0/v;->c:Lo0/j;
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const-string v1, "none"
|
|
|
|
:goto_0
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
const-string v1, " protocol="
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
iget-object v1, p0, Lo0/g0/d/i;->e:Lo0/y;
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
const/16 v1, 0x7d
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|