Rabbit-R1/switch port/smali/smali_classes3/okhttp3/ConnectionSpec$Builder.smali

734 lines
19 KiB
Smali
Raw Normal View History

2024-05-21 16:08:36 -05:00
.class public final Lokhttp3/ConnectionSpec$Builder;
.super Ljava/lang/Object;
.source "ConnectionSpec.kt"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lokhttp3/ConnectionSpec;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x19
name = "Builder"
.end annotation
.annotation system Ldalvik/annotation/SourceDebugExtension;
value = "SMAP\nConnectionSpec.kt\nKotlin\n*S Kotlin\n*F\n+ 1 ConnectionSpec.kt\nokhttp3/ConnectionSpec$Builder\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n+ 3 _Arrays.kt\nkotlin/collections/ArraysKt___ArraysKt\n+ 4 ArraysJVM.kt\nkotlin/collections/ArraysKt__ArraysJVMKt\n*L\n1#1,350:1\n1#2:351\n11208#3:352\n11543#3,3:353\n11208#3:358\n11543#3,3:359\n37#4,2:356\n37#4,2:362\n*E\n*S KotlinDebug\n*F\n+ 1 ConnectionSpec.kt\nokhttp3/ConnectionSpec$Builder\n*L\n225#1:352\n225#1,3:353\n244#1:358\n244#1,3:359\n225#1,2:356\n244#1,2:362\n*E\n"
.end annotation
.annotation runtime Lkotlin/Metadata;
bv = {
0x1,
0x0,
0x3
}
d1 = {
"\u00004\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\u000b\n\u0002\u0008\u0002\n\u0002\u0018\u0002\n\u0002\u0008\u0002\n\u0002\u0010\u0011\n\u0002\u0010\u000e\n\u0002\u0008\u0012\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0008\u0002\u0018\u00002\u00020\u0001B\u000f\u0008\u0010\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u00a2\u0006\u0002\u0010\u0004B\u000f\u0008\u0016\u0012\u0006\u0010\u0005\u001a\u00020\u0006\u00a2\u0006\u0002\u0010\u0007J\u0006\u0010\u0019\u001a\u00020\u0000J\u0006\u0010\u001a\u001a\u00020\u0000J\u0006\u0010\u001b\u001a\u00020\u0006J\u001f\u0010\u0008\u001a\u00020\u00002\u0012\u0010\u0008\u001a\n\u0012\u0006\u0008\u0001\u0012\u00020\n0\t\"\u00020\n\u00a2\u0006\u0002\u0010\u001cJ\u001f\u0010\u0008\u001a\u00020\u00002\u0012\u0010\u0008\u001a\n\u0012\u0006\u0008\u0001\u0012\u00020\u001d0\t\"\u00020\u001d\u00a2\u0006\u0002\u0010\u001eJ\u0010\u0010\u0010\u001a\u00020\u00002\u0006\u0010\u0010\u001a\u00020\u0003H\u0007J\u001f\u0010\u0016\u001a\u00020\u00002\u0012\u0010\u0016\u001a\n\u0012\u0006\u0008\u0001\u0012\u00020\n0\t\"\u00020\n\u00a2\u0006\u0002\u0010\u001cJ\u001f\u0010\u0016\u001a\u00020\u00002\u0012\u0010\u0016\u001a\n\u0012\u0006\u0008\u0001\u0012\u00020\u001f0\t\"\u00020\u001f\u00a2\u0006\u0002\u0010 R$\u0010\u0008\u001a\n\u0012\u0004\u0012\u00020\n\u0018\u00010\tX\u0080\u000e\u00a2\u0006\u0010\n\u0002\u0010\u000f\u001a\u0004\u0008\u000b\u0010\u000c\"\u0004\u0008\r\u0010\u000eR\u001a\u0010\u0010\u001a\u00020\u0003X\u0080\u000e\u00a2\u0006\u000e\n\u0000\u001a\u0004\u0008\u0011\u0010\u0012\"\u0004\u0008\u0013\u0010\u0004R\u001a\u0010\u0002\u001a\u00020\u0003X\u0080\u000e\u00a2\u0006\u000e\n\u0000\u001a\u0004\u0008\u0014\u0010\u0012\"\u0004\u0008\u0015\u0010\u0004R$\u0010\u0016\u001a\n\u0012\u0004\u0012\u00020\n\u0018\u00010\tX\u0080\u000e\u00a2\u0006\u0010\n\u0002\u0010\u000f\u001a\u0004\u0008\u0017\u0010\u000c\"\u0004\u0008\u0018\u0010\u000e\u00a8\u0006!"
}
d2 = {
"Lokhttp3/ConnectionSpec$Builder;",
"",
"tls",
"",
"(Z)V",
"connectionSpec",
"Lokhttp3/ConnectionSpec;",
"(Lokhttp3/ConnectionSpec;)V",
"cipherSuites",
"",
"",
"getCipherSuites$okhttp",
"()[Ljava/lang/String;",
"setCipherSuites$okhttp",
"([Ljava/lang/String;)V",
"[Ljava/lang/String;",
"supportsTlsExtensions",
"getSupportsTlsExtensions$okhttp",
"()Z",
"setSupportsTlsExtensions$okhttp",
"getTls$okhttp",
"setTls$okhttp",
"tlsVersions",
"getTlsVersions$okhttp",
"setTlsVersions$okhttp",
"allEnabledCipherSuites",
"allEnabledTlsVersions",
"build",
"([Ljava/lang/String;)Lokhttp3/ConnectionSpec$Builder;",
"Lokhttp3/CipherSuite;",
"([Lokhttp3/CipherSuite;)Lokhttp3/ConnectionSpec$Builder;",
"Lokhttp3/TlsVersion;",
"([Lokhttp3/TlsVersion;)Lokhttp3/ConnectionSpec$Builder;",
"okhttp"
}
k = 0x1
mv = {
0x1,
0x4,
0x0
}
.end annotation
# instance fields
.field private cipherSuites:[Ljava/lang/String;
.field private supportsTlsExtensions:Z
.field private tls:Z
.field private tlsVersions:[Ljava/lang/String;
# direct methods
.method public constructor <init>(Lokhttp3/ConnectionSpec;)V
.locals 1
const-string v0, "connectionSpec"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 212
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
invoke-virtual {p1}, Lokhttp3/ConnectionSpec;->isTls()Z
move-result v0
iput-boolean v0, p0, Lokhttp3/ConnectionSpec$Builder;->tls:Z
.line 213
invoke-static {p1}, Lokhttp3/ConnectionSpec;->access$getCipherSuitesAsString$p(Lokhttp3/ConnectionSpec;)[Ljava/lang/String;
move-result-object v0
iput-object v0, p0, Lokhttp3/ConnectionSpec$Builder;->cipherSuites:[Ljava/lang/String;
.line 214
invoke-static {p1}, Lokhttp3/ConnectionSpec;->access$getTlsVersionsAsString$p(Lokhttp3/ConnectionSpec;)[Ljava/lang/String;
move-result-object v0
iput-object v0, p0, Lokhttp3/ConnectionSpec$Builder;->tlsVersions:[Ljava/lang/String;
.line 215
invoke-virtual {p1}, Lokhttp3/ConnectionSpec;->supportsTlsExtensions()Z
move-result p1
iput-boolean p1, p0, Lokhttp3/ConnectionSpec$Builder;->supportsTlsExtensions:Z
return-void
.end method
.method public constructor <init>(Z)V
.locals 0
.line 208
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
iput-boolean p1, p0, Lokhttp3/ConnectionSpec$Builder;->tls:Z
return-void
.end method
# virtual methods
.method public final allEnabledCipherSuites()Lokhttp3/ConnectionSpec$Builder;
.locals 2
.line 218
move-object v0, p0
check-cast v0, Lokhttp3/ConnectionSpec$Builder;
iget-boolean v0, p0, Lokhttp3/ConnectionSpec$Builder;->tls:Z
if-eqz v0, :cond_0
const/4 v0, 0x0
.line 220
move-object v1, v0
check-cast v1, [Ljava/lang/String;
iput-object v0, p0, Lokhttp3/ConnectionSpec$Builder;->cipherSuites:[Ljava/lang/String;
return-object p0
.line 219
:cond_0
new-instance p0, Ljava/lang/IllegalArgumentException;
const-string v0, "no cipher suites for cleartext connections"
invoke-virtual {v0}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object v0
invoke-direct {p0, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
check-cast p0, Ljava/lang/Throwable;
throw p0
.end method
.method public final allEnabledTlsVersions()Lokhttp3/ConnectionSpec$Builder;
.locals 2
.line 236
move-object v0, p0
check-cast v0, Lokhttp3/ConnectionSpec$Builder;
iget-boolean v0, p0, Lokhttp3/ConnectionSpec$Builder;->tls:Z
if-eqz v0, :cond_0
const/4 v0, 0x0
.line 238
move-object v1, v0
check-cast v1, [Ljava/lang/String;
iput-object v0, p0, Lokhttp3/ConnectionSpec$Builder;->tlsVersions:[Ljava/lang/String;
return-object p0
.line 237
:cond_0
new-instance p0, Ljava/lang/IllegalArgumentException;
const-string v0, "no TLS versions for cleartext connections"
invoke-virtual {v0}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object v0
invoke-direct {p0, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
check-cast p0, Ljava/lang/Throwable;
throw p0
.end method
.method public final build()Lokhttp3/ConnectionSpec;
.locals 4
.line 263
new-instance v0, Lokhttp3/ConnectionSpec;
iget-boolean v1, p0, Lokhttp3/ConnectionSpec$Builder;->tls:Z
iget-boolean v2, p0, Lokhttp3/ConnectionSpec$Builder;->supportsTlsExtensions:Z
iget-object v3, p0, Lokhttp3/ConnectionSpec$Builder;->cipherSuites:[Ljava/lang/String;
iget-object p0, p0, Lokhttp3/ConnectionSpec$Builder;->tlsVersions:[Ljava/lang/String;
invoke-direct {v0, v1, v2, v3, p0}, Lokhttp3/ConnectionSpec;-><init>(ZZ[Ljava/lang/String;[Ljava/lang/String;)V
return-object v0
.end method
.method public final varargs cipherSuites([Ljava/lang/String;)Lokhttp3/ConnectionSpec$Builder;
.locals 2
const-string v0, "cipherSuites"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 229
move-object v0, p0
check-cast v0, Lokhttp3/ConnectionSpec$Builder;
iget-boolean v0, p0, Lokhttp3/ConnectionSpec$Builder;->tls:Z
if-eqz v0, :cond_3
.line 231
array-length v0, p1
const/4 v1, 0x1
if-nez v0, :cond_0
move v0, v1
goto :goto_0
:cond_0
const/4 v0, 0x0
:goto_0
xor-int/2addr v0, v1
if-eqz v0, :cond_2
.line 233
invoke-virtual {p1}, Ljava/lang/Object;->clone()Ljava/lang/Object;
move-result-object p1
if-eqz p1, :cond_1
check-cast p1, [Ljava/lang/String;
iput-object p1, p0, Lokhttp3/ConnectionSpec$Builder;->cipherSuites:[Ljava/lang/String;
return-object p0
:cond_1
new-instance p0, Ljava/lang/NullPointerException;
const-string p1, "null cannot be cast to non-null type kotlin.Array<kotlin.String>"
invoke-direct {p0, p1}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
throw p0
.line 231
:cond_2
new-instance p0, Ljava/lang/IllegalArgumentException;
const-string p1, "At least one cipher suite is required"
invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object p1
invoke-direct {p0, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
check-cast p0, Ljava/lang/Throwable;
throw p0
.line 230
:cond_3
new-instance p0, Ljava/lang/IllegalArgumentException;
const-string p1, "no cipher suites for cleartext connections"
invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object p1
invoke-direct {p0, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
check-cast p0, Ljava/lang/Throwable;
throw p0
.end method
.method public final varargs cipherSuites([Lokhttp3/CipherSuite;)Lokhttp3/ConnectionSpec$Builder;
.locals 5
const-string v0, "cipherSuites"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 223
move-object v0, p0
check-cast v0, Lokhttp3/ConnectionSpec$Builder;
iget-boolean v0, p0, Lokhttp3/ConnectionSpec$Builder;->tls:Z
if-eqz v0, :cond_2
.line 352
new-instance v0, Ljava/util/ArrayList;
array-length v1, p1
invoke-direct {v0, v1}, Ljava/util/ArrayList;-><init>(I)V
check-cast v0, Ljava/util/Collection;
.line 353
array-length v1, p1
const/4 v2, 0x0
move v3, v2
:goto_0
if-ge v3, v1, :cond_0
aget-object v4, p1, v3
.line 225
invoke-virtual {v4}, Lokhttp3/CipherSuite;->javaName()Ljava/lang/String;
move-result-object v4
invoke-interface {v0, v4}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
add-int/lit8 v3, v3, 0x1
goto :goto_0
.line 355
:cond_0
check-cast v0, Ljava/util/List;
.line 352
check-cast v0, Ljava/util/Collection;
new-array p1, v2, [Ljava/lang/String;
.line 357
invoke-interface {v0, p1}, Ljava/util/Collection;->toArray([Ljava/lang/Object;)[Ljava/lang/Object;
move-result-object p1
if-eqz p1, :cond_1
.line 225
check-cast p1, [Ljava/lang/String;
.line 226
array-length v0, p1
invoke-static {p1, v0}, Ljava/util/Arrays;->copyOf([Ljava/lang/Object;I)[Ljava/lang/Object;
move-result-object p1
check-cast p1, [Ljava/lang/String;
invoke-virtual {p0, p1}, Lokhttp3/ConnectionSpec$Builder;->cipherSuites([Ljava/lang/String;)Lokhttp3/ConnectionSpec$Builder;
move-result-object p0
return-object p0
.line 357
:cond_1
new-instance p0, Ljava/lang/NullPointerException;
const-string p1, "null cannot be cast to non-null type kotlin.Array<T>"
invoke-direct {p0, p1}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
throw p0
.line 224
:cond_2
new-instance p0, Ljava/lang/IllegalArgumentException;
const-string p1, "no cipher suites for cleartext connections"
invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object p1
invoke-direct {p0, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
check-cast p0, Ljava/lang/Throwable;
throw p0
.end method
.method public final getCipherSuites$okhttp()[Ljava/lang/String;
.locals 0
iget-object p0, p0, Lokhttp3/ConnectionSpec$Builder;->cipherSuites:[Ljava/lang/String;
return-object p0
.end method
.method public final getSupportsTlsExtensions$okhttp()Z
.locals 0
iget-boolean p0, p0, Lokhttp3/ConnectionSpec$Builder;->supportsTlsExtensions:Z
return p0
.end method
.method public final getTls$okhttp()Z
.locals 0
iget-boolean p0, p0, Lokhttp3/ConnectionSpec$Builder;->tls:Z
return p0
.end method
.method public final getTlsVersions$okhttp()[Ljava/lang/String;
.locals 0
iget-object p0, p0, Lokhttp3/ConnectionSpec$Builder;->tlsVersions:[Ljava/lang/String;
return-object p0
.end method
.method public final setCipherSuites$okhttp([Ljava/lang/String;)V
.locals 0
iput-object p1, p0, Lokhttp3/ConnectionSpec$Builder;->cipherSuites:[Ljava/lang/String;
return-void
.end method
.method public final setSupportsTlsExtensions$okhttp(Z)V
.locals 0
iput-boolean p1, p0, Lokhttp3/ConnectionSpec$Builder;->supportsTlsExtensions:Z
return-void
.end method
.method public final setTls$okhttp(Z)V
.locals 0
iput-boolean p1, p0, Lokhttp3/ConnectionSpec$Builder;->tls:Z
return-void
.end method
.method public final setTlsVersions$okhttp([Ljava/lang/String;)V
.locals 0
iput-object p1, p0, Lokhttp3/ConnectionSpec$Builder;->tlsVersions:[Ljava/lang/String;
return-void
.end method
.method public final supportsTlsExtensions(Z)Lokhttp3/ConnectionSpec$Builder;
.locals 1
.annotation runtime Lkotlin/Deprecated;
message = "since OkHttp 3.13 all TLS-connections are expected to support TLS extensions.\nIn a future release setting this to true will be unnecessary and setting it to false\nwill have no effect."
.end annotation
.line 258
move-object v0, p0
check-cast v0, Lokhttp3/ConnectionSpec$Builder;
iget-boolean v0, p0, Lokhttp3/ConnectionSpec$Builder;->tls:Z
if-eqz v0, :cond_0
iput-boolean p1, p0, Lokhttp3/ConnectionSpec$Builder;->supportsTlsExtensions:Z
return-object p0
.line 259
:cond_0
new-instance p0, Ljava/lang/IllegalArgumentException;
const-string p1, "no TLS extensions for cleartext connections"
invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object p1
invoke-direct {p0, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
check-cast p0, Ljava/lang/Throwable;
throw p0
.end method
.method public final varargs tlsVersions([Ljava/lang/String;)Lokhttp3/ConnectionSpec$Builder;
.locals 2
const-string v0, "tlsVersions"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 248
move-object v0, p0
check-cast v0, Lokhttp3/ConnectionSpec$Builder;
iget-boolean v0, p0, Lokhttp3/ConnectionSpec$Builder;->tls:Z
if-eqz v0, :cond_3
.line 250
array-length v0, p1
const/4 v1, 0x1
if-nez v0, :cond_0
move v0, v1
goto :goto_0
:cond_0
const/4 v0, 0x0
:goto_0
xor-int/2addr v0, v1
if-eqz v0, :cond_2
.line 252
invoke-virtual {p1}, Ljava/lang/Object;->clone()Ljava/lang/Object;
move-result-object p1
if-eqz p1, :cond_1
check-cast p1, [Ljava/lang/String;
iput-object p1, p0, Lokhttp3/ConnectionSpec$Builder;->tlsVersions:[Ljava/lang/String;
return-object p0
:cond_1
new-instance p0, Ljava/lang/NullPointerException;
const-string p1, "null cannot be cast to non-null type kotlin.Array<kotlin.String>"
invoke-direct {p0, p1}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
throw p0
.line 250
:cond_2
new-instance p0, Ljava/lang/IllegalArgumentException;
const-string p1, "At least one TLS version is required"
invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object p1
invoke-direct {p0, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
check-cast p0, Ljava/lang/Throwable;
throw p0
.line 249
:cond_3
new-instance p0, Ljava/lang/IllegalArgumentException;
const-string p1, "no TLS versions for cleartext connections"
invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object p1
invoke-direct {p0, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
check-cast p0, Ljava/lang/Throwable;
throw p0
.end method
.method public final varargs tlsVersions([Lokhttp3/TlsVersion;)Lokhttp3/ConnectionSpec$Builder;
.locals 5
const-string v0, "tlsVersions"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 241
move-object v0, p0
check-cast v0, Lokhttp3/ConnectionSpec$Builder;
iget-boolean v0, p0, Lokhttp3/ConnectionSpec$Builder;->tls:Z
if-eqz v0, :cond_2
.line 358
new-instance v0, Ljava/util/ArrayList;
array-length v1, p1
invoke-direct {v0, v1}, Ljava/util/ArrayList;-><init>(I)V
check-cast v0, Ljava/util/Collection;
.line 359
array-length v1, p1
const/4 v2, 0x0
move v3, v2
:goto_0
if-ge v3, v1, :cond_0
aget-object v4, p1, v3
.line 244
invoke-virtual {v4}, Lokhttp3/TlsVersion;->javaName()Ljava/lang/String;
move-result-object v4
invoke-interface {v0, v4}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
add-int/lit8 v3, v3, 0x1
goto :goto_0
.line 361
:cond_0
check-cast v0, Ljava/util/List;
.line 358
check-cast v0, Ljava/util/Collection;
new-array p1, v2, [Ljava/lang/String;
.line 363
invoke-interface {v0, p1}, Ljava/util/Collection;->toArray([Ljava/lang/Object;)[Ljava/lang/Object;
move-result-object p1
if-eqz p1, :cond_1
.line 244
check-cast p1, [Ljava/lang/String;
.line 245
array-length v0, p1
invoke-static {p1, v0}, Ljava/util/Arrays;->copyOf([Ljava/lang/Object;I)[Ljava/lang/Object;
move-result-object p1
check-cast p1, [Ljava/lang/String;
invoke-virtual {p0, p1}, Lokhttp3/ConnectionSpec$Builder;->tlsVersions([Ljava/lang/String;)Lokhttp3/ConnectionSpec$Builder;
move-result-object p0
return-object p0
.line 363
:cond_1
new-instance p0, Ljava/lang/NullPointerException;
const-string p1, "null cannot be cast to non-null type kotlin.Array<T>"
invoke-direct {p0, p1}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
throw p0
.line 242
:cond_2
new-instance p0, Ljava/lang/IllegalArgumentException;
const-string p1, "no TLS versions for cleartext connections"
invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object p1
invoke-direct {p0, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
check-cast p0, Ljava/lang/Throwable;
throw p0
.end method