h.smali

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


# instance fields
.field private final blQ:Ljava/lang/reflect/Method;

.field private final bxK:Ljava/lang/reflect/Method;

.field private final bxL:Ljava/lang/reflect/Method;

.field private final bxM:Ljava/lang/Class;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/lang/Class",
            "<*>;"
        }
    .end annotation
.end field

.field private final bxN:Ljava/lang/Class;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/lang/Class",
            "<*>;"
        }
    .end annotation
.end field


# direct methods
.method public constructor <init>(Ljava/lang/reflect/Method;Ljava/lang/reflect/Method;Ljava/lang/reflect/Method;Ljava/lang/Class;Ljava/lang/Class;)V
    .registers 6
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/lang/reflect/Method;",
            "Ljava/lang/reflect/Method;",
            "Ljava/lang/reflect/Method;",
            "Ljava/lang/Class",
            "<*>;",
            "Ljava/lang/Class",
            "<*>;)V"
        }
    .end annotation

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

    .line 283
    iput-object p1, p0, Lcom/squareup/okhttp/internal/h;->bxK:Ljava/lang/reflect/Method;

    .line 284
    iput-object p2, p0, Lcom/squareup/okhttp/internal/h;->blQ:Ljava/lang/reflect/Method;

    .line 285
    iput-object p3, p0, Lcom/squareup/okhttp/internal/h;->bxL:Ljava/lang/reflect/Method;

    .line 286
    iput-object p4, p0, Lcom/squareup/okhttp/internal/h;->bxM:Ljava/lang/Class;

    .line 287
    iput-object p5, p0, Lcom/squareup/okhttp/internal/h;->bxN:Ljava/lang/Class;

    .line 288
    return-void
.end method


# virtual methods
.method public final a(Ljavax/net/ssl/SSLSocket;Ljava/lang/String;Ljava/util/List;)V
    .registers 9
    .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 v0, 0x0

    .line 292
    new-instance v2, Ljava/util/ArrayList;

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

    move-result v1

    invoke-direct {v2, v1}, Ljava/util/ArrayList;-><init>(I)V

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

    move-result v3

    move v1, v0

    :goto_f
    if-ge v1, v3, :cond_26

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

    move-result-object v0

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

    .line 295
    sget-object v4, Lcom/squareup/okhttp/Protocol;->HTTP_1_0:Lcom/squareup/okhttp/Protocol;

    if-eq v0, v4, :cond_22

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

    move-result-object v0

    invoke-interface {v2, v0}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 293
    :cond_22
    add-int/lit8 v0, v1, 0x1

    move v1, v0

    goto :goto_f

    .line 299
    :cond_26
    :try_start_26
    const-class v0, Lcom/squareup/okhttp/internal/f;

    invoke-virtual {v0}, Ljava/lang/Class;->getClassLoader()Ljava/lang/ClassLoader;

    move-result-object v0

    const/4 v1, 0x2

    new-array v1, v1, [Ljava/lang/Class;

    const/4 v3, 0x0

    iget-object v4, p0, Lcom/squareup/okhttp/internal/h;->bxM:Ljava/lang/Class;

    aput-object v4, v1, v3

    const/4 v3, 0x1

    iget-object v4, p0, Lcom/squareup/okhttp/internal/h;->bxN:Ljava/lang/Class;

    aput-object v4, v1, v3

    new-instance v3, Lcom/squareup/okhttp/internal/i;

    invoke-direct {v3, v2}, Lcom/squareup/okhttp/internal/i;-><init>(Ljava/util/List;)V

    invoke-static {v0, v1, v3}, Ljava/lang/reflect/Proxy;->newProxyInstance(Ljava/lang/ClassLoader;[Ljava/lang/Class;Ljava/lang/reflect/InvocationHandler;)Ljava/lang/Object;

    move-result-object v0

    .line 301
    iget-object v1, p0, Lcom/squareup/okhttp/internal/h;->bxK:Ljava/lang/reflect/Method;

    const/4 v2, 0x0

    const/4 v3, 0x2

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

    const/4 v4, 0x0

    aput-object p1, v3, v4

    const/4 v4, 0x1

    aput-object v0, v3, v4

    invoke-virtual {v1, v2, v3}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
    :try_end_51
    .catch Ljava/lang/reflect/InvocationTargetException; {:try_start_26 .. :try_end_51} :catch_59
    .catch Ljava/lang/IllegalAccessException; {:try_start_26 .. :try_end_51} :catch_52

    .line 304
    return-void

    .line 302
    :catch_52
    move-exception v0

    .line 303
    :goto_53
    new-instance v1, Ljava/lang/AssertionError;

    invoke-direct {v1, v0}, Ljava/lang/AssertionError;-><init>(Ljava/lang/Object;)V

    throw v1

    .line 302
    :catch_59
    move-exception v0

    goto :goto_53
.end method

.method public final d(Ljavax/net/ssl/SSLSocket;)V
    .registers 6

    .prologue
    .line 309
    :try_start_0
    iget-object v0, p0, Lcom/squareup/okhttp/internal/h;->bxL:Ljava/lang/reflect/Method;

    const/4 v1, 0x0

    const/4 v2, 0x1

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

    const/4 v3, 0x0

    aput-object p1, v2, v3

    invoke-virtual {v0, v1, v2}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
    :try_end_c
    .catch Ljava/lang/IllegalAccessException; {:try_start_0 .. :try_end_c} :catch_d
    .catch Ljava/lang/reflect/InvocationTargetException; {:try_start_0 .. :try_end_c} :catch_14

    .line 312
    return-void

    .line 311
    :catch_d
    move-exception v0

    :goto_e
    new-instance v0, Ljava/lang/AssertionError;

    invoke-direct {v0}, Ljava/lang/AssertionError;-><init>()V

    throw v0

    :catch_14
    move-exception v0

    goto :goto_e
.end method

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

    .prologue
    const/4 v1, 0x0

    .line 317
    :try_start_1
    iget-object v0, p0, Lcom/squareup/okhttp/internal/h;->blQ:Ljava/lang/reflect/Method;

    const/4 v2, 0x0

    const/4 v3, 0x1

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

    const/4 v4, 0x0

    aput-object p1, v3, v4

    .line 318
    invoke-virtual {v0, v2, v3}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    invoke-static {v0}, Ljava/lang/reflect/Proxy;->getInvocationHandler(Ljava/lang/Object;)Ljava/lang/reflect/InvocationHandler;

    move-result-object v0

    check-cast v0, Lcom/squareup/okhttp/internal/i;

    .line 319
    invoke-static {v0}, Lcom/squareup/okhttp/internal/i;->a(Lcom/squareup/okhttp/internal/i;)Z

    move-result v2

    if-nez v2, :cond_2b

    invoke-static {v0}, Lcom/squareup/okhttp/internal/i;->b(Lcom/squareup/okhttp/internal/i;)Ljava/lang/String;

    move-result-object v2

    if-nez v2, :cond_2b

    .line 320
    sget-object v0, Lcom/squareup/okhttp/internal/b;->logger:Ljava/util/logging/Logger;

    sget-object v2, Ljava/util/logging/Level;->INFO:Ljava/util/logging/Level;

    const-string v3, "ALPN callback dropped: SPDY and HTTP/2 are disabled. Is alpn-boot on the boot class path?"

    invoke-virtual {v0, v2, v3}, Ljava/util/logging/Logger;->log(Ljava/util/logging/Level;Ljava/lang/String;)V

    move-object v0, v1

    .line 324
    :goto_2a
    return-object v0

    :cond_2b
    invoke-static {v0}, Lcom/squareup/okhttp/internal/i;->a(Lcom/squareup/okhttp/internal/i;)Z

    move-result v2

    if-eqz v2, :cond_33

    move-object v0, v1

    goto :goto_2a

    :cond_33
    invoke-static {v0}, Lcom/squareup/okhttp/internal/i;->b(Lcom/squareup/okhttp/internal/i;)Ljava/lang/String;
    :try_end_36
    .catch Ljava/lang/reflect/InvocationTargetException; {:try_start_1 .. :try_end_36} :catch_3f
    .catch Ljava/lang/IllegalAccessException; {:try_start_1 .. :try_end_36} :catch_38

    move-result-object v0

    goto :goto_2a

    .line 326
    :catch_38
    move-exception v0

    :goto_39
    new-instance v0, Ljava/lang/AssertionError;

    invoke-direct {v0}, Ljava/lang/AssertionError;-><init>()V

    throw v0

    :catch_3f
    move-exception v0

    goto :goto_39
.end method