821 lines
19 KiB
Smali
821 lines
19 KiB
Smali
.class public Lokhttp3/t;
|
|
.super Ljava/lang/Object;
|
|
.source "OkHttpClient.java"
|
|
|
|
# interfaces
|
|
.implements Ljava/lang/Cloneable;
|
|
.implements Lokhttp3/e$a;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lokhttp3/t$a;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field static final bsA:Ljava/util/List;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/List<",
|
|
"Lokhttp3/k;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field static final bsz:Ljava/util/List;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/List<",
|
|
"Lokhttp3/u;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
|
|
# instance fields
|
|
.field final boF:Lokhttp3/internal/i/c;
|
|
|
|
.field public final boe:Lokhttp3/o;
|
|
|
|
.field public final bof:Ljavax/net/SocketFactory;
|
|
|
|
.field public final bog:Lokhttp3/b;
|
|
|
|
.field public final boh:Ljava/util/List;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/List<",
|
|
"Lokhttp3/u;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public final boi:Ljava/util/List;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/List<",
|
|
"Lokhttp3/k;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public final boj:Ljava/net/Proxy;
|
|
.annotation runtime Ljavax/annotation/Nullable;
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public final bok:Lokhttp3/g;
|
|
|
|
.field final bom:Lokhttp3/internal/a/e;
|
|
.annotation runtime Ljavax/annotation/Nullable;
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public final bsB:Lokhttp3/n;
|
|
|
|
.field final bsC:Ljava/util/List;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/List<",
|
|
"Lokhttp3/Interceptor;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field final bsD:Ljava/util/List;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/List<",
|
|
"Lokhttp3/Interceptor;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field final bsE:Lokhttp3/p$a;
|
|
|
|
.field final bsF:Lokhttp3/c;
|
|
.annotation runtime Ljavax/annotation/Nullable;
|
|
.end annotation
|
|
.end field
|
|
|
|
.field final bsG:Lokhttp3/b;
|
|
|
|
.field public final bsH:Lokhttp3/j;
|
|
|
|
.field public final bsI:Z
|
|
|
|
.field public final bsJ:Z
|
|
|
|
.field public final bsK:Z
|
|
|
|
.field final bsL:I
|
|
|
|
.field final bsM:I
|
|
|
|
.field final bsN:I
|
|
|
|
.field final bsO:I
|
|
|
|
.field public final bsP:I
|
|
|
|
.field public final cookieJar:Lokhttp3/m;
|
|
|
|
.field public final hostnameVerifier:Ljavax/net/ssl/HostnameVerifier;
|
|
|
|
.field public final proxySelector:Ljava/net/ProxySelector;
|
|
|
|
.field public final sslSocketFactory:Ljavax/net/ssl/SSLSocketFactory;
|
|
|
|
|
|
# direct methods
|
|
.method static constructor <clinit>()V
|
|
.locals 5
|
|
|
|
const/4 v0, 0x2
|
|
|
|
new-array v1, v0, [Lokhttp3/u;
|
|
|
|
sget-object v2, Lokhttp3/u;->bsT:Lokhttp3/u;
|
|
|
|
const/4 v3, 0x0
|
|
|
|
aput-object v2, v1, v3
|
|
|
|
sget-object v2, Lokhttp3/u;->bsR:Lokhttp3/u;
|
|
|
|
const/4 v4, 0x1
|
|
|
|
aput-object v2, v1, v4
|
|
|
|
invoke-static {v1}, Lokhttp3/internal/c;->r([Ljava/lang/Object;)Ljava/util/List;
|
|
|
|
move-result-object v1
|
|
|
|
sput-object v1, Lokhttp3/t;->bsz:Ljava/util/List;
|
|
|
|
new-array v0, v0, [Lokhttp3/k;
|
|
|
|
sget-object v1, Lokhttp3/k;->brj:Lokhttp3/k;
|
|
|
|
aput-object v1, v0, v3
|
|
|
|
sget-object v1, Lokhttp3/k;->brl:Lokhttp3/k;
|
|
|
|
aput-object v1, v0, v4
|
|
|
|
invoke-static {v0}, Lokhttp3/internal/c;->r([Ljava/lang/Object;)Ljava/util/List;
|
|
|
|
move-result-object v0
|
|
|
|
sput-object v0, Lokhttp3/t;->bsA:Ljava/util/List;
|
|
|
|
new-instance v0, Lokhttp3/t$1;
|
|
|
|
invoke-direct {v0}, Lokhttp3/t$1;-><init>()V
|
|
|
|
sput-object v0, Lokhttp3/internal/a;->btK:Lokhttp3/internal/a;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>()V
|
|
.locals 1
|
|
|
|
new-instance v0, Lokhttp3/t$a;
|
|
|
|
invoke-direct {v0}, Lokhttp3/t$a;-><init>()V
|
|
|
|
invoke-direct {p0, v0}, Lokhttp3/t;-><init>(Lokhttp3/t$a;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method constructor <init>(Lokhttp3/t$a;)V
|
|
.locals 4
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
iget-object v0, p1, Lokhttp3/t$a;->bsB:Lokhttp3/n;
|
|
|
|
iput-object v0, p0, Lokhttp3/t;->bsB:Lokhttp3/n;
|
|
|
|
iget-object v0, p1, Lokhttp3/t$a;->boj:Ljava/net/Proxy;
|
|
|
|
iput-object v0, p0, Lokhttp3/t;->boj:Ljava/net/Proxy;
|
|
|
|
iget-object v0, p1, Lokhttp3/t$a;->boh:Ljava/util/List;
|
|
|
|
iput-object v0, p0, Lokhttp3/t;->boh:Ljava/util/List;
|
|
|
|
iget-object v0, p1, Lokhttp3/t$a;->boi:Ljava/util/List;
|
|
|
|
iput-object v0, p0, Lokhttp3/t;->boi:Ljava/util/List;
|
|
|
|
iget-object v0, p1, Lokhttp3/t$a;->bsC:Ljava/util/List;
|
|
|
|
invoke-static {v0}, Lokhttp3/internal/c;->af(Ljava/util/List;)Ljava/util/List;
|
|
|
|
move-result-object v0
|
|
|
|
iput-object v0, p0, Lokhttp3/t;->bsC:Ljava/util/List;
|
|
|
|
iget-object v0, p1, Lokhttp3/t$a;->bsD:Ljava/util/List;
|
|
|
|
invoke-static {v0}, Lokhttp3/internal/c;->af(Ljava/util/List;)Ljava/util/List;
|
|
|
|
move-result-object v0
|
|
|
|
iput-object v0, p0, Lokhttp3/t;->bsD:Ljava/util/List;
|
|
|
|
iget-object v0, p1, Lokhttp3/t$a;->bsE:Lokhttp3/p$a;
|
|
|
|
iput-object v0, p0, Lokhttp3/t;->bsE:Lokhttp3/p$a;
|
|
|
|
iget-object v0, p1, Lokhttp3/t$a;->proxySelector:Ljava/net/ProxySelector;
|
|
|
|
iput-object v0, p0, Lokhttp3/t;->proxySelector:Ljava/net/ProxySelector;
|
|
|
|
iget-object v0, p1, Lokhttp3/t$a;->cookieJar:Lokhttp3/m;
|
|
|
|
iput-object v0, p0, Lokhttp3/t;->cookieJar:Lokhttp3/m;
|
|
|
|
iget-object v0, p1, Lokhttp3/t$a;->bsF:Lokhttp3/c;
|
|
|
|
iput-object v0, p0, Lokhttp3/t;->bsF:Lokhttp3/c;
|
|
|
|
iget-object v0, p1, Lokhttp3/t$a;->bom:Lokhttp3/internal/a/e;
|
|
|
|
iput-object v0, p0, Lokhttp3/t;->bom:Lokhttp3/internal/a/e;
|
|
|
|
iget-object v0, p1, Lokhttp3/t$a;->bof:Ljavax/net/SocketFactory;
|
|
|
|
iput-object v0, p0, Lokhttp3/t;->bof:Ljavax/net/SocketFactory;
|
|
|
|
iget-object v0, p0, Lokhttp3/t;->boi:Ljava/util/List;
|
|
|
|
invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
:cond_0
|
|
const/4 v2, 0x0
|
|
|
|
:goto_0
|
|
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v3
|
|
|
|
if-eqz v3, :cond_2
|
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v3
|
|
|
|
check-cast v3, Lokhttp3/k;
|
|
|
|
if-nez v2, :cond_1
|
|
|
|
iget-boolean v2, v3, Lokhttp3/k;->brm:Z
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
:cond_1
|
|
const/4 v2, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
iget-object v0, p1, Lokhttp3/t$a;->sslSocketFactory:Ljavax/net/ssl/SSLSocketFactory;
|
|
|
|
if-nez v0, :cond_4
|
|
|
|
if-nez v2, :cond_3
|
|
|
|
goto :goto_1
|
|
|
|
:cond_3
|
|
invoke-static {}, Lokhttp3/internal/c;->GV()Ljavax/net/ssl/X509TrustManager;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v0}, Lokhttp3/t;->a(Ljavax/net/ssl/X509TrustManager;)Ljavax/net/ssl/SSLSocketFactory;
|
|
|
|
move-result-object v1
|
|
|
|
iput-object v1, p0, Lokhttp3/t;->sslSocketFactory:Ljavax/net/ssl/SSLSocketFactory;
|
|
|
|
invoke-static {}, Lokhttp3/internal/g/f;->HS()Lokhttp3/internal/g/f;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1, v0}, Lokhttp3/internal/g/f;->b(Ljavax/net/ssl/X509TrustManager;)Lokhttp3/internal/i/c;
|
|
|
|
move-result-object v0
|
|
|
|
iput-object v0, p0, Lokhttp3/t;->boF:Lokhttp3/internal/i/c;
|
|
|
|
goto :goto_2
|
|
|
|
:cond_4
|
|
:goto_1
|
|
iget-object v0, p1, Lokhttp3/t$a;->sslSocketFactory:Ljavax/net/ssl/SSLSocketFactory;
|
|
|
|
iput-object v0, p0, Lokhttp3/t;->sslSocketFactory:Ljavax/net/ssl/SSLSocketFactory;
|
|
|
|
iget-object v0, p1, Lokhttp3/t$a;->boF:Lokhttp3/internal/i/c;
|
|
|
|
iput-object v0, p0, Lokhttp3/t;->boF:Lokhttp3/internal/i/c;
|
|
|
|
:goto_2
|
|
iget-object v0, p0, Lokhttp3/t;->sslSocketFactory:Ljavax/net/ssl/SSLSocketFactory;
|
|
|
|
if-eqz v0, :cond_5
|
|
|
|
invoke-static {}, Lokhttp3/internal/g/f;->HS()Lokhttp3/internal/g/f;
|
|
|
|
move-result-object v0
|
|
|
|
iget-object v1, p0, Lokhttp3/t;->sslSocketFactory:Ljavax/net/ssl/SSLSocketFactory;
|
|
|
|
invoke-virtual {v0, v1}, Lokhttp3/internal/g/f;->c(Ljavax/net/ssl/SSLSocketFactory;)V
|
|
|
|
:cond_5
|
|
iget-object v0, p1, Lokhttp3/t$a;->hostnameVerifier:Ljavax/net/ssl/HostnameVerifier;
|
|
|
|
iput-object v0, p0, Lokhttp3/t;->hostnameVerifier:Ljavax/net/ssl/HostnameVerifier;
|
|
|
|
iget-object v0, p1, Lokhttp3/t$a;->bok:Lokhttp3/g;
|
|
|
|
iget-object v1, p0, Lokhttp3/t;->boF:Lokhttp3/internal/i/c;
|
|
|
|
iget-object v2, v0, Lokhttp3/g;->boF:Lokhttp3/internal/i/c;
|
|
|
|
invoke-static {v2, v1}, Lokhttp3/internal/c;->equal(Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_6
|
|
|
|
goto :goto_3
|
|
|
|
:cond_6
|
|
new-instance v2, Lokhttp3/g;
|
|
|
|
iget-object v0, v0, Lokhttp3/g;->boE:Ljava/util/Set;
|
|
|
|
invoke-direct {v2, v0, v1}, Lokhttp3/g;-><init>(Ljava/util/Set;Lokhttp3/internal/i/c;)V
|
|
|
|
move-object v0, v2
|
|
|
|
:goto_3
|
|
iput-object v0, p0, Lokhttp3/t;->bok:Lokhttp3/g;
|
|
|
|
iget-object v0, p1, Lokhttp3/t$a;->bog:Lokhttp3/b;
|
|
|
|
iput-object v0, p0, Lokhttp3/t;->bog:Lokhttp3/b;
|
|
|
|
iget-object v0, p1, Lokhttp3/t$a;->bsG:Lokhttp3/b;
|
|
|
|
iput-object v0, p0, Lokhttp3/t;->bsG:Lokhttp3/b;
|
|
|
|
iget-object v0, p1, Lokhttp3/t$a;->bsH:Lokhttp3/j;
|
|
|
|
iput-object v0, p0, Lokhttp3/t;->bsH:Lokhttp3/j;
|
|
|
|
iget-object v0, p1, Lokhttp3/t$a;->boe:Lokhttp3/o;
|
|
|
|
iput-object v0, p0, Lokhttp3/t;->boe:Lokhttp3/o;
|
|
|
|
iget-boolean v0, p1, Lokhttp3/t$a;->bsI:Z
|
|
|
|
iput-boolean v0, p0, Lokhttp3/t;->bsI:Z
|
|
|
|
iget-boolean v0, p1, Lokhttp3/t$a;->bsJ:Z
|
|
|
|
iput-boolean v0, p0, Lokhttp3/t;->bsJ:Z
|
|
|
|
iget-boolean v0, p1, Lokhttp3/t$a;->bsK:Z
|
|
|
|
iput-boolean v0, p0, Lokhttp3/t;->bsK:Z
|
|
|
|
iget v0, p1, Lokhttp3/t$a;->bsL:I
|
|
|
|
iput v0, p0, Lokhttp3/t;->bsL:I
|
|
|
|
iget v0, p1, Lokhttp3/t$a;->bsM:I
|
|
|
|
iput v0, p0, Lokhttp3/t;->bsM:I
|
|
|
|
iget v0, p1, Lokhttp3/t$a;->bsN:I
|
|
|
|
iput v0, p0, Lokhttp3/t;->bsN:I
|
|
|
|
iget v0, p1, Lokhttp3/t$a;->bsO:I
|
|
|
|
iput v0, p0, Lokhttp3/t;->bsO:I
|
|
|
|
iget p1, p1, Lokhttp3/t$a;->bsP:I
|
|
|
|
iput p1, p0, Lokhttp3/t;->bsP:I
|
|
|
|
iget-object p1, p0, Lokhttp3/t;->bsC:Ljava/util/List;
|
|
|
|
const/4 v0, 0x0
|
|
|
|
invoke-interface {p1, v0}, Ljava/util/List;->contains(Ljava/lang/Object;)Z
|
|
|
|
move-result p1
|
|
|
|
if-nez p1, :cond_8
|
|
|
|
iget-object p1, p0, Lokhttp3/t;->bsD:Ljava/util/List;
|
|
|
|
invoke-interface {p1, v0}, Ljava/util/List;->contains(Ljava/lang/Object;)Z
|
|
|
|
move-result p1
|
|
|
|
if-nez p1, :cond_7
|
|
|
|
return-void
|
|
|
|
:cond_7
|
|
new-instance p1, Ljava/lang/IllegalStateException;
|
|
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
const-string v1, "Null network interceptor: "
|
|
|
|
invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
|
|
|
|
iget-object v1, p0, Lokhttp3/t;->bsD:Ljava/util/List;
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-direct {p1, v0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
|
|
:cond_8
|
|
new-instance p1, Ljava/lang/IllegalStateException;
|
|
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
const-string v1, "Null interceptor: "
|
|
|
|
invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
|
|
|
|
iget-object v1, p0, Lokhttp3/t;->bsC:Ljava/util/List;
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-direct {p1, v0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
|
|
|
|
goto :goto_5
|
|
|
|
:goto_4
|
|
throw p1
|
|
|
|
:goto_5
|
|
goto :goto_4
|
|
.end method
|
|
|
|
.method private static a(Ljavax/net/ssl/X509TrustManager;)Ljavax/net/ssl/SSLSocketFactory;
|
|
.locals 3
|
|
|
|
:try_start_0
|
|
invoke-static {}, Lokhttp3/internal/g/f;->HS()Lokhttp3/internal/g/f;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lokhttp3/internal/g/f;->HO()Ljavax/net/ssl/SSLContext;
|
|
|
|
move-result-object v0
|
|
|
|
const/4 v1, 0x1
|
|
|
|
new-array v1, v1, [Ljavax/net/ssl/TrustManager;
|
|
|
|
const/4 v2, 0x0
|
|
|
|
aput-object p0, v1, v2
|
|
|
|
const/4 p0, 0x0
|
|
|
|
invoke-virtual {v0, p0, v1, p0}, Ljavax/net/ssl/SSLContext;->init([Ljavax/net/ssl/KeyManager;[Ljavax/net/ssl/TrustManager;Ljava/security/SecureRandom;)V
|
|
|
|
invoke-virtual {v0}, Ljavax/net/ssl/SSLContext;->getSocketFactory()Ljavax/net/ssl/SSLSocketFactory;
|
|
|
|
move-result-object p0
|
|
:try_end_0
|
|
.catch Ljava/security/GeneralSecurityException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
return-object p0
|
|
|
|
:catch_0
|
|
move-exception p0
|
|
|
|
const-string v0, "No System TLS"
|
|
|
|
invoke-static {v0, p0}, Lokhttp3/internal/c;->a(Ljava/lang/String;Ljava/lang/Exception;)Ljava/lang/AssertionError;
|
|
|
|
move-result-object p0
|
|
|
|
throw p0
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method final GF()Lokhttp3/internal/a/e;
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lokhttp3/t;->bsF:Lokhttp3/c;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
iget-object v0, v0, Lokhttp3/c;->bom:Lokhttp3/internal/a/e;
|
|
|
|
return-object v0
|
|
|
|
:cond_0
|
|
iget-object v0, p0, Lokhttp3/t;->bom:Lokhttp3/internal/a/e;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final a(Lokhttp3/w;Lokhttp3/WebSocketListener;)Lokhttp3/WebSocket;
|
|
.locals 7
|
|
|
|
new-instance v6, Lokhttp3/internal/j/a;
|
|
|
|
new-instance v3, Ljava/util/Random;
|
|
|
|
invoke-direct {v3}, Ljava/util/Random;-><init>()V
|
|
|
|
iget v0, p0, Lokhttp3/t;->bsP:I
|
|
|
|
int-to-long v4, v0
|
|
|
|
move-object v0, v6
|
|
|
|
move-object v1, p1
|
|
|
|
move-object v2, p2
|
|
|
|
invoke-direct/range {v0 .. v5}, Lokhttp3/internal/j/a;-><init>(Lokhttp3/w;Lokhttp3/WebSocketListener;Ljava/util/Random;J)V
|
|
|
|
new-instance p1, Lokhttp3/t$a;
|
|
|
|
invoke-direct {p1, p0}, Lokhttp3/t$a;-><init>(Lokhttp3/t;)V
|
|
|
|
sget-object p2, Lokhttp3/p;->brI:Lokhttp3/p;
|
|
|
|
if-eqz p2, :cond_6
|
|
|
|
invoke-static {p2}, Lokhttp3/p;->a(Lokhttp3/p;)Lokhttp3/p$a;
|
|
|
|
move-result-object p2
|
|
|
|
iput-object p2, p1, Lokhttp3/t$a;->bsE:Lokhttp3/p$a;
|
|
|
|
sget-object p2, Lokhttp3/internal/j/a;->byt:Ljava/util/List;
|
|
|
|
new-instance v0, Ljava/util/ArrayList;
|
|
|
|
invoke-direct {v0, p2}, Ljava/util/ArrayList;-><init>(Ljava/util/Collection;)V
|
|
|
|
sget-object p2, Lokhttp3/u;->bsU:Lokhttp3/u;
|
|
|
|
invoke-interface {v0, p2}, Ljava/util/List;->contains(Ljava/lang/Object;)Z
|
|
|
|
move-result p2
|
|
|
|
if-nez p2, :cond_1
|
|
|
|
sget-object p2, Lokhttp3/u;->bsR:Lokhttp3/u;
|
|
|
|
invoke-interface {v0, p2}, Ljava/util/List;->contains(Ljava/lang/Object;)Z
|
|
|
|
move-result p2
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
new-instance p1, Ljava/lang/IllegalArgumentException;
|
|
|
|
invoke-static {v0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
const-string v0, "protocols must contain h2_prior_knowledge or http/1.1: "
|
|
|
|
invoke-virtual {v0, p2}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
|
|
:cond_1
|
|
:goto_0
|
|
sget-object p2, Lokhttp3/u;->bsU:Lokhttp3/u;
|
|
|
|
invoke-interface {v0, p2}, Ljava/util/List;->contains(Ljava/lang/Object;)Z
|
|
|
|
move-result p2
|
|
|
|
if-eqz p2, :cond_3
|
|
|
|
invoke-interface {v0}, Ljava/util/List;->size()I
|
|
|
|
move-result p2
|
|
|
|
const/4 v1, 0x1
|
|
|
|
if-gt p2, v1, :cond_2
|
|
|
|
goto :goto_1
|
|
|
|
:cond_2
|
|
new-instance p1, Ljava/lang/IllegalArgumentException;
|
|
|
|
invoke-static {v0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
const-string v0, "protocols containing h2_prior_knowledge cannot use other protocols: "
|
|
|
|
invoke-virtual {v0, p2}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
|
|
:cond_3
|
|
:goto_1
|
|
sget-object p2, Lokhttp3/u;->bsQ:Lokhttp3/u;
|
|
|
|
invoke-interface {v0, p2}, Ljava/util/List;->contains(Ljava/lang/Object;)Z
|
|
|
|
move-result p2
|
|
|
|
if-nez p2, :cond_5
|
|
|
|
const/4 p2, 0x0
|
|
|
|
invoke-interface {v0, p2}, Ljava/util/List;->contains(Ljava/lang/Object;)Z
|
|
|
|
move-result p2
|
|
|
|
if-nez p2, :cond_4
|
|
|
|
sget-object p2, Lokhttp3/u;->bsS:Lokhttp3/u;
|
|
|
|
invoke-interface {v0, p2}, Ljava/util/List;->remove(Ljava/lang/Object;)Z
|
|
|
|
invoke-static {v0}, Ljava/util/Collections;->unmodifiableList(Ljava/util/List;)Ljava/util/List;
|
|
|
|
move-result-object p2
|
|
|
|
iput-object p2, p1, Lokhttp3/t$a;->boh:Ljava/util/List;
|
|
|
|
invoke-virtual {p1}, Lokhttp3/t$a;->GG()Lokhttp3/t;
|
|
|
|
move-result-object p1
|
|
|
|
iget-object p2, v6, Lokhttp3/internal/j/a;->btb:Lokhttp3/w;
|
|
|
|
invoke-virtual {p2}, Lokhttp3/w;->GN()Lokhttp3/w$a;
|
|
|
|
move-result-object p2
|
|
|
|
const-string v0, "Upgrade"
|
|
|
|
const-string v1, "websocket"
|
|
|
|
invoke-virtual {p2, v0, v1}, Lokhttp3/w$a;->ap(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/w$a;
|
|
|
|
move-result-object p2
|
|
|
|
const-string v1, "Connection"
|
|
|
|
invoke-virtual {p2, v1, v0}, Lokhttp3/w$a;->ap(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/w$a;
|
|
|
|
move-result-object p2
|
|
|
|
iget-object v0, v6, Lokhttp3/internal/j/a;->key:Ljava/lang/String;
|
|
|
|
const-string v1, "Sec-WebSocket-Key"
|
|
|
|
invoke-virtual {p2, v1, v0}, Lokhttp3/w$a;->ap(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/w$a;
|
|
|
|
move-result-object p2
|
|
|
|
const-string v0, "Sec-WebSocket-Version"
|
|
|
|
const-string v1, "13"
|
|
|
|
invoke-virtual {p2, v0, v1}, Lokhttp3/w$a;->ap(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/w$a;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-virtual {p2}, Lokhttp3/w$a;->GP()Lokhttp3/w;
|
|
|
|
move-result-object p2
|
|
|
|
sget-object v0, Lokhttp3/internal/a;->btK:Lokhttp3/internal/a;
|
|
|
|
invoke-virtual {v0, p1, p2}, Lokhttp3/internal/a;->a(Lokhttp3/t;Lokhttp3/w;)Lokhttp3/e;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, v6, Lokhttp3/internal/j/a;->buX:Lokhttp3/e;
|
|
|
|
iget-object p1, v6, Lokhttp3/internal/j/a;->buX:Lokhttp3/e;
|
|
|
|
invoke-interface {p1}, Lokhttp3/e;->timeout()Lokio/s;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Lokio/s;->IC()Lokio/s;
|
|
|
|
iget-object p1, v6, Lokhttp3/internal/j/a;->buX:Lokhttp3/e;
|
|
|
|
new-instance v0, Lokhttp3/internal/j/a$2;
|
|
|
|
invoke-direct {v0, v6, p2}, Lokhttp3/internal/j/a$2;-><init>(Lokhttp3/internal/j/a;Lokhttp3/w;)V
|
|
|
|
invoke-interface {p1, v0}, Lokhttp3/e;->a(Lokhttp3/f;)V
|
|
|
|
return-object v6
|
|
|
|
:cond_4
|
|
new-instance p1, Ljava/lang/IllegalArgumentException;
|
|
|
|
const-string p2, "protocols must not contain null"
|
|
|
|
invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
|
|
:cond_5
|
|
new-instance p1, Ljava/lang/IllegalArgumentException;
|
|
|
|
invoke-static {v0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
const-string v0, "protocols must not contain http/1.0: "
|
|
|
|
invoke-virtual {v0, p2}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
|
|
:cond_6
|
|
new-instance p1, Ljava/lang/NullPointerException;
|
|
|
|
const-string p2, "eventListener == null"
|
|
|
|
invoke-direct {p1, p2}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public final a(Lokhttp3/w;)Lokhttp3/e;
|
|
.locals 1
|
|
|
|
const/4 v0, 0x0
|
|
|
|
invoke-static {p0, p1, v0}, Lokhttp3/v;->a(Lokhttp3/t;Lokhttp3/w;Z)Lokhttp3/v;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
.end method
|