281 lines
		
	
	
		
			6.2 KiB
		
	
	
	
		
			Smali
		
	
	
	
	
	
			
		
		
	
	
			281 lines
		
	
	
		
			6.2 KiB
		
	
	
	
		
			Smali
		
	
	
	
	
	
| .class public Leg/k0;
 | |
| .super Leg/q;
 | |
| .source "SystemDefaultRoutePlanner.java"
 | |
| 
 | |
| 
 | |
| # annotations
 | |
| .annotation build Lcz/msebera/android/httpclient/annotation/Immutable;
 | |
| .end annotation
 | |
| 
 | |
| 
 | |
| # instance fields
 | |
| .field public final b:Ljava/net/ProxySelector;
 | |
| 
 | |
| 
 | |
| # direct methods
 | |
| .method public constructor <init>(Ljava/net/ProxySelector;)V
 | |
|     .locals 1
 | |
| 
 | |
|     const/4 v0, 0x0
 | |
| 
 | |
|     .line 3
 | |
|     invoke-direct {p0, v0, p1}, Leg/k0;-><init>(Lqf/t;Ljava/net/ProxySelector;)V
 | |
| 
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public constructor <init>(Lqf/t;Ljava/net/ProxySelector;)V
 | |
|     .locals 0
 | |
| 
 | |
|     .line 1
 | |
|     invoke-direct {p0, p1}, Leg/q;-><init>(Lqf/t;)V
 | |
| 
 | |
|     if-eqz p2, :cond_0
 | |
| 
 | |
|     goto :goto_0
 | |
| 
 | |
|     .line 2
 | |
|     :cond_0
 | |
|     invoke-static {}, Ljava/net/ProxySelector;->getDefault()Ljava/net/ProxySelector;
 | |
| 
 | |
|     move-result-object p2
 | |
| 
 | |
|     :goto_0
 | |
|     iput-object p2, p0, Leg/k0;->b:Ljava/net/ProxySelector;
 | |
| 
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| 
 | |
| # virtual methods
 | |
| .method public b(Lcz/msebera/android/httpclient/HttpHost;Ldf/q;Lpg/g;)Lcz/msebera/android/httpclient/HttpHost;
 | |
|     .locals 2
 | |
|     .annotation system Ldalvik/annotation/Throws;
 | |
|         value = {
 | |
|             Lcz/msebera/android/httpclient/HttpException;
 | |
|         }
 | |
|     .end annotation
 | |
| 
 | |
|     .line 1
 | |
|     :try_start_0
 | |
|     new-instance p2, Ljava/net/URI;
 | |
| 
 | |
|     invoke-virtual {p1}, Lcz/msebera/android/httpclient/HttpHost;->toURI()Ljava/lang/String;
 | |
| 
 | |
|     move-result-object p3
 | |
| 
 | |
|     invoke-direct {p2, p3}, Ljava/net/URI;-><init>(Ljava/lang/String;)V
 | |
|     :try_end_0
 | |
|     .catch Ljava/net/URISyntaxException; {:try_start_0 .. :try_end_0} :catch_0
 | |
| 
 | |
|     .line 2
 | |
|     iget-object p1, p0, Leg/k0;->b:Ljava/net/ProxySelector;
 | |
| 
 | |
|     invoke-virtual {p1, p2}, Ljava/net/ProxySelector;->select(Ljava/net/URI;)Ljava/util/List;
 | |
| 
 | |
|     move-result-object p1
 | |
| 
 | |
|     .line 3
 | |
|     invoke-virtual {p0, p1}, Leg/k0;->c(Ljava/util/List;)Ljava/net/Proxy;
 | |
| 
 | |
|     move-result-object p1
 | |
| 
 | |
|     const/4 p2, 0x0
 | |
| 
 | |
|     .line 4
 | |
|     invoke-virtual {p1}, Ljava/net/Proxy;->type()Ljava/net/Proxy$Type;
 | |
| 
 | |
|     move-result-object p3
 | |
| 
 | |
|     sget-object v0, Ljava/net/Proxy$Type;->HTTP:Ljava/net/Proxy$Type;
 | |
| 
 | |
|     if-ne p3, v0, :cond_1
 | |
| 
 | |
|     .line 5
 | |
|     invoke-virtual {p1}, Ljava/net/Proxy;->address()Ljava/net/SocketAddress;
 | |
| 
 | |
|     move-result-object p2
 | |
| 
 | |
|     instance-of p2, p2, Ljava/net/InetSocketAddress;
 | |
| 
 | |
|     if-eqz p2, :cond_0
 | |
| 
 | |
|     .line 6
 | |
|     invoke-virtual {p1}, Ljava/net/Proxy;->address()Ljava/net/SocketAddress;
 | |
| 
 | |
|     move-result-object p1
 | |
| 
 | |
|     check-cast p1, Ljava/net/InetSocketAddress;
 | |
| 
 | |
|     .line 7
 | |
|     new-instance p2, Lcz/msebera/android/httpclient/HttpHost;
 | |
| 
 | |
|     invoke-virtual {p0, p1}, Leg/k0;->d(Ljava/net/InetSocketAddress;)Ljava/lang/String;
 | |
| 
 | |
|     move-result-object p3
 | |
| 
 | |
|     invoke-virtual {p1}, Ljava/net/InetSocketAddress;->getPort()I
 | |
| 
 | |
|     move-result p1
 | |
| 
 | |
|     invoke-direct {p2, p3, p1}, Lcz/msebera/android/httpclient/HttpHost;-><init>(Ljava/lang/String;I)V
 | |
| 
 | |
|     goto :goto_0
 | |
| 
 | |
|     .line 8
 | |
|     :cond_0
 | |
|     new-instance p2, Lcz/msebera/android/httpclient/HttpException;
 | |
| 
 | |
|     const-string p3, "Unable to handle non-Inet proxy address: "
 | |
| 
 | |
|     invoke-static {p3}, Landroid/support/v4/media/d;->a(Ljava/lang/String;)Ljava/lang/StringBuilder;
 | |
| 
 | |
|     move-result-object p3
 | |
| 
 | |
|     invoke-virtual {p1}, Ljava/net/Proxy;->address()Ljava/net/SocketAddress;
 | |
| 
 | |
|     move-result-object p1
 | |
| 
 | |
|     invoke-virtual {p3, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
 | |
| 
 | |
|     invoke-virtual {p3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
 | |
| 
 | |
|     move-result-object p1
 | |
| 
 | |
|     invoke-direct {p2, p1}, Lcz/msebera/android/httpclient/HttpException;-><init>(Ljava/lang/String;)V
 | |
| 
 | |
|     throw p2
 | |
| 
 | |
|     :cond_1
 | |
|     :goto_0
 | |
|     return-object p2
 | |
| 
 | |
|     :catch_0
 | |
|     move-exception p2
 | |
| 
 | |
|     .line 9
 | |
|     new-instance p3, Lcz/msebera/android/httpclient/HttpException;
 | |
| 
 | |
|     new-instance v0, Ljava/lang/StringBuilder;
 | |
| 
 | |
|     invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
 | |
| 
 | |
|     const-string v1, "Cannot convert host to URI: "
 | |
| 
 | |
|     invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
 | |
| 
 | |
|     invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
 | |
| 
 | |
|     invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
 | |
| 
 | |
|     move-result-object p1
 | |
| 
 | |
|     invoke-direct {p3, p1, p2}, Lcz/msebera/android/httpclient/HttpException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
 | |
| 
 | |
|     throw p3
 | |
| .end method
 | |
| 
 | |
| .method public final c(Ljava/util/List;)Ljava/net/Proxy;
 | |
|     .locals 5
 | |
|     .annotation system Ldalvik/annotation/Signature;
 | |
|         value = {
 | |
|             "(",
 | |
|             "Ljava/util/List<",
 | |
|             "Ljava/net/Proxy;",
 | |
|             ">;)",
 | |
|             "Ljava/net/Proxy;"
 | |
|         }
 | |
|     .end annotation
 | |
| 
 | |
|     const/4 v0, 0x0
 | |
| 
 | |
|     const/4 v1, 0x0
 | |
| 
 | |
|     :goto_0
 | |
|     if-nez v0, :cond_1
 | |
| 
 | |
|     .line 1
 | |
|     invoke-interface {p1}, Ljava/util/List;->size()I
 | |
| 
 | |
|     move-result v2
 | |
| 
 | |
|     if-ge v1, v2, :cond_1
 | |
| 
 | |
|     .line 2
 | |
|     invoke-interface {p1, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;
 | |
| 
 | |
|     move-result-object v2
 | |
| 
 | |
|     check-cast v2, Ljava/net/Proxy;
 | |
| 
 | |
|     .line 3
 | |
|     sget-object v3, Leg/k0$a;->a:[I
 | |
| 
 | |
|     invoke-virtual {v2}, Ljava/net/Proxy;->type()Ljava/net/Proxy$Type;
 | |
| 
 | |
|     move-result-object v4
 | |
| 
 | |
|     invoke-virtual {v4}, Ljava/net/Proxy$Type;->ordinal()I
 | |
| 
 | |
|     move-result v4
 | |
| 
 | |
|     aget v3, v3, v4
 | |
| 
 | |
|     const/4 v4, 0x1
 | |
| 
 | |
|     if-eq v3, v4, :cond_0
 | |
| 
 | |
|     const/4 v4, 0x2
 | |
| 
 | |
|     if-eq v3, v4, :cond_0
 | |
| 
 | |
|     goto :goto_1
 | |
| 
 | |
|     :cond_0
 | |
|     move-object v0, v2
 | |
| 
 | |
|     :goto_1
 | |
|     add-int/lit8 v1, v1, 0x1
 | |
| 
 | |
|     goto :goto_0
 | |
| 
 | |
|     :cond_1
 | |
|     if-nez v0, :cond_2
 | |
| 
 | |
|     .line 4
 | |
|     sget-object v0, Ljava/net/Proxy;->NO_PROXY:Ljava/net/Proxy;
 | |
| 
 | |
|     :cond_2
 | |
|     return-object v0
 | |
| .end method
 | |
| 
 | |
| .method public final d(Ljava/net/InetSocketAddress;)Ljava/lang/String;
 | |
|     .locals 1
 | |
| 
 | |
|     .line 1
 | |
|     invoke-virtual {p1}, Ljava/net/InetSocketAddress;->isUnresolved()Z
 | |
| 
 | |
|     move-result v0
 | |
| 
 | |
|     if-eqz v0, :cond_0
 | |
| 
 | |
|     .line 2
 | |
|     invoke-virtual {p1}, Ljava/net/InetSocketAddress;->getHostName()Ljava/lang/String;
 | |
| 
 | |
|     move-result-object p1
 | |
| 
 | |
|     goto :goto_0
 | |
| 
 | |
|     :cond_0
 | |
|     invoke-virtual {p1}, Ljava/net/InetSocketAddress;->getAddress()Ljava/net/InetAddress;
 | |
| 
 | |
|     move-result-object p1
 | |
| 
 | |
|     invoke-virtual {p1}, Ljava/net/InetAddress;->getHostAddress()Ljava/lang/String;
 | |
| 
 | |
|     move-result-object p1
 | |
| 
 | |
|     :goto_0
 | |
|     return-object p1
 | |
| .end method
 |