204 lines
4.5 KiB
Smali
204 lines
4.5 KiB
Smali
.class public final Lokhttp3/internal/b/b;
|
|
.super Ljava/lang/Object;
|
|
.source "ConnectionSpecSelector.java"
|
|
|
|
|
|
# instance fields
|
|
.field private final bmb:Ljava/util/List;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/List<",
|
|
"Lokhttp3/k;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private bsA:I
|
|
|
|
.field bsB:Z
|
|
|
|
.field bsC:Z
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Ljava/util/List;)V
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/util/List<",
|
|
"Lokhttp3/k;",
|
|
">;)V"
|
|
}
|
|
.end annotation
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
const/4 v0, 0x0
|
|
|
|
iput v0, p0, Lokhttp3/internal/b/b;->bsA:I
|
|
|
|
iput-object p1, p0, Lokhttp3/internal/b/b;->bmb:Ljava/util/List;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private d(Ljavax/net/ssl/SSLSocket;)Z
|
|
.locals 2
|
|
|
|
iget v0, p0, Lokhttp3/internal/b/b;->bsA:I
|
|
|
|
:goto_0
|
|
iget-object v1, p0, Lokhttp3/internal/b/b;->bmb:Ljava/util/List;
|
|
|
|
invoke-interface {v1}, Ljava/util/List;->size()I
|
|
|
|
move-result v1
|
|
|
|
if-ge v0, v1, :cond_1
|
|
|
|
iget-object v1, p0, Lokhttp3/internal/b/b;->bmb:Ljava/util/List;
|
|
|
|
invoke-interface {v1, v0}, Ljava/util/List;->get(I)Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Lokhttp3/k;
|
|
|
|
invoke-virtual {v1, p1}, Lokhttp3/k;->b(Ljavax/net/ssl/SSLSocket;)Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
const/4 p1, 0x1
|
|
|
|
return p1
|
|
|
|
:cond_0
|
|
add-int/lit8 v0, v0, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
const/4 p1, 0x0
|
|
|
|
return p1
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final c(Ljavax/net/ssl/SSLSocket;)Lokhttp3/k;
|
|
.locals 4
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
iget v0, p0, Lokhttp3/internal/b/b;->bsA:I
|
|
|
|
iget-object v1, p0, Lokhttp3/internal/b/b;->bmb:Ljava/util/List;
|
|
|
|
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/b/b;->bmb:Ljava/util/List;
|
|
|
|
invoke-interface {v2, v0}, Ljava/util/List;->get(I)Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Lokhttp3/k;
|
|
|
|
invoke-virtual {v2, p1}, Lokhttp3/k;->b(Ljavax/net/ssl/SSLSocket;)Z
|
|
|
|
move-result v3
|
|
|
|
if-eqz v3, :cond_0
|
|
|
|
add-int/lit8 v0, v0, 0x1
|
|
|
|
iput v0, p0, Lokhttp3/internal/b/b;->bsA:I
|
|
|
|
goto :goto_1
|
|
|
|
:cond_0
|
|
add-int/lit8 v0, v0, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
const/4 v2, 0x0
|
|
|
|
:goto_1
|
|
if-eqz v2, :cond_2
|
|
|
|
invoke-direct {p0, p1}, Lokhttp3/internal/b/b;->d(Ljavax/net/ssl/SSLSocket;)Z
|
|
|
|
move-result v0
|
|
|
|
iput-boolean v0, p0, Lokhttp3/internal/b/b;->bsB:Z
|
|
|
|
sget-object v0, Lokhttp3/internal/a;->brD:Lokhttp3/internal/a;
|
|
|
|
iget-boolean v1, p0, Lokhttp3/internal/b/b;->bsC:Z
|
|
|
|
invoke-virtual {v0, v2, p1, v1}, Lokhttp3/internal/a;->a(Lokhttp3/k;Ljavax/net/ssl/SSLSocket;Z)V
|
|
|
|
return-object v2
|
|
|
|
: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/b/b;->bsC:Z
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;
|
|
|
|
const-string v2, ", modes="
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
iget-object v2, p0, Lokhttp3/internal/b/b;->bmb:Ljava/util/List;
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
const-string v2, ", supported protocols="
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p1}, Ljavax/net/ssl/SSLSocket;->getEnabledProtocols()[Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-static {p1}, Ljava/util/Arrays;->toString([Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-direct {v0, p1}, Ljava/net/UnknownServiceException;-><init>(Ljava/lang/String;)V
|
|
|
|
goto :goto_3
|
|
|
|
:goto_2
|
|
throw v0
|
|
|
|
:goto_3
|
|
goto :goto_2
|
|
.end method
|