DefaultConnectionFactory.smali
.class public Lcom/google/api/client/http/javanet/DefaultConnectionFactory;
.super Ljava/lang/Object;
# interfaces
.implements Lcom/google/api/client/http/javanet/ConnectionFactory;
# instance fields
.field private final a:Ljava/net/Proxy;
# direct methods
.method public constructor <init>()V
.registers 2
const/4 v0, 0x0
invoke-direct {p0, v0}, Lcom/google/api/client/http/javanet/DefaultConnectionFactory;-><init>(Ljava/net/Proxy;)V
return-void
.end method
.method public constructor <init>(Ljava/net/Proxy;)V
.registers 2
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
iput-object p1, p0, Lcom/google/api/client/http/javanet/DefaultConnectionFactory;->a:Ljava/net/Proxy;
return-void
.end method
# virtual methods
.method public a(Ljava/net/URL;)Ljava/net/HttpURLConnection;
.registers 3
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
iget-object v0, p0, Lcom/google/api/client/http/javanet/DefaultConnectionFactory;->a:Ljava/net/Proxy;
if-nez v0, :cond_9
invoke-virtual {p1}, Ljava/net/URL;->openConnection()Ljava/net/URLConnection;
move-result-object p1
goto :goto_d
:cond_9
invoke-virtual {p1, v0}, Ljava/net/URL;->openConnection(Ljava/net/Proxy;)Ljava/net/URLConnection;
move-result-object p1
:goto_d
check-cast p1, Ljava/net/HttpURLConnection;
return-object p1
.end method