255 lines
5.4 KiB
Smali
255 lines
5.4 KiB
Smali
.class public Ltf/e;
|
|
.super Ljava/lang/Object;
|
|
.source "PlainSocketFactory.java"
|
|
|
|
# interfaces
|
|
.implements Ltf/m;
|
|
.implements Ltf/k;
|
|
|
|
|
|
# annotations
|
|
.annotation build Lcz/msebera/android/httpclient/annotation/Immutable;
|
|
.end annotation
|
|
|
|
.annotation runtime Ljava/lang/Deprecated;
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field public final a:Ltf/a;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>()V
|
|
.locals 1
|
|
|
|
.line 3
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 4
|
|
iput-object v0, p0, Ltf/e;->a:Ltf/a;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Ltf/a;)V
|
|
.locals 0
|
|
.annotation runtime Ljava/lang/Deprecated;
|
|
.end annotation
|
|
|
|
.line 1
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
.line 2
|
|
iput-object p1, p0, Ltf/e;->a:Ltf/a;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static c()Ltf/e;
|
|
.locals 1
|
|
|
|
.line 1
|
|
new-instance v0, Ltf/e;
|
|
|
|
invoke-direct {v0}, Ltf/e;-><init>()V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public a(Ljava/net/Socket;Ljava/lang/String;ILjava/net/InetAddress;ILng/i;)Ljava/net/Socket;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;,
|
|
Ljava/net/UnknownHostException;,
|
|
Lcz/msebera/android/httpclient/conn/ConnectTimeoutException;
|
|
}
|
|
.end annotation
|
|
|
|
.annotation runtime Ljava/lang/Deprecated;
|
|
.end annotation
|
|
|
|
if-nez p4, :cond_1
|
|
|
|
if-lez p5, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 p4, 0x0
|
|
|
|
goto :goto_2
|
|
|
|
.line 1
|
|
:cond_1
|
|
:goto_0
|
|
new-instance v0, Ljava/net/InetSocketAddress;
|
|
|
|
if-lez p5, :cond_2
|
|
|
|
goto :goto_1
|
|
|
|
:cond_2
|
|
const/4 p5, 0x0
|
|
|
|
:goto_1
|
|
invoke-direct {v0, p4, p5}, Ljava/net/InetSocketAddress;-><init>(Ljava/net/InetAddress;I)V
|
|
|
|
move-object p4, v0
|
|
|
|
.line 2
|
|
:goto_2
|
|
iget-object p5, p0, Ltf/e;->a:Ltf/a;
|
|
|
|
if-eqz p5, :cond_3
|
|
|
|
.line 3
|
|
invoke-interface {p5, p2}, Ltf/a;->resolve(Ljava/lang/String;)Ljava/net/InetAddress;
|
|
|
|
move-result-object p2
|
|
|
|
goto :goto_3
|
|
|
|
.line 4
|
|
:cond_3
|
|
invoke-static {p2}, Ljava/net/InetAddress;->getByName(Ljava/lang/String;)Ljava/net/InetAddress;
|
|
|
|
move-result-object p2
|
|
|
|
.line 5
|
|
:goto_3
|
|
new-instance p5, Ljava/net/InetSocketAddress;
|
|
|
|
invoke-direct {p5, p2, p3}, Ljava/net/InetSocketAddress;-><init>(Ljava/net/InetAddress;I)V
|
|
|
|
.line 6
|
|
invoke-virtual {p0, p1, p5, p4, p6}, Ltf/e;->f(Ljava/net/Socket;Ljava/net/InetSocketAddress;Ljava/net/InetSocketAddress;Lng/i;)Ljava/net/Socket;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public createSocket()Ljava/net/Socket;
|
|
.locals 1
|
|
|
|
.line 1
|
|
new-instance v0, Ljava/net/Socket;
|
|
|
|
invoke-direct {v0}, Ljava/net/Socket;-><init>()V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public d(Lng/i;)Ljava/net/Socket;
|
|
.locals 0
|
|
|
|
.line 1
|
|
new-instance p1, Ljava/net/Socket;
|
|
|
|
invoke-direct {p1}, Ljava/net/Socket;-><init>()V
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public f(Ljava/net/Socket;Ljava/net/InetSocketAddress;Ljava/net/InetSocketAddress;Lng/i;)Ljava/net/Socket;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;,
|
|
Lcz/msebera/android/httpclient/conn/ConnectTimeoutException;
|
|
}
|
|
.end annotation
|
|
|
|
const-string v0, "Remote address"
|
|
|
|
.line 1
|
|
invoke-static {p2, v0}, Lqg/a;->h(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;
|
|
|
|
const-string v0, "HTTP parameters"
|
|
|
|
.line 2
|
|
invoke-static {p4, v0}, Lqg/a;->h(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
.line 3
|
|
invoke-virtual {p0}, Ltf/e;->createSocket()Ljava/net/Socket;
|
|
|
|
move-result-object p1
|
|
|
|
:cond_0
|
|
if-eqz p3, :cond_1
|
|
|
|
.line 4
|
|
invoke-static {p4}, Lng/g;->d(Lng/i;)Z
|
|
|
|
move-result v0
|
|
|
|
invoke-virtual {p1, v0}, Ljava/net/Socket;->setReuseAddress(Z)V
|
|
|
|
.line 5
|
|
invoke-virtual {p1, p3}, Ljava/net/Socket;->bind(Ljava/net/SocketAddress;)V
|
|
|
|
.line 6
|
|
:cond_1
|
|
invoke-static {p4}, Lng/g;->a(Lng/i;)I
|
|
|
|
move-result p3
|
|
|
|
.line 7
|
|
invoke-static {p4}, Lng/g;->e(Lng/i;)I
|
|
|
|
move-result p4
|
|
|
|
.line 8
|
|
:try_start_0
|
|
invoke-virtual {p1, p4}, Ljava/net/Socket;->setSoTimeout(I)V
|
|
|
|
.line 9
|
|
invoke-virtual {p1, p2, p3}, Ljava/net/Socket;->connect(Ljava/net/SocketAddress;I)V
|
|
:try_end_0
|
|
.catch Ljava/net/SocketTimeoutException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
return-object p1
|
|
|
|
.line 10
|
|
:catch_0
|
|
new-instance p1, Lcz/msebera/android/httpclient/conn/ConnectTimeoutException;
|
|
|
|
new-instance p3, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {p3}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string p4, "Connect to "
|
|
|
|
invoke-virtual {p3, p4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p3, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
const-string p2, " timed out"
|
|
|
|
invoke-virtual {p3, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-direct {p1, p2}, Lcz/msebera/android/httpclient/conn/ConnectTimeoutException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public final isSecure(Ljava/net/Socket;)Z
|
|
.locals 0
|
|
|
|
const/4 p1, 0x0
|
|
|
|
return p1
|
|
.end method
|