Jdk9Platform.smali
.class public Lokhttp3/internal/platform/Jdk9Platform;
.super Lokhttp3/internal/platform/Platform;
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lokhttp3/internal/platform/Jdk9Platform$Companion;
}
.end annotation
# static fields
.field private static final d:Z
.field public static final e:Lokhttp3/internal/platform/Jdk9Platform$Companion;
# direct methods
.method static constructor <clinit>()V
.registers 5
new-instance v0, Lokhttp3/internal/platform/Jdk9Platform$Companion;
const/4 v1, 0x0
invoke-direct {v0, v1}, Lokhttp3/internal/platform/Jdk9Platform$Companion;-><init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
sput-object v0, Lokhttp3/internal/platform/Jdk9Platform;->e:Lokhttp3/internal/platform/Jdk9Platform$Companion;
const-string v0, "java.specification.version"
invoke-static {v0}, Ljava/lang/System;->getProperty(Ljava/lang/String;)Ljava/lang/String;
move-result-object v0
if-eqz v0, :cond_14
invoke-static {v0}, Lkotlin/text/StringsKt;->f(Ljava/lang/String;)Ljava/lang/Integer;
move-result-object v1
:cond_14
const/4 v0, 0x1
const/4 v2, 0x0
if-eqz v1, :cond_23
invoke-virtual {v1}, Ljava/lang/Integer;->intValue()I
move-result v1
const/16 v3, 0x9
if-lt v1, v3, :cond_21
goto :goto_2c
:catch_21
:cond_21
const/4 v0, 0x0
goto :goto_2c
:cond_23
:try_start_23
const-class v1, Ljavax/net/ssl/SSLSocket;
const-string v3, "getApplicationProtocol"
new-array v4, v2, [Ljava/lang/Class;
invoke-virtual {v1, v3, v4}, Ljava/lang/Class;->getMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
:try_end_2c
.catch Ljava/lang/NoSuchMethodException; {:try_start_23 .. :try_end_2c} :catch_21
:goto_2c
sput-boolean v0, Lokhttp3/internal/platform/Jdk9Platform;->d:Z
return-void
.end method
.method public constructor <init>()V
.registers 1
invoke-direct {p0}, Lokhttp3/internal/platform/Platform;-><init>()V
return-void
.end method
.method public static final synthetic q()Z
.registers 1
sget-boolean v0, Lokhttp3/internal/platform/Jdk9Platform;->d:Z
return v0
.end method
# virtual methods
.method public e(Ljavax/net/ssl/SSLSocket;Ljava/lang/String;Ljava/util/List;)V
.registers 5
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljavax/net/ssl/SSLSocket;",
"Ljava/lang/String;",
"Ljava/util/List<",
"Lokhttp3/Protocol;",
">;)V"
}
.end annotation
const-string p2, "sslSocket"
invoke-static {p1, p2}, Lkotlin/jvm/internal/Intrinsics;->c(Ljava/lang/Object;Ljava/lang/String;)V
const-string p2, "protocols"
invoke-static {p3, p2}, Lkotlin/jvm/internal/Intrinsics;->c(Ljava/lang/Object;Ljava/lang/String;)V
invoke-virtual {p1}, Ljavax/net/ssl/SSLSocket;->getSSLParameters()Ljavax/net/ssl/SSLParameters;
move-result-object p2
sget-object v0, Lokhttp3/internal/platform/Platform;->c:Lokhttp3/internal/platform/Platform$Companion;
invoke-virtual {v0, p3}, Lokhttp3/internal/platform/Platform$Companion;->b(Ljava/util/List;)Ljava/util/List;
move-result-object p3
const-string v0, "sslParameters"
invoke-static {p2, v0}, Lkotlin/jvm/internal/Intrinsics;->b(Ljava/lang/Object;Ljava/lang/String;)V
const/4 v0, 0x0
new-array v0, v0, [Ljava/lang/String;
invoke-interface {p3, v0}, Ljava/util/Collection;->toArray([Ljava/lang/Object;)[Ljava/lang/Object;
move-result-object p3
if-eqz p3, :cond_2b
check-cast p3, [Ljava/lang/String;
invoke-virtual {p2, p3}, Ljavax/net/ssl/SSLParameters;->setApplicationProtocols([Ljava/lang/String;)V
invoke-virtual {p1, p2}, Ljavax/net/ssl/SSLSocket;->setSSLParameters(Ljavax/net/ssl/SSLParameters;)V
return-void
:cond_2b
new-instance p1, Lkotlin/TypeCastException;
const-string p2, "null cannot be cast to non-null type kotlin.Array<T>"
invoke-direct {p1, p2}, Lkotlin/TypeCastException;-><init>(Ljava/lang/String;)V
throw p1
.end method
.method public h(Ljavax/net/ssl/SSLSocket;)Ljava/lang/String;
.registers 4
const-string v0, "sslSocket"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->c(Ljava/lang/Object;Ljava/lang/String;)V
const/4 v0, 0x0
:try_start_6
invoke-virtual {p1}, Ljavax/net/ssl/SSLSocket;->getApplicationProtocol()Ljava/lang/String;
move-result-object p1
if-nez p1, :cond_d
goto :goto_17
:cond_d
const-string v1, ""
invoke-static {p1, v1}, Lkotlin/jvm/internal/Intrinsics;->a(Ljava/lang/Object;Ljava/lang/Object;)Z
move-result v1
:try_end_13
.catch Ljava/lang/UnsupportedOperationException; {:try_start_6 .. :try_end_13} :catch_17
if-eqz v1, :cond_16
goto :goto_17
:cond_16
move-object v0, p1
:catch_17
:goto_17
return-object v0
.end method