mirror of
https://github.com/Pinball3D/Rabbit-R1.git
synced 2025-01-09 13:43:22 +00:00
831 lines
23 KiB
Smali
831 lines
23 KiB
Smali
.class public final Lokhttp3/internal/connection/RouteSelector;
|
|
.super Ljava/lang/Object;
|
|
.source "RouteSelector.kt"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lokhttp3/internal/connection/RouteSelector$Selection;,
|
|
Lokhttp3/internal/connection/RouteSelector$Companion;
|
|
}
|
|
.end annotation
|
|
|
|
.annotation runtime Lkotlin/Metadata;
|
|
bv = {
|
|
0x1,
|
|
0x0,
|
|
0x3
|
|
}
|
|
d1 = {
|
|
"\u0000d\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0008\u0002\n\u0002\u0010 \n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0008\n\u0000\n\u0002\u0010!\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000b\n\u0002\u0008\u0002\n\u0002\u0018\u0002\n\u0002\u0008\u0002\n\u0002\u0010\u0002\n\u0002\u0008\u0003\n\u0002\u0018\u0002\n\u0002\u0008\u0003\u0018\u0000 !2\u00020\u0001:\u0002!\"B%\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\u0006\u0010\u0004\u001a\u00020\u0005\u0012\u0006\u0010\u0006\u001a\u00020\u0007\u0012\u0006\u0010\u0008\u001a\u00020\t\u00a2\u0006\u0002\u0010\nJ\t\u0010\u0015\u001a\u00020\u0016H\u0086\u0002J\u0008\u0010\u0017\u001a\u00020\u0016H\u0002J\t\u0010\u0018\u001a\u00020\u0019H\u0086\u0002J\u0008\u0010\u001a\u001a\u00020\u0014H\u0002J\u0010\u0010\u001b\u001a\u00020\u001c2\u0006\u0010\u001d\u001a\u00020\u0014H\u0002J\u001a\u0010\u001e\u001a\u00020\u001c2\u0006\u0010\u001f\u001a\u00020 2\u0008\u0010\u001d\u001a\u0004\u0018\u00010\u0014H\u0002R\u000e\u0010\u0002\u001a\u00020\u0003X\u0082\u0004\u00a2\u0006\u0002\n\u0000R\u000e\u0010\u0006\u001a\u00020\u0007X\u0082\u0004\u00a2\u0006\u0002\n\u0000R\u000e\u0010\u0008\u001a\u00020\tX\u0082\u0004\u00a2\u0006\u0002\n\u0000R\u0014\u0010\u000b\u001a\u0008\u0012\u0004\u0012\u00020\r0\u000cX\u0082\u000e\u00a2\u0006\u0002\n\u0000R\u000e\u0010\u000e\u001a\u00020\u000fX\u0082\u000e\u00a2\u0006\u0002\n\u0000R\u0014\u0010\u0010\u001a\u0008\u0012\u0004\u0012\u00020\u00120\u0011X\u0082\u0004\u00a2\u0006\u0002\n\u0000R\u0014\u0010\u0013\u001a\u0008\u0012\u0004\u0012\u00020\u00140\u000cX\u0082\u000e\u00a2\u0006\u0002\n\u0000R\u000e\u0010\u0004\u001a\u00020\u0005X\u0082\u0004\u00a2\u0006\u0002\n\u0000\u00a8\u0006#"
|
|
}
|
|
d2 = {
|
|
"Lokhttp3/internal/connection/RouteSelector;",
|
|
"",
|
|
"address",
|
|
"Lokhttp3/Address;",
|
|
"routeDatabase",
|
|
"Lokhttp3/internal/connection/RouteDatabase;",
|
|
"call",
|
|
"Lokhttp3/Call;",
|
|
"eventListener",
|
|
"Lokhttp3/EventListener;",
|
|
"(Lokhttp3/Address;Lokhttp3/internal/connection/RouteDatabase;Lokhttp3/Call;Lokhttp3/EventListener;)V",
|
|
"inetSocketAddresses",
|
|
"",
|
|
"Ljava/net/InetSocketAddress;",
|
|
"nextProxyIndex",
|
|
"",
|
|
"postponedRoutes",
|
|
"",
|
|
"Lokhttp3/Route;",
|
|
"proxies",
|
|
"Ljava/net/Proxy;",
|
|
"hasNext",
|
|
"",
|
|
"hasNextProxy",
|
|
"next",
|
|
"Lokhttp3/internal/connection/RouteSelector$Selection;",
|
|
"nextProxy",
|
|
"resetNextInetSocketAddress",
|
|
"",
|
|
"proxy",
|
|
"resetNextProxy",
|
|
"url",
|
|
"Lokhttp3/HttpUrl;",
|
|
"Companion",
|
|
"Selection",
|
|
"okhttp"
|
|
}
|
|
k = 0x1
|
|
mv = {
|
|
0x1,
|
|
0x4,
|
|
0x0
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field public static final Companion:Lokhttp3/internal/connection/RouteSelector$Companion;
|
|
|
|
|
|
# instance fields
|
|
.field private final address:Lokhttp3/Address;
|
|
|
|
.field private final call:Lokhttp3/Call;
|
|
|
|
.field private final eventListener:Lokhttp3/EventListener;
|
|
|
|
.field private inetSocketAddresses:Ljava/util/List;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/List<",
|
|
"+",
|
|
"Ljava/net/InetSocketAddress;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private nextProxyIndex:I
|
|
|
|
.field private final postponedRoutes:Ljava/util/List;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/List<",
|
|
"Lokhttp3/Route;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private proxies:Ljava/util/List;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/List<",
|
|
"+",
|
|
"Ljava/net/Proxy;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private final routeDatabase:Lokhttp3/internal/connection/RouteDatabase;
|
|
|
|
|
|
# direct methods
|
|
.method static constructor <clinit>()V
|
|
.locals 2
|
|
|
|
new-instance v0, Lokhttp3/internal/connection/RouteSelector$Companion;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-direct {v0, v1}, Lokhttp3/internal/connection/RouteSelector$Companion;-><init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
sput-object v0, Lokhttp3/internal/connection/RouteSelector;->Companion:Lokhttp3/internal/connection/RouteSelector$Companion;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Lokhttp3/Address;Lokhttp3/internal/connection/RouteDatabase;Lokhttp3/Call;Lokhttp3/EventListener;)V
|
|
.locals 1
|
|
|
|
const-string v0, "address"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v0, "routeDatabase"
|
|
|
|
invoke-static {p2, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v0, "call"
|
|
|
|
invoke-static {p3, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v0, "eventListener"
|
|
|
|
invoke-static {p4, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
.line 36
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
iput-object p1, p0, Lokhttp3/internal/connection/RouteSelector;->address:Lokhttp3/Address;
|
|
|
|
iput-object p2, p0, Lokhttp3/internal/connection/RouteSelector;->routeDatabase:Lokhttp3/internal/connection/RouteDatabase;
|
|
|
|
iput-object p3, p0, Lokhttp3/internal/connection/RouteSelector;->call:Lokhttp3/Call;
|
|
|
|
iput-object p4, p0, Lokhttp3/internal/connection/RouteSelector;->eventListener:Lokhttp3/EventListener;
|
|
|
|
.line 43
|
|
invoke-static {}, Lkotlin/collections/CollectionsKt;->emptyList()Ljava/util/List;
|
|
|
|
move-result-object p2
|
|
|
|
iput-object p2, p0, Lokhttp3/internal/connection/RouteSelector;->proxies:Ljava/util/List;
|
|
|
|
.line 47
|
|
invoke-static {}, Lkotlin/collections/CollectionsKt;->emptyList()Ljava/util/List;
|
|
|
|
move-result-object p2
|
|
|
|
iput-object p2, p0, Lokhttp3/internal/connection/RouteSelector;->inetSocketAddresses:Ljava/util/List;
|
|
|
|
.line 50
|
|
new-instance p2, Ljava/util/ArrayList;
|
|
|
|
invoke-direct {p2}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
check-cast p2, Ljava/util/List;
|
|
|
|
iput-object p2, p0, Lokhttp3/internal/connection/RouteSelector;->postponedRoutes:Ljava/util/List;
|
|
|
|
.line 53
|
|
invoke-virtual {p1}, Lokhttp3/Address;->url()Lokhttp3/HttpUrl;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-virtual {p1}, Lokhttp3/Address;->proxy()Ljava/net/Proxy;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-direct {p0, p2, p1}, Lokhttp3/internal/connection/RouteSelector;->resetNextProxy(Lokhttp3/HttpUrl;Ljava/net/Proxy;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final synthetic access$getAddress$p(Lokhttp3/internal/connection/RouteSelector;)Lokhttp3/Address;
|
|
.locals 0
|
|
|
|
.line 36
|
|
iget-object p0, p0, Lokhttp3/internal/connection/RouteSelector;->address:Lokhttp3/Address;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method private final hasNextProxy()Z
|
|
.locals 1
|
|
|
|
iget v0, p0, Lokhttp3/internal/connection/RouteSelector;->nextProxyIndex:I
|
|
|
|
iget-object p0, p0, Lokhttp3/internal/connection/RouteSelector;->proxies:Ljava/util/List;
|
|
|
|
.line 119
|
|
invoke-interface {p0}, Ljava/util/List;->size()I
|
|
|
|
move-result p0
|
|
|
|
if-ge v0, p0, :cond_0
|
|
|
|
const/4 p0, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 p0, 0x0
|
|
|
|
:goto_0
|
|
return p0
|
|
.end method
|
|
|
|
.method private final nextProxy()Ljava/net/Proxy;
|
|
.locals 3
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
.line 124
|
|
invoke-direct {p0}, Lokhttp3/internal/connection/RouteSelector;->hasNextProxy()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/connection/RouteSelector;->proxies:Ljava/util/List;
|
|
|
|
iget v1, p0, Lokhttp3/internal/connection/RouteSelector;->nextProxyIndex:I
|
|
|
|
add-int/lit8 v2, v1, 0x1
|
|
|
|
iput v2, p0, Lokhttp3/internal/connection/RouteSelector;->nextProxyIndex:I
|
|
|
|
.line 128
|
|
invoke-interface {v0, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Ljava/net/Proxy;
|
|
|
|
.line 129
|
|
invoke-direct {p0, v0}, Lokhttp3/internal/connection/RouteSelector;->resetNextInetSocketAddress(Ljava/net/Proxy;)V
|
|
|
|
return-object v0
|
|
|
|
.line 125
|
|
:cond_0
|
|
new-instance v0, Ljava/net/SocketException;
|
|
|
|
.line 126
|
|
new-instance v1, Ljava/lang/StringBuilder;
|
|
|
|
const-string v2, "No route to "
|
|
|
|
invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
|
|
|
|
iget-object v2, p0, Lokhttp3/internal/connection/RouteSelector;->address:Lokhttp3/Address;
|
|
|
|
invoke-virtual {v2}, Lokhttp3/Address;->url()Lokhttp3/HttpUrl;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v2}, Lokhttp3/HttpUrl;->host()Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object v1
|
|
|
|
const-string v2, "; exhausted proxy configurations: "
|
|
|
|
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/RouteSelector;->proxies:Ljava/util/List;
|
|
|
|
invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
.line 125
|
|
invoke-direct {v0, p0}, Ljava/net/SocketException;-><init>(Ljava/lang/String;)V
|
|
|
|
check-cast v0, Ljava/lang/Throwable;
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method private final resetNextInetSocketAddress(Ljava/net/Proxy;)V
|
|
.locals 4
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
.line 137
|
|
new-instance v0, Ljava/util/ArrayList;
|
|
|
|
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
check-cast v0, Ljava/util/List;
|
|
|
|
iput-object v0, p0, Lokhttp3/internal/connection/RouteSelector;->inetSocketAddresses:Ljava/util/List;
|
|
|
|
.line 142
|
|
invoke-virtual {p1}, Ljava/net/Proxy;->type()Ljava/net/Proxy$Type;
|
|
|
|
move-result-object v1
|
|
|
|
sget-object v2, Ljava/net/Proxy$Type;->DIRECT:Ljava/net/Proxy$Type;
|
|
|
|
if-eq v1, v2, :cond_2
|
|
|
|
invoke-virtual {p1}, Ljava/net/Proxy;->type()Ljava/net/Proxy$Type;
|
|
|
|
move-result-object v1
|
|
|
|
sget-object v2, Ljava/net/Proxy$Type;->SOCKS:Ljava/net/Proxy$Type;
|
|
|
|
if-ne v1, v2, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
.line 146
|
|
:cond_0
|
|
invoke-virtual {p1}, Ljava/net/Proxy;->address()Ljava/net/SocketAddress;
|
|
|
|
move-result-object v1
|
|
|
|
.line 147
|
|
instance-of v2, v1, Ljava/net/InetSocketAddress;
|
|
|
|
if-eqz v2, :cond_1
|
|
|
|
sget-object v2, Lokhttp3/internal/connection/RouteSelector;->Companion:Lokhttp3/internal/connection/RouteSelector$Companion;
|
|
|
|
.line 150
|
|
check-cast v1, Ljava/net/InetSocketAddress;
|
|
|
|
invoke-virtual {v2, v1}, Lokhttp3/internal/connection/RouteSelector$Companion;->getSocketHost(Ljava/net/InetSocketAddress;)Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
.line 151
|
|
invoke-virtual {v1}, Ljava/net/InetSocketAddress;->getPort()I
|
|
|
|
move-result v1
|
|
|
|
goto :goto_1
|
|
|
|
.line 148
|
|
:cond_1
|
|
new-instance p0, Ljava/lang/StringBuilder;
|
|
|
|
const-string p1, "Proxy.address() is not an InetSocketAddress: "
|
|
|
|
invoke-direct {p0, p1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
.line 147
|
|
new-instance p1, Ljava/lang/IllegalArgumentException;
|
|
|
|
invoke-virtual {p0}, Ljava/lang/Object;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-direct {p1, p0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
check-cast p1, Ljava/lang/Throwable;
|
|
|
|
throw p1
|
|
|
|
:cond_2
|
|
:goto_0
|
|
iget-object v1, p0, Lokhttp3/internal/connection/RouteSelector;->address:Lokhttp3/Address;
|
|
|
|
.line 143
|
|
invoke-virtual {v1}, Lokhttp3/Address;->url()Lokhttp3/HttpUrl;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1}, Lokhttp3/HttpUrl;->host()Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
iget-object v1, p0, Lokhttp3/internal/connection/RouteSelector;->address:Lokhttp3/Address;
|
|
|
|
.line 144
|
|
invoke-virtual {v1}, Lokhttp3/Address;->url()Lokhttp3/HttpUrl;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1}, Lokhttp3/HttpUrl;->port()I
|
|
|
|
move-result v1
|
|
|
|
:goto_1
|
|
const/4 v3, 0x1
|
|
|
|
if-gt v3, v1, :cond_6
|
|
|
|
const v3, 0xffff
|
|
|
|
if-lt v3, v1, :cond_6
|
|
|
|
.line 158
|
|
invoke-virtual {p1}, Ljava/net/Proxy;->type()Ljava/net/Proxy$Type;
|
|
|
|
move-result-object p1
|
|
|
|
sget-object v3, Ljava/net/Proxy$Type;->SOCKS:Ljava/net/Proxy$Type;
|
|
|
|
if-ne p1, v3, :cond_3
|
|
|
|
.line 159
|
|
check-cast v0, Ljava/util/Collection;
|
|
|
|
invoke-static {v2, v1}, Ljava/net/InetSocketAddress;->createUnresolved(Ljava/lang/String;I)Ljava/net/InetSocketAddress;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-interface {v0, p0}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
|
|
|
|
goto :goto_3
|
|
|
|
:cond_3
|
|
iget-object p1, p0, Lokhttp3/internal/connection/RouteSelector;->eventListener:Lokhttp3/EventListener;
|
|
|
|
iget-object v3, p0, Lokhttp3/internal/connection/RouteSelector;->call:Lokhttp3/Call;
|
|
|
|
.line 161
|
|
invoke-virtual {p1, v3, v2}, Lokhttp3/EventListener;->dnsStart(Lokhttp3/Call;Ljava/lang/String;)V
|
|
|
|
iget-object p1, p0, Lokhttp3/internal/connection/RouteSelector;->address:Lokhttp3/Address;
|
|
|
|
.line 164
|
|
invoke-virtual {p1}, Lokhttp3/Address;->dns()Lokhttp3/Dns;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-interface {p1, v2}, Lokhttp3/Dns;->lookup(Ljava/lang/String;)Ljava/util/List;
|
|
|
|
move-result-object p1
|
|
|
|
.line 165
|
|
invoke-interface {p1}, Ljava/util/List;->isEmpty()Z
|
|
|
|
move-result v3
|
|
|
|
if-nez v3, :cond_5
|
|
|
|
iget-object v3, p0, Lokhttp3/internal/connection/RouteSelector;->eventListener:Lokhttp3/EventListener;
|
|
|
|
iget-object p0, p0, Lokhttp3/internal/connection/RouteSelector;->call:Lokhttp3/Call;
|
|
|
|
.line 169
|
|
invoke-virtual {v3, p0, v2, p1}, Lokhttp3/EventListener;->dnsEnd(Lokhttp3/Call;Ljava/lang/String;Ljava/util/List;)V
|
|
|
|
.line 171
|
|
invoke-interface {p1}, Ljava/util/List;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object p0
|
|
|
|
:goto_2
|
|
invoke-interface {p0}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_4
|
|
|
|
invoke-interface {p0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Ljava/net/InetAddress;
|
|
|
|
.line 172
|
|
move-object v2, v0
|
|
|
|
check-cast v2, Ljava/util/Collection;
|
|
|
|
new-instance v3, Ljava/net/InetSocketAddress;
|
|
|
|
invoke-direct {v3, p1, v1}, Ljava/net/InetSocketAddress;-><init>(Ljava/net/InetAddress;I)V
|
|
|
|
invoke-interface {v2, v3}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
|
|
|
|
goto :goto_2
|
|
|
|
:cond_4
|
|
:goto_3
|
|
return-void
|
|
|
|
.line 166
|
|
:cond_5
|
|
new-instance p1, Ljava/net/UnknownHostException;
|
|
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
iget-object p0, p0, Lokhttp3/internal/connection/RouteSelector;->address:Lokhttp3/Address;
|
|
|
|
invoke-virtual {p0}, Lokhttp3/Address;->dns()Lokhttp3/Dns;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {v0, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object p0
|
|
|
|
const-string v0, " returned no addresses for "
|
|
|
|
invoke-virtual {p0, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {p0, v2}, 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
|
|
|
|
invoke-direct {p1, p0}, Ljava/net/UnknownHostException;-><init>(Ljava/lang/String;)V
|
|
|
|
check-cast p1, Ljava/lang/Throwable;
|
|
|
|
throw p1
|
|
|
|
.line 155
|
|
:cond_6
|
|
new-instance p0, Ljava/net/SocketException;
|
|
|
|
new-instance p1, Ljava/lang/StringBuilder;
|
|
|
|
const-string v0, "No route to "
|
|
|
|
invoke-direct {p1, v0}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
|
|
|
|
invoke-virtual {p1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object p1
|
|
|
|
const/16 v0, 0x3a
|
|
|
|
invoke-virtual {p1, v0}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object p1
|
|
|
|
const-string v0, "; port is out of range"
|
|
|
|
invoke-virtual {p1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-direct {p0, p1}, Ljava/net/SocketException;-><init>(Ljava/lang/String;)V
|
|
|
|
check-cast p0, Ljava/lang/Throwable;
|
|
|
|
throw p0
|
|
.end method
|
|
|
|
.method private final resetNextProxy(Lokhttp3/HttpUrl;Ljava/net/Proxy;)V
|
|
.locals 2
|
|
|
|
.line 97
|
|
new-instance v0, Lokhttp3/internal/connection/RouteSelector$resetNextProxy$1;
|
|
|
|
invoke-direct {v0, p0, p2, p1}, Lokhttp3/internal/connection/RouteSelector$resetNextProxy$1;-><init>(Lokhttp3/internal/connection/RouteSelector;Ljava/net/Proxy;Lokhttp3/HttpUrl;)V
|
|
|
|
iget-object p2, p0, Lokhttp3/internal/connection/RouteSelector;->eventListener:Lokhttp3/EventListener;
|
|
|
|
iget-object v1, p0, Lokhttp3/internal/connection/RouteSelector;->call:Lokhttp3/Call;
|
|
|
|
.line 112
|
|
invoke-virtual {p2, v1, p1}, Lokhttp3/EventListener;->proxySelectStart(Lokhttp3/Call;Lokhttp3/HttpUrl;)V
|
|
|
|
.line 113
|
|
invoke-virtual {v0}, Lokhttp3/internal/connection/RouteSelector$resetNextProxy$1;->invoke()Ljava/util/List;
|
|
|
|
move-result-object p2
|
|
|
|
iput-object p2, p0, Lokhttp3/internal/connection/RouteSelector;->proxies:Ljava/util/List;
|
|
|
|
const/4 v0, 0x0
|
|
|
|
iput v0, p0, Lokhttp3/internal/connection/RouteSelector;->nextProxyIndex:I
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/connection/RouteSelector;->eventListener:Lokhttp3/EventListener;
|
|
|
|
iget-object p0, p0, Lokhttp3/internal/connection/RouteSelector;->call:Lokhttp3/Call;
|
|
|
|
.line 115
|
|
invoke-virtual {v0, p0, p1, p2}, Lokhttp3/EventListener;->proxySelectEnd(Lokhttp3/Call;Lokhttp3/HttpUrl;Ljava/util/List;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final hasNext()Z
|
|
.locals 2
|
|
|
|
.line 59
|
|
invoke-direct {p0}, Lokhttp3/internal/connection/RouteSelector;->hasNextProxy()Z
|
|
|
|
move-result v0
|
|
|
|
const/4 v1, 0x1
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
iget-object p0, p0, Lokhttp3/internal/connection/RouteSelector;->postponedRoutes:Ljava/util/List;
|
|
|
|
check-cast p0, Ljava/util/Collection;
|
|
|
|
invoke-interface {p0}, Ljava/util/Collection;->isEmpty()Z
|
|
|
|
move-result p0
|
|
|
|
xor-int/2addr p0, v1
|
|
|
|
if-eqz p0, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v1, 0x0
|
|
|
|
:cond_1
|
|
:goto_0
|
|
return v1
|
|
.end method
|
|
|
|
.method public final next()Lokhttp3/internal/connection/RouteSelector$Selection;
|
|
.locals 6
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
.line 63
|
|
invoke-virtual {p0}, Lokhttp3/internal/connection/RouteSelector;->hasNext()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_5
|
|
|
|
.line 66
|
|
new-instance v0, Ljava/util/ArrayList;
|
|
|
|
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
check-cast v0, Ljava/util/List;
|
|
|
|
.line 67
|
|
:cond_0
|
|
invoke-direct {p0}, Lokhttp3/internal/connection/RouteSelector;->hasNextProxy()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_3
|
|
|
|
.line 71
|
|
invoke-direct {p0}, Lokhttp3/internal/connection/RouteSelector;->nextProxy()Ljava/net/Proxy;
|
|
|
|
move-result-object v1
|
|
|
|
iget-object v2, p0, Lokhttp3/internal/connection/RouteSelector;->inetSocketAddresses:Ljava/util/List;
|
|
|
|
.line 72
|
|
invoke-interface {v2}, Ljava/util/List;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v2
|
|
|
|
:goto_0
|
|
invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v3
|
|
|
|
if-eqz v3, :cond_2
|
|
|
|
invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v3
|
|
|
|
check-cast v3, Ljava/net/InetSocketAddress;
|
|
|
|
.line 73
|
|
new-instance v4, Lokhttp3/Route;
|
|
|
|
iget-object v5, p0, Lokhttp3/internal/connection/RouteSelector;->address:Lokhttp3/Address;
|
|
|
|
invoke-direct {v4, v5, v1, v3}, Lokhttp3/Route;-><init>(Lokhttp3/Address;Ljava/net/Proxy;Ljava/net/InetSocketAddress;)V
|
|
|
|
iget-object v3, p0, Lokhttp3/internal/connection/RouteSelector;->routeDatabase:Lokhttp3/internal/connection/RouteDatabase;
|
|
|
|
.line 74
|
|
invoke-virtual {v3, v4}, Lokhttp3/internal/connection/RouteDatabase;->shouldPostpone(Lokhttp3/Route;)Z
|
|
|
|
move-result v3
|
|
|
|
if-eqz v3, :cond_1
|
|
|
|
iget-object v3, p0, Lokhttp3/internal/connection/RouteSelector;->postponedRoutes:Ljava/util/List;
|
|
|
|
.line 75
|
|
check-cast v3, Ljava/util/Collection;
|
|
|
|
invoke-interface {v3, v4}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
|
|
|
|
goto :goto_0
|
|
|
|
.line 77
|
|
:cond_1
|
|
move-object v3, v0
|
|
|
|
check-cast v3, Ljava/util/Collection;
|
|
|
|
invoke-interface {v3, v4}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
|
|
|
|
goto :goto_0
|
|
|
|
.line 81
|
|
:cond_2
|
|
move-object v1, v0
|
|
|
|
check-cast v1, Ljava/util/Collection;
|
|
|
|
invoke-interface {v1}, Ljava/util/Collection;->isEmpty()Z
|
|
|
|
move-result v1
|
|
|
|
xor-int/lit8 v1, v1, 0x1
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
.line 86
|
|
:cond_3
|
|
invoke-interface {v0}, Ljava/util/List;->isEmpty()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_4
|
|
|
|
.line 88
|
|
move-object v1, v0
|
|
|
|
check-cast v1, Ljava/util/Collection;
|
|
|
|
iget-object v2, p0, Lokhttp3/internal/connection/RouteSelector;->postponedRoutes:Ljava/util/List;
|
|
|
|
check-cast v2, Ljava/lang/Iterable;
|
|
|
|
invoke-static {v1, v2}, Lkotlin/collections/CollectionsKt;->addAll(Ljava/util/Collection;Ljava/lang/Iterable;)Z
|
|
|
|
iget-object p0, p0, Lokhttp3/internal/connection/RouteSelector;->postponedRoutes:Ljava/util/List;
|
|
|
|
.line 89
|
|
invoke-interface {p0}, Ljava/util/List;->clear()V
|
|
|
|
.line 92
|
|
:cond_4
|
|
new-instance p0, Lokhttp3/internal/connection/RouteSelector$Selection;
|
|
|
|
invoke-direct {p0, v0}, Lokhttp3/internal/connection/RouteSelector$Selection;-><init>(Ljava/util/List;)V
|
|
|
|
return-object p0
|
|
|
|
.line 63
|
|
:cond_5
|
|
new-instance p0, Ljava/util/NoSuchElementException;
|
|
|
|
invoke-direct {p0}, Ljava/util/NoSuchElementException;-><init>()V
|
|
|
|
check-cast p0, Ljava/lang/Throwable;
|
|
|
|
throw p0
|
|
.end method
|