g.smali

.class final Lcom/squareup/okhttp/internal/g;
.super Lcom/squareup/okhttp/internal/f;
.source "Platform.java"


# instance fields
.field private final bxG:Lcom/squareup/okhttp/internal/e;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Lcom/squareup/okhttp/internal/e",
            "<",
            "Ljava/net/Socket;",
            ">;"
        }
    .end annotation
.end field

.field private final bxH:Lcom/squareup/okhttp/internal/e;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Lcom/squareup/okhttp/internal/e",
            "<",
            "Ljava/net/Socket;",
            ">;"
        }
    .end annotation
.end field

.field private final bxI:Lcom/squareup/okhttp/internal/e;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Lcom/squareup/okhttp/internal/e",
            "<",
            "Ljava/net/Socket;",
            ">;"
        }
    .end annotation
.end field

.field private final bxJ:Lcom/squareup/okhttp/internal/e;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Lcom/squareup/okhttp/internal/e",
            "<",
            "Ljava/net/Socket;",
            ">;"
        }
    .end annotation
.end field


# direct methods
.method public constructor <init>(Lcom/squareup/okhttp/internal/e;Lcom/squareup/okhttp/internal/e;Lcom/squareup/okhttp/internal/e;Lcom/squareup/okhttp/internal/e;)V
    .registers 5
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Lcom/squareup/okhttp/internal/e",
            "<",
            "Ljava/net/Socket;",
            ">;",
            "Lcom/squareup/okhttp/internal/e",
            "<",
            "Ljava/net/Socket;",
            ">;",
            "Lcom/squareup/okhttp/internal/e",
            "<",
            "Ljava/net/Socket;",
            ">;",
            "Lcom/squareup/okhttp/internal/e",
            "<",
            "Ljava/net/Socket;",
            ">;)V"
        }
    .end annotation

    .prologue
    .line 185
    invoke-direct {p0}, Lcom/squareup/okhttp/internal/f;-><init>()V

    .line 186
    iput-object p1, p0, Lcom/squareup/okhttp/internal/g;->bxG:Lcom/squareup/okhttp/internal/e;

    .line 187
    iput-object p2, p0, Lcom/squareup/okhttp/internal/g;->bxH:Lcom/squareup/okhttp/internal/e;

    .line 190
    iput-object p3, p0, Lcom/squareup/okhttp/internal/g;->bxI:Lcom/squareup/okhttp/internal/e;

    .line 191
    iput-object p4, p0, Lcom/squareup/okhttp/internal/g;->bxJ:Lcom/squareup/okhttp/internal/e;

    .line 192
    return-void
.end method


# virtual methods
.method public final a(Ljava/net/Socket;Ljava/net/InetSocketAddress;I)V
    .registers 7

    .prologue
    .line 197
    :try_start_0
    invoke-virtual {p1, p2, p3}, Ljava/net/Socket;->connect(Ljava/net/SocketAddress;I)V
    :try_end_3
    .catch Ljava/lang/AssertionError; {:try_start_0 .. :try_end_3} :catch_4
    .catch Ljava/lang/SecurityException; {:try_start_0 .. :try_end_3} :catch_12

    .line 207
    return-void

    .line 198
    :catch_4
    move-exception v0

    .line 199
    invoke-static {v0}, Lcom/squareup/okhttp/internal/k;->a(Ljava/lang/AssertionError;)Z

    move-result v1

    if-eqz v1, :cond_11

    new-instance v1, Ljava/io/IOException;

    invoke-direct {v1, v0}, Ljava/io/IOException;-><init>(Ljava/lang/Throwable;)V

    throw v1

    .line 200
    :cond_11
    throw v0

    .line 201
    :catch_12
    move-exception v0

    .line 204
    new-instance v1, Ljava/io/IOException;

    const-string v2, "Exception in connect"

    invoke-direct {v1, v2}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V

    .line 205
    invoke-virtual {v1, v0}, Ljava/io/IOException;->initCause(Ljava/lang/Throwable;)Ljava/lang/Throwable;

    .line 206
    throw v1
.end method

.method public final a(Ljavax/net/ssl/SSLSocket;Ljava/lang/String;Ljava/util/List;)V
    .registers 11
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljavax/net/ssl/SSLSocket;",
            "Ljava/lang/String;",
            "Ljava/util/List",
            "<",
            "Lcom/squareup/okhttp/Protocol;",
            ">;)V"
        }
    .end annotation

    .prologue
    const/4 v4, 0x1

    const/4 v2, 0x0

    .line 213
    if-eqz p2, :cond_1a

    .line 214
    iget-object v0, p0, Lcom/squareup/okhttp/internal/g;->bxG:Lcom/squareup/okhttp/internal/e;

    new-array v1, v4, [Ljava/lang/Object;

    invoke-static {v4}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object v3

    aput-object v3, v1, v2

    invoke-virtual {v0, p1, v1}, Lcom/squareup/okhttp/internal/e;->c(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;

    .line 215
    iget-object v0, p0, Lcom/squareup/okhttp/internal/g;->bxH:Lcom/squareup/okhttp/internal/e;

    new-array v1, v4, [Ljava/lang/Object;

    aput-object p2, v1, v2

    invoke-virtual {v0, p1, v1}, Lcom/squareup/okhttp/internal/e;->c(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;

    .line 219
    :cond_1a
    iget-object v0, p0, Lcom/squareup/okhttp/internal/g;->bxJ:Lcom/squareup/okhttp/internal/e;

    if-eqz v0, :cond_5f

    iget-object v0, p0, Lcom/squareup/okhttp/internal/g;->bxJ:Lcom/squareup/okhttp/internal/e;

    invoke-virtual {v0, p1}, Lcom/squareup/okhttp/internal/e;->aB(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_5f

    .line 220
    new-array v3, v4, [Ljava/lang/Object;

    .line 1385
    new-instance v4, Lokio/d;

    invoke-direct {v4}, Lokio/d;-><init>()V

    .line 1386
    invoke-interface {p3}, Ljava/util/List;->size()I

    move-result v5

    move v1, v2

    :goto_32
    if-ge v1, v5, :cond_54

    .line 1387
    invoke-interface {p3, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/squareup/okhttp/Protocol;

    .line 1388
    sget-object v6, Lcom/squareup/okhttp/Protocol;->HTTP_1_0:Lcom/squareup/okhttp/Protocol;

    if-eq v0, v6, :cond_50

    .line 1389
    invoke-virtual {v0}, Lcom/squareup/okhttp/Protocol;->toString()Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v6}, Ljava/lang/String;->length()I

    move-result v6

    invoke-virtual {v4, v6}, Lokio/d;->fv(I)Lokio/d;

    .line 1390
    invoke-virtual {v0}, Lcom/squareup/okhttp/Protocol;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v4, v0}, Lokio/d;->hU(Ljava/lang/String;)Lokio/d;

    .line 1386
    :cond_50
    add-int/lit8 v0, v1, 0x1

    move v1, v0

    goto :goto_32

    .line 1392
    :cond_54
    invoke-virtual {v4}, Lokio/d;->readByteArray()[B

    move-result-object v0

    .line 220
    aput-object v0, v3, v2

    .line 221
    iget-object v0, p0, Lcom/squareup/okhttp/internal/g;->bxJ:Lcom/squareup/okhttp/internal/e;

    invoke-virtual {v0, p1, v3}, Lcom/squareup/okhttp/internal/e;->d(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;

    .line 223
    :cond_5f
    return-void
.end method

.method public final e(Ljavax/net/ssl/SSLSocket;)Ljava/lang/String;
    .registers 5

    .prologue
    const/4 v1, 0x0

    .line 226
    iget-object v0, p0, Lcom/squareup/okhttp/internal/g;->bxI:Lcom/squareup/okhttp/internal/e;

    if-nez v0, :cond_7

    move-object v0, v1

    .line 230
    :goto_6
    return-object v0

    .line 227
    :cond_7
    iget-object v0, p0, Lcom/squareup/okhttp/internal/g;->bxI:Lcom/squareup/okhttp/internal/e;

    invoke-virtual {v0, p1}, Lcom/squareup/okhttp/internal/e;->aB(Ljava/lang/Object;)Z

    move-result v0

    if-nez v0, :cond_11

    move-object v0, v1

    goto :goto_6

    .line 229
    :cond_11
    iget-object v0, p0, Lcom/squareup/okhttp/internal/g;->bxI:Lcom/squareup/okhttp/internal/e;

    const/4 v2, 0x0

    new-array v2, v2, [Ljava/lang/Object;

    invoke-virtual {v0, p1, v2}, Lcom/squareup/okhttp/internal/e;->d(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, [B

    .line 230
    if-eqz v0, :cond_27

    new-instance v1, Ljava/lang/String;

    sget-object v2, Lcom/squareup/okhttp/internal/k;->UTF_8:Ljava/nio/charset/Charset;

    invoke-direct {v1, v0, v2}, Ljava/lang/String;-><init>([BLjava/nio/charset/Charset;)V

    move-object v0, v1

    goto :goto_6

    :cond_27
    move-object v0, v1

    goto :goto_6
.end method