350 lines
7.4 KiB
Smali
350 lines
7.4 KiB
Smali
.class public Lsf/a;
|
|
.super Ljava/lang/Object;
|
|
.source "BasicRouteDirector.java"
|
|
|
|
# interfaces
|
|
.implements Lsf/b;
|
|
|
|
|
|
# annotations
|
|
.annotation build Lcz/msebera/android/httpclient/annotation/Immutable;
|
|
.end annotation
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>()V
|
|
.locals 0
|
|
|
|
.line 1
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public a(Lcz/msebera/android/httpclient/conn/routing/RouteInfo;Lcz/msebera/android/httpclient/conn/routing/RouteInfo;)I
|
|
.locals 2
|
|
|
|
const-string v0, "Planned route"
|
|
|
|
.line 1
|
|
invoke-static {p1, v0}, Lqg/a;->h(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;
|
|
|
|
if-eqz p2, :cond_2
|
|
|
|
.line 2
|
|
invoke-interface {p2}, Lcz/msebera/android/httpclient/conn/routing/RouteInfo;->getHopCount()I
|
|
|
|
move-result v0
|
|
|
|
const/4 v1, 0x1
|
|
|
|
if-ge v0, v1, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
.line 3
|
|
:cond_0
|
|
invoke-interface {p1}, Lcz/msebera/android/httpclient/conn/routing/RouteInfo;->getHopCount()I
|
|
|
|
move-result v0
|
|
|
|
if-le v0, v1, :cond_1
|
|
|
|
.line 4
|
|
invoke-virtual {p0, p1, p2}, Lsf/a;->d(Lcz/msebera/android/httpclient/conn/routing/RouteInfo;Lcz/msebera/android/httpclient/conn/routing/RouteInfo;)I
|
|
|
|
move-result p1
|
|
|
|
goto :goto_1
|
|
|
|
.line 5
|
|
:cond_1
|
|
invoke-virtual {p0, p1, p2}, Lsf/a;->b(Lcz/msebera/android/httpclient/conn/routing/RouteInfo;Lcz/msebera/android/httpclient/conn/routing/RouteInfo;)I
|
|
|
|
move-result p1
|
|
|
|
goto :goto_1
|
|
|
|
.line 6
|
|
:cond_2
|
|
:goto_0
|
|
invoke-virtual {p0, p1}, Lsf/a;->c(Lcz/msebera/android/httpclient/conn/routing/RouteInfo;)I
|
|
|
|
move-result p1
|
|
|
|
:goto_1
|
|
return p1
|
|
.end method
|
|
|
|
.method public b(Lcz/msebera/android/httpclient/conn/routing/RouteInfo;Lcz/msebera/android/httpclient/conn/routing/RouteInfo;)I
|
|
.locals 3
|
|
|
|
.line 1
|
|
invoke-interface {p2}, Lcz/msebera/android/httpclient/conn/routing/RouteInfo;->getHopCount()I
|
|
|
|
move-result v0
|
|
|
|
const/4 v1, -0x1
|
|
|
|
const/4 v2, 0x1
|
|
|
|
if-le v0, v2, :cond_0
|
|
|
|
return v1
|
|
|
|
.line 2
|
|
:cond_0
|
|
invoke-interface {p1}, Lcz/msebera/android/httpclient/conn/routing/RouteInfo;->getTargetHost()Lcz/msebera/android/httpclient/HttpHost;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-interface {p2}, Lcz/msebera/android/httpclient/conn/routing/RouteInfo;->getTargetHost()Lcz/msebera/android/httpclient/HttpHost;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v0, v2}, Lcz/msebera/android/httpclient/HttpHost;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
return v1
|
|
|
|
.line 3
|
|
:cond_1
|
|
invoke-interface {p1}, Lcz/msebera/android/httpclient/conn/routing/RouteInfo;->isSecure()Z
|
|
|
|
move-result v0
|
|
|
|
invoke-interface {p2}, Lcz/msebera/android/httpclient/conn/routing/RouteInfo;->isSecure()Z
|
|
|
|
move-result v2
|
|
|
|
if-eq v0, v2, :cond_2
|
|
|
|
return v1
|
|
|
|
.line 4
|
|
:cond_2
|
|
invoke-interface {p1}, Lcz/msebera/android/httpclient/conn/routing/RouteInfo;->getLocalAddress()Ljava/net/InetAddress;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_3
|
|
|
|
.line 5
|
|
invoke-interface {p1}, Lcz/msebera/android/httpclient/conn/routing/RouteInfo;->getLocalAddress()Ljava/net/InetAddress;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-interface {p2}, Lcz/msebera/android/httpclient/conn/routing/RouteInfo;->getLocalAddress()Ljava/net/InetAddress;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-virtual {p1, p2}, Ljava/net/InetAddress;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result p1
|
|
|
|
if-nez p1, :cond_3
|
|
|
|
return v1
|
|
|
|
:cond_3
|
|
const/4 p1, 0x0
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method public c(Lcz/msebera/android/httpclient/conn/routing/RouteInfo;)I
|
|
.locals 1
|
|
|
|
.line 1
|
|
invoke-interface {p1}, Lcz/msebera/android/httpclient/conn/routing/RouteInfo;->getHopCount()I
|
|
|
|
move-result p1
|
|
|
|
const/4 v0, 0x1
|
|
|
|
if-le p1, v0, :cond_0
|
|
|
|
const/4 v0, 0x2
|
|
|
|
:cond_0
|
|
return v0
|
|
.end method
|
|
|
|
.method public d(Lcz/msebera/android/httpclient/conn/routing/RouteInfo;Lcz/msebera/android/httpclient/conn/routing/RouteInfo;)I
|
|
.locals 7
|
|
|
|
.line 1
|
|
invoke-interface {p2}, Lcz/msebera/android/httpclient/conn/routing/RouteInfo;->getHopCount()I
|
|
|
|
move-result v0
|
|
|
|
const/4 v1, 0x1
|
|
|
|
const/4 v2, -0x1
|
|
|
|
if-gt v0, v1, :cond_0
|
|
|
|
return v2
|
|
|
|
.line 2
|
|
:cond_0
|
|
invoke-interface {p1}, Lcz/msebera/android/httpclient/conn/routing/RouteInfo;->getTargetHost()Lcz/msebera/android/httpclient/HttpHost;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-interface {p2}, Lcz/msebera/android/httpclient/conn/routing/RouteInfo;->getTargetHost()Lcz/msebera/android/httpclient/HttpHost;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Lcz/msebera/android/httpclient/HttpHost;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
return v2
|
|
|
|
.line 3
|
|
:cond_1
|
|
invoke-interface {p1}, Lcz/msebera/android/httpclient/conn/routing/RouteInfo;->getHopCount()I
|
|
|
|
move-result v0
|
|
|
|
.line 4
|
|
invoke-interface {p2}, Lcz/msebera/android/httpclient/conn/routing/RouteInfo;->getHopCount()I
|
|
|
|
move-result v1
|
|
|
|
if-ge v0, v1, :cond_2
|
|
|
|
return v2
|
|
|
|
:cond_2
|
|
const/4 v3, 0x0
|
|
|
|
move v4, v3
|
|
|
|
:goto_0
|
|
add-int/lit8 v5, v1, -0x1
|
|
|
|
if-ge v4, v5, :cond_4
|
|
|
|
.line 5
|
|
invoke-interface {p1, v4}, Lcz/msebera/android/httpclient/conn/routing/RouteInfo;->getHopTarget(I)Lcz/msebera/android/httpclient/HttpHost;
|
|
|
|
move-result-object v5
|
|
|
|
invoke-interface {p2, v4}, Lcz/msebera/android/httpclient/conn/routing/RouteInfo;->getHopTarget(I)Lcz/msebera/android/httpclient/HttpHost;
|
|
|
|
move-result-object v6
|
|
|
|
invoke-virtual {v5, v6}, Lcz/msebera/android/httpclient/HttpHost;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v5
|
|
|
|
if-nez v5, :cond_3
|
|
|
|
return v2
|
|
|
|
:cond_3
|
|
add-int/lit8 v4, v4, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_4
|
|
if-le v0, v1, :cond_5
|
|
|
|
const/4 p1, 0x4
|
|
|
|
return p1
|
|
|
|
.line 6
|
|
:cond_5
|
|
invoke-interface {p2}, Lcz/msebera/android/httpclient/conn/routing/RouteInfo;->isTunnelled()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_6
|
|
|
|
invoke-interface {p1}, Lcz/msebera/android/httpclient/conn/routing/RouteInfo;->isTunnelled()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_7
|
|
|
|
.line 7
|
|
:cond_6
|
|
invoke-interface {p2}, Lcz/msebera/android/httpclient/conn/routing/RouteInfo;->isLayered()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_8
|
|
|
|
invoke-interface {p1}, Lcz/msebera/android/httpclient/conn/routing/RouteInfo;->isLayered()Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_8
|
|
|
|
:cond_7
|
|
return v2
|
|
|
|
.line 8
|
|
:cond_8
|
|
invoke-interface {p1}, Lcz/msebera/android/httpclient/conn/routing/RouteInfo;->isTunnelled()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_9
|
|
|
|
invoke-interface {p2}, Lcz/msebera/android/httpclient/conn/routing/RouteInfo;->isTunnelled()Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_9
|
|
|
|
const/4 p1, 0x3
|
|
|
|
return p1
|
|
|
|
.line 9
|
|
:cond_9
|
|
invoke-interface {p1}, Lcz/msebera/android/httpclient/conn/routing/RouteInfo;->isLayered()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_a
|
|
|
|
invoke-interface {p2}, Lcz/msebera/android/httpclient/conn/routing/RouteInfo;->isLayered()Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_a
|
|
|
|
const/4 p1, 0x5
|
|
|
|
return p1
|
|
|
|
.line 10
|
|
:cond_a
|
|
invoke-interface {p1}, Lcz/msebera/android/httpclient/conn/routing/RouteInfo;->isSecure()Z
|
|
|
|
move-result p1
|
|
|
|
invoke-interface {p2}, Lcz/msebera/android/httpclient/conn/routing/RouteInfo;->isSecure()Z
|
|
|
|
move-result p2
|
|
|
|
if-eq p1, p2, :cond_b
|
|
|
|
return v2
|
|
|
|
:cond_b
|
|
return v3
|
|
.end method
|