.class public final Lokhttp3/internal/platform/Platform$Companion; .super Ljava/lang/Object; .source "Platform.kt" # annotations .annotation system Ldalvik/annotation/EnclosingClass; value = Lokhttp3/internal/platform/Platform; .end annotation .annotation system Ldalvik/annotation/InnerClass; accessFlags = 0x19 name = "Companion" .end annotation .annotation system Ldalvik/annotation/SourceDebugExtension; value = "SMAP\nPlatform.kt\nKotlin\n*S Kotlin\n*F\n+ 1 Platform.kt\nokhttp3/internal/platform/Platform$Companion\n+ 2 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n*L\n1#1,268:1\n673#2:269\n746#2,2:270\n1313#2:272\n1382#2,3:273\n*E\n*S KotlinDebug\n*F\n+ 1 Platform.kt\nokhttp3/internal/platform/Platform$Companion\n*L\n185#1:269\n185#1,2:270\n185#1:272\n185#1,3:273\n*E\n" .end annotation .annotation runtime Lkotlin/Metadata; bv = { 0x1, 0x0, 0x3 } d1 = { "\u0000H\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\u0008\u0002\n\u0002\u0010\u0008\n\u0002\u0008\u0002\n\u0002\u0010\u000b\n\u0002\u0008\u0004\n\u0002\u0018\u0002\n\u0002\u0008\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010 \n\u0002\u0010\u000e\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0012\n\u0002\u0008\u0003\n\u0002\u0010\u0002\n\u0000\u0008\u0086\u0003\u0018\u00002\u00020\u0001B\u0007\u0008\u0002\u00a2\u0006\u0002\u0010\u0002J\u001a\u0010\u0010\u001a\u0008\u0012\u0004\u0012\u00020\u00120\u00112\u000c\u0010\u0013\u001a\u0008\u0012\u0004\u0012\u00020\u00140\u0011J\u0014\u0010\u0015\u001a\u00020\u00162\u000c\u0010\u0013\u001a\u0008\u0012\u0004\u0012\u00020\u00140\u0011J\u0008\u0010\u0017\u001a\u00020\u000fH\u0002J\u0008\u0010\u0018\u001a\u00020\u000fH\u0007J\u0010\u0010\u0019\u001a\u00020\u001a2\u0008\u0008\u0002\u0010\u000e\u001a\u00020\u000fR\u000e\u0010\u0003\u001a\u00020\u0004X\u0086T\u00a2\u0006\u0002\n\u0000R\u000e\u0010\u0005\u001a\u00020\u0004X\u0086T\u00a2\u0006\u0002\n\u0000R\u0014\u0010\u0006\u001a\u00020\u00078BX\u0082\u0004\u00a2\u0006\u0006\u001a\u0004\u0008\u0006\u0010\u0008R\u0014\u0010\t\u001a\u00020\u00078BX\u0082\u0004\u00a2\u0006\u0006\u001a\u0004\u0008\t\u0010\u0008R\u0014\u0010\n\u001a\u00020\u00078BX\u0082\u0004\u00a2\u0006\u0006\u001a\u0004\u0008\n\u0010\u0008R\u0016\u0010\u000b\u001a\n \r*\u0004\u0018\u00010\u000c0\u000cX\u0082\u0004\u00a2\u0006\u0002\n\u0000R\u000e\u0010\u000e\u001a\u00020\u000fX\u0082\u000e\u00a2\u0006\u0002\n\u0000\u00a8\u0006\u001b" } d2 = { "Lokhttp3/internal/platform/Platform$Companion;", "", "()V", "INFO", "", "WARN", "isBouncyCastlePreferred", "", "()Z", "isConscryptPreferred", "isOpenJSSEPreferred", "logger", "Ljava/util/logging/Logger;", "kotlin.jvm.PlatformType", "platform", "Lokhttp3/internal/platform/Platform;", "alpnProtocolNames", "", "", "protocols", "Lokhttp3/Protocol;", "concatLengthPrefixed", "", "findPlatform", "get", "resetForTests", "", "okhttp" } k = 0x1 mv = { 0x1, 0x1, 0x10 } .end annotation # direct methods .method private constructor ()V .registers 1 .line 169 invoke-direct {p0}, Ljava/lang/Object;->()V return-void .end method .method public synthetic constructor (Lkotlin/jvm/internal/DefaultConstructorMarker;)V .registers 2 .line 169 invoke-direct {p0}, Lokhttp3/internal/platform/Platform$Companion;->()V return-void .end method .method public static final synthetic access$findPlatform(Lokhttp3/internal/platform/Platform$Companion;)Lokhttp3/internal/platform/Platform; .registers 1 .line 169 invoke-direct {p0}, Lokhttp3/internal/platform/Platform$Companion;->findPlatform()Lokhttp3/internal/platform/Platform; move-result-object p0 return-object p0 .end method .method private final findPlatform()Lokhttp3/internal/platform/Platform; .registers 2 .line 206 sget-object v0, Lokhttp3/internal/platform/Android10Platform;->Companion:Lokhttp3/internal/platform/Android10Platform$Companion; invoke-virtual {v0}, Lokhttp3/internal/platform/Android10Platform$Companion;->buildIfSupported()Lokhttp3/internal/platform/Platform; move-result-object v0 if-eqz v0, :cond_9 return-object v0 .line 212 :cond_9 sget-object v0, Lokhttp3/internal/platform/AndroidPlatform;->Companion:Lokhttp3/internal/platform/AndroidPlatform$Companion; invoke-virtual {v0}, Lokhttp3/internal/platform/AndroidPlatform$Companion;->buildIfSupported()Lokhttp3/internal/platform/Platform; move-result-object v0 if-eqz v0, :cond_12 return-object v0 .line 218 :cond_12 move-object v0, p0 check-cast v0, Lokhttp3/internal/platform/Platform$Companion; invoke-direct {p0}, Lokhttp3/internal/platform/Platform$Companion;->isConscryptPreferred()Z move-result v0 if-eqz v0, :cond_26 .line 219 sget-object v0, Lokhttp3/internal/platform/ConscryptPlatform;->Companion:Lokhttp3/internal/platform/ConscryptPlatform$Companion; invoke-virtual {v0}, Lokhttp3/internal/platform/ConscryptPlatform$Companion;->buildIfSupported()Lokhttp3/internal/platform/ConscryptPlatform; move-result-object v0 if-eqz v0, :cond_26 .line 222 check-cast v0, Lokhttp3/internal/platform/Platform; return-object v0 .line 226 :cond_26 invoke-direct {p0}, Lokhttp3/internal/platform/Platform$Companion;->isBouncyCastlePreferred()Z move-result v0 if-eqz v0, :cond_37 .line 227 sget-object v0, Lokhttp3/internal/platform/BouncyCastlePlatform;->Companion:Lokhttp3/internal/platform/BouncyCastlePlatform$Companion; invoke-virtual {v0}, Lokhttp3/internal/platform/BouncyCastlePlatform$Companion;->buildIfSupported()Lokhttp3/internal/platform/BouncyCastlePlatform; move-result-object v0 if-eqz v0, :cond_37 .line 230 check-cast v0, Lokhttp3/internal/platform/Platform; return-object v0 .line 234 :cond_37 invoke-direct {p0}, Lokhttp3/internal/platform/Platform$Companion;->isOpenJSSEPreferred()Z move-result v0 if-eqz v0, :cond_48 .line 235 sget-object v0, Lokhttp3/internal/platform/OpenJSSEPlatform;->Companion:Lokhttp3/internal/platform/OpenJSSEPlatform$Companion; invoke-virtual {v0}, Lokhttp3/internal/platform/OpenJSSEPlatform$Companion;->buildIfSupported()Lokhttp3/internal/platform/OpenJSSEPlatform; move-result-object v0 if-eqz v0, :cond_48 .line 238 check-cast v0, Lokhttp3/internal/platform/Platform; return-object v0 .line 242 :cond_48 sget-object v0, Lokhttp3/internal/platform/Jdk9Platform;->Companion:Lokhttp3/internal/platform/Jdk9Platform$Companion; invoke-virtual {v0}, Lokhttp3/internal/platform/Jdk9Platform$Companion;->buildIfSupported()Lokhttp3/internal/platform/Jdk9Platform; move-result-object v0 if-eqz v0, :cond_53 .line 245 check-cast v0, Lokhttp3/internal/platform/Platform; return-object v0 .line 249 :cond_53 sget-object v0, Lokhttp3/internal/platform/Jdk8WithJettyBootPlatform;->Companion:Lokhttp3/internal/platform/Jdk8WithJettyBootPlatform$Companion; invoke-virtual {v0}, Lokhttp3/internal/platform/Jdk8WithJettyBootPlatform$Companion;->buildIfSupported()Lokhttp3/internal/platform/Platform; move-result-object v0 if-eqz v0, :cond_5c goto :goto_61 .line 251 :cond_5c new-instance v0, Lokhttp3/internal/platform/Platform; invoke-direct {v0}, Lokhttp3/internal/platform/Platform;->()V :goto_61 return-object v0 .end method .method private final isBouncyCastlePreferred()Z .registers 3 .line 201 const-string v0, "okhttp.platform" invoke-static {v0}, Ljava/lang/System;->getProperty(Ljava/lang/String;)Ljava/lang/String; move-result-object v0 const-string v1, "bouncycastle" invoke-static {v0, v1}, Lkotlin/jvm/internal/Intrinsics;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z move-result v0 return v0 .end method .method private final isConscryptPreferred()Z .registers 3 .line 189 invoke-static {}, Ljava/security/Security;->getProviders()[Ljava/security/Provider; move-result-object v0 const/4 v1, 0x0 aget-object v0, v0, v1 const-string v1, "Security.getProviders()[0]" invoke-static {v0, v1}, Lkotlin/jvm/internal/Intrinsics;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V invoke-virtual {v0}, Ljava/security/Provider;->getName()Ljava/lang/String; move-result-object v0 .line 190 const-string v1, "Conscrypt" invoke-static {v1, v0}, Lkotlin/jvm/internal/Intrinsics;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z move-result v0 return v0 .end method .method private final isOpenJSSEPreferred()Z .registers 3 .line 195 invoke-static {}, Ljava/security/Security;->getProviders()[Ljava/security/Provider; move-result-object v0 const/4 v1, 0x0 aget-object v0, v0, v1 const-string v1, "Security.getProviders()[0]" invoke-static {v0, v1}, Lkotlin/jvm/internal/Intrinsics;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V invoke-virtual {v0}, Ljava/security/Provider;->getName()Ljava/lang/String; move-result-object v0 .line 196 const-string v1, "OpenJSSE" invoke-static {v1, v0}, Lkotlin/jvm/internal/Intrinsics;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z move-result v0 return v0 .end method .method public static synthetic resetForTests$default(Lokhttp3/internal/platform/Platform$Companion;Lokhttp3/internal/platform/Platform;ILjava/lang/Object;)V .registers 4 and-int/lit8 p2, p2, 0x1 if-eqz p2, :cond_8 .line 180 invoke-direct {p0}, Lokhttp3/internal/platform/Platform$Companion;->findPlatform()Lokhttp3/internal/platform/Platform; move-result-object p1 :cond_8 invoke-virtual {p0, p1}, Lokhttp3/internal/platform/Platform$Companion;->resetForTests(Lokhttp3/internal/platform/Platform;)V return-void .end method # virtual methods .method public final alpnProtocolNames(Ljava/util/List;)Ljava/util/List; .registers 6 .annotation system Ldalvik/annotation/Signature; value = { "(", "Ljava/util/List<", "+", "Lokhttp3/Protocol;", ">;)", "Ljava/util/List<", "Ljava/lang/String;", ">;" } .end annotation const-string v0, "protocols" invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V .line 185 check-cast p1, Ljava/lang/Iterable; .line 269 new-instance v0, Ljava/util/ArrayList; invoke-direct {v0}, Ljava/util/ArrayList;->()V check-cast v0, Ljava/util/Collection; .line 270 invoke-interface {p1}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator; move-result-object p1 :cond_12 :goto_12 invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z move-result v1 if-eqz v1, :cond_27 invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object; move-result-object v1 move-object v2, v1 check-cast v2, Lokhttp3/Protocol; .line 185 sget-object v3, Lokhttp3/Protocol;->HTTP_1_0:Lokhttp3/Protocol; if-eq v2, v3, :cond_12 invoke-interface {v0, v1}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z goto :goto_12 .line 271 :cond_27 check-cast v0, Ljava/util/List; check-cast v0, Ljava/lang/Iterable; .line 272 new-instance p1, Ljava/util/ArrayList; const/16 v1, 0xa invoke-static {v0, v1}, Lkotlin/collections/CollectionsKt;->collectionSizeOrDefault(Ljava/lang/Iterable;I)I move-result v1 invoke-direct {p1, v1}, Ljava/util/ArrayList;->(I)V check-cast p1, Ljava/util/Collection; .line 273 invoke-interface {v0}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator; move-result-object v0 :goto_3c invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z move-result v1 if-eqz v1, :cond_50 invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object; move-result-object v1 .line 274 check-cast v1, Lokhttp3/Protocol; .line 185 invoke-virtual {v1}, Lokhttp3/Protocol;->toString()Ljava/lang/String; move-result-object v1 invoke-interface {p1, v1}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z goto :goto_3c .line 275 :cond_50 check-cast p1, Ljava/util/List; return-object p1 .end method .method public final concatLengthPrefixed(Ljava/util/List;)[B .registers 5 .annotation system Ldalvik/annotation/Signature; value = { "(", "Ljava/util/List<", "+", "Lokhttp3/Protocol;", ">;)[B" } .end annotation const-string v0, "protocols" invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V .line 259 new-instance v0, Lokio/Buffer; invoke-direct {v0}, Lokio/Buffer;->()V .line 260 move-object v1, p0 check-cast v1, Lokhttp3/internal/platform/Platform$Companion; invoke-virtual {p0, p1}, Lokhttp3/internal/platform/Platform$Companion;->alpnProtocolNames(Ljava/util/List;)Ljava/util/List; move-result-object p1 invoke-interface {p1}, Ljava/util/List;->iterator()Ljava/util/Iterator; move-result-object p1 :goto_15 invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z move-result v1 if-eqz v1, :cond_2c invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object; move-result-object v1 check-cast v1, Ljava/lang/String; .line 261 invoke-virtual {v1}, Ljava/lang/String;->length()I move-result v2 invoke-virtual {v0, v2}, Lokio/Buffer;->writeByte(I)Lokio/Buffer; .line 262 invoke-virtual {v0, v1}, Lokio/Buffer;->writeUtf8(Ljava/lang/String;)Lokio/Buffer; goto :goto_15 .line 264 :cond_2c invoke-virtual {v0}, Lokio/Buffer;->readByteArray()[B move-result-object p1 return-object p1 .end method .method public final get()Lokhttp3/internal/platform/Platform; .registers 2 .annotation runtime Lkotlin/jvm/JvmStatic; .end annotation .line 178 # getter for: Lokhttp3/internal/platform/Platform;->platform:Lokhttp3/internal/platform/Platform; invoke-static {}, Lokhttp3/internal/platform/Platform;->access$getPlatform$cp()Lokhttp3/internal/platform/Platform; move-result-object v0 return-object v0 .end method .method public final resetForTests(Lokhttp3/internal/platform/Platform;)V .registers 3 const-string v0, "platform" invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V .line 181 invoke-static {p1}, Lokhttp3/internal/platform/Platform;->access$setPlatform$cp(Lokhttp3/internal/platform/Platform;)V return-void .end method