mirror of
https://github.com/Pinball3D/Rabbit-R1.git
synced 2025-01-09 13:43:22 +00:00
350 lines
9.2 KiB
Smali
350 lines
9.2 KiB
Smali
.class public final Lokhttp3/internal/connection/ConnectionSpecSelector;
|
|
.super Ljava/lang/Object;
|
|
.source "ConnectionSpecSelector.kt"
|
|
|
|
|
|
# annotations
|
|
.annotation runtime Lkotlin/Metadata;
|
|
bv = {
|
|
0x1,
|
|
0x0,
|
|
0x3
|
|
}
|
|
d1 = {
|
|
"\u00006\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010 \n\u0002\u0018\u0002\n\u0002\u0008\u0002\n\u0002\u0010\u000b\n\u0002\u0008\u0002\n\u0002\u0010\u0008\n\u0002\u0008\u0002\n\u0002\u0018\u0002\n\u0002\u0008\u0002\n\u0002\u0018\u0002\n\u0002\u0008\u0002\u0008\u0000\u0018\u00002\u00020\u0001B\u0013\u0012\u000c\u0010\u0002\u001a\u0008\u0012\u0004\u0012\u00020\u00040\u0003\u00a2\u0006\u0002\u0010\u0005J\u000e\u0010\u000b\u001a\u00020\u00042\u0006\u0010\u000c\u001a\u00020\rJ\u000e\u0010\u000e\u001a\u00020\u00072\u0006\u0010\u000f\u001a\u00020\u0010J\u0010\u0010\u0008\u001a\u00020\u00072\u0006\u0010\u0011\u001a\u00020\rH\u0002R\u0014\u0010\u0002\u001a\u0008\u0012\u0004\u0012\u00020\u00040\u0003X\u0082\u0004\u00a2\u0006\u0002\n\u0000R\u000e\u0010\u0006\u001a\u00020\u0007X\u0082\u000e\u00a2\u0006\u0002\n\u0000R\u000e\u0010\u0008\u001a\u00020\u0007X\u0082\u000e\u00a2\u0006\u0002\n\u0000R\u000e\u0010\t\u001a\u00020\nX\u0082\u000e\u00a2\u0006\u0002\n\u0000\u00a8\u0006\u0012"
|
|
}
|
|
d2 = {
|
|
"Lokhttp3/internal/connection/ConnectionSpecSelector;",
|
|
"",
|
|
"connectionSpecs",
|
|
"",
|
|
"Lokhttp3/ConnectionSpec;",
|
|
"(Ljava/util/List;)V",
|
|
"isFallback",
|
|
"",
|
|
"isFallbackPossible",
|
|
"nextModeIndex",
|
|
"",
|
|
"configureSecureSocket",
|
|
"sslSocket",
|
|
"Ljavax/net/ssl/SSLSocket;",
|
|
"connectionFailed",
|
|
"e",
|
|
"Ljava/io/IOException;",
|
|
"socket",
|
|
"okhttp"
|
|
}
|
|
k = 0x1
|
|
mv = {
|
|
0x1,
|
|
0x4,
|
|
0x0
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field private final connectionSpecs:Ljava/util/List;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/List<",
|
|
"Lokhttp3/ConnectionSpec;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private isFallback:Z
|
|
|
|
.field private isFallbackPossible:Z
|
|
|
|
.field private nextModeIndex:I
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Ljava/util/List;)V
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/util/List<",
|
|
"Lokhttp3/ConnectionSpec;",
|
|
">;)V"
|
|
}
|
|
.end annotation
|
|
|
|
const-string v0, "connectionSpecs"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
.line 34
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
iput-object p1, p0, Lokhttp3/internal/connection/ConnectionSpecSelector;->connectionSpecs:Ljava/util/List;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private final isFallbackPossible(Ljavax/net/ssl/SSLSocket;)Z
|
|
.locals 3
|
|
|
|
iget v0, p0, Lokhttp3/internal/connection/ConnectionSpecSelector;->nextModeIndex:I
|
|
|
|
iget-object v1, p0, Lokhttp3/internal/connection/ConnectionSpecSelector;->connectionSpecs:Ljava/util/List;
|
|
|
|
.line 115
|
|
invoke-interface {v1}, Ljava/util/List;->size()I
|
|
|
|
move-result v1
|
|
|
|
:goto_0
|
|
if-ge v0, v1, :cond_1
|
|
|
|
iget-object v2, p0, Lokhttp3/internal/connection/ConnectionSpecSelector;->connectionSpecs:Ljava/util/List;
|
|
|
|
.line 116
|
|
invoke-interface {v2, v0}, Ljava/util/List;->get(I)Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Lokhttp3/ConnectionSpec;
|
|
|
|
invoke-virtual {v2, p1}, Lokhttp3/ConnectionSpec;->isCompatible(Ljavax/net/ssl/SSLSocket;)Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
const/4 p0, 0x1
|
|
|
|
return p0
|
|
|
|
:cond_0
|
|
add-int/lit8 v0, v0, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
const/4 p0, 0x0
|
|
|
|
return p0
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final configureSecureSocket(Ljavax/net/ssl/SSLSocket;)Lokhttp3/ConnectionSpec;
|
|
.locals 5
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
const-string v0, "sslSocket"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 49
|
|
move-object v1, v0
|
|
|
|
check-cast v1, Lokhttp3/ConnectionSpec;
|
|
|
|
iget v1, p0, Lokhttp3/internal/connection/ConnectionSpecSelector;->nextModeIndex:I
|
|
|
|
iget-object v2, p0, Lokhttp3/internal/connection/ConnectionSpecSelector;->connectionSpecs:Ljava/util/List;
|
|
|
|
.line 50
|
|
invoke-interface {v2}, Ljava/util/List;->size()I
|
|
|
|
move-result v2
|
|
|
|
:goto_0
|
|
if-ge v1, v2, :cond_1
|
|
|
|
iget-object v3, p0, Lokhttp3/internal/connection/ConnectionSpecSelector;->connectionSpecs:Ljava/util/List;
|
|
|
|
.line 51
|
|
invoke-interface {v3, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;
|
|
|
|
move-result-object v3
|
|
|
|
check-cast v3, Lokhttp3/ConnectionSpec;
|
|
|
|
.line 52
|
|
invoke-virtual {v3, p1}, Lokhttp3/ConnectionSpec;->isCompatible(Ljavax/net/ssl/SSLSocket;)Z
|
|
|
|
move-result v4
|
|
|
|
if-eqz v4, :cond_0
|
|
|
|
add-int/lit8 v1, v1, 0x1
|
|
|
|
iput v1, p0, Lokhttp3/internal/connection/ConnectionSpecSelector;->nextModeIndex:I
|
|
|
|
move-object v0, v3
|
|
|
|
goto :goto_1
|
|
|
|
:cond_0
|
|
add-int/lit8 v1, v1, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
:goto_1
|
|
if-eqz v0, :cond_2
|
|
|
|
.line 68
|
|
invoke-direct {p0, p1}, Lokhttp3/internal/connection/ConnectionSpecSelector;->isFallbackPossible(Ljavax/net/ssl/SSLSocket;)Z
|
|
|
|
move-result v1
|
|
|
|
iput-boolean v1, p0, Lokhttp3/internal/connection/ConnectionSpecSelector;->isFallbackPossible:Z
|
|
|
|
iget-boolean p0, p0, Lokhttp3/internal/connection/ConnectionSpecSelector;->isFallback:Z
|
|
|
|
.line 70
|
|
invoke-virtual {v0, p1, p0}, Lokhttp3/ConnectionSpec;->apply$okhttp(Ljavax/net/ssl/SSLSocket;Z)V
|
|
|
|
return-object v0
|
|
|
|
.line 63
|
|
:cond_2
|
|
new-instance v0, Ljava/net/UnknownServiceException;
|
|
|
|
new-instance v1, Ljava/lang/StringBuilder;
|
|
|
|
const-string v2, "Unable to find acceptable protocols. isFallback="
|
|
|
|
invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
|
|
|
|
iget-boolean v2, p0, Lokhttp3/internal/connection/ConnectionSpecSelector;->isFallback:Z
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object v1
|
|
|
|
const-string v2, ", modes="
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object v1
|
|
|
|
iget-object p0, p0, Lokhttp3/internal/connection/ConnectionSpecSelector;->connectionSpecs:Ljava/util/List;
|
|
|
|
.line 64
|
|
invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object p0
|
|
|
|
const-string v1, ", supported protocols="
|
|
|
|
invoke-virtual {p0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object p0
|
|
|
|
.line 65
|
|
invoke-virtual {p1}, Ljavax/net/ssl/SSLSocket;->getEnabledProtocols()[Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-static {p1}, Lkotlin/jvm/internal/Intrinsics;->checkNotNull(Ljava/lang/Object;)V
|
|
|
|
invoke-static {p1}, Ljava/util/Arrays;->toString([Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
const-string v1, "java.util.Arrays.toString(this)"
|
|
|
|
invoke-static {p1, v1}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {p0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
.line 63
|
|
invoke-direct {v0, p0}, Ljava/net/UnknownServiceException;-><init>(Ljava/lang/String;)V
|
|
|
|
check-cast v0, Ljava/lang/Throwable;
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public final connectionFailed(Ljava/io/IOException;)Z
|
|
.locals 2
|
|
|
|
const-string v0, "e"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const/4 v0, 0x1
|
|
|
|
iput-boolean v0, p0, Lokhttp3/internal/connection/ConnectionSpecSelector;->isFallback:Z
|
|
|
|
iget-boolean p0, p0, Lokhttp3/internal/connection/ConnectionSpecSelector;->isFallbackPossible:Z
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-nez p0, :cond_1
|
|
|
|
:cond_0
|
|
:goto_0
|
|
move v0, v1
|
|
|
|
goto :goto_1
|
|
|
|
.line 89
|
|
:cond_1
|
|
instance-of p0, p1, Ljava/net/ProtocolException;
|
|
|
|
if-eqz p0, :cond_2
|
|
|
|
goto :goto_0
|
|
|
|
.line 94
|
|
:cond_2
|
|
instance-of p0, p1, Ljava/io/InterruptedIOException;
|
|
|
|
if-eqz p0, :cond_3
|
|
|
|
goto :goto_0
|
|
|
|
.line 97
|
|
:cond_3
|
|
instance-of p0, p1, Ljavax/net/ssl/SSLHandshakeException;
|
|
|
|
if-eqz p0, :cond_4
|
|
|
|
invoke-virtual {p1}, Ljava/io/IOException;->getCause()Ljava/lang/Throwable;
|
|
|
|
move-result-object p0
|
|
|
|
instance-of p0, p0, Ljava/security/cert/CertificateException;
|
|
|
|
if-eqz p0, :cond_4
|
|
|
|
goto :goto_0
|
|
|
|
.line 100
|
|
:cond_4
|
|
instance-of p0, p1, Ljavax/net/ssl/SSLPeerUnverifiedException;
|
|
|
|
if-eqz p0, :cond_5
|
|
|
|
goto :goto_0
|
|
|
|
.line 103
|
|
:cond_5
|
|
instance-of p0, p1, Ljavax/net/ssl/SSLException;
|
|
|
|
if-eqz p0, :cond_0
|
|
|
|
:goto_1
|
|
return v0
|
|
.end method
|