296 lines
8.1 KiB
Smali
296 lines
8.1 KiB
Smali
.class final Lokhttp3/internal/huc/OkHttpURLConnection$NetworkInterceptor;
|
|
.super Ljava/lang/Object;
|
|
.source "OkHttpURLConnection.java"
|
|
|
|
# interfaces
|
|
.implements Lokhttp3/Interceptor;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
value = Lokhttp3/internal/huc/OkHttpURLConnection;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x10
|
|
name = "NetworkInterceptor"
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field final synthetic a:Lokhttp3/internal/huc/OkHttpURLConnection;
|
|
|
|
.field private b:Z
|
|
|
|
|
|
# direct methods
|
|
.method constructor <init>(Lokhttp3/internal/huc/OkHttpURLConnection;)V
|
|
.locals 0
|
|
|
|
.line 589
|
|
iput-object p1, p0, Lokhttp3/internal/huc/OkHttpURLConnection$NetworkInterceptor;->a:Lokhttp3/internal/huc/OkHttpURLConnection;
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public a(Lokhttp3/Interceptor$Chain;)Lokhttp3/Response;
|
|
.locals 4
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
.line 601
|
|
invoke-interface {p1}, Lokhttp3/Interceptor$Chain;->a()Lokhttp3/Request;
|
|
|
|
move-result-object v0
|
|
|
|
.line 604
|
|
iget-object v1, p0, Lokhttp3/internal/huc/OkHttpURLConnection$NetworkInterceptor;->a:Lokhttp3/internal/huc/OkHttpURLConnection;
|
|
|
|
iget-object v1, v1, Lokhttp3/internal/huc/OkHttpURLConnection;->e:Lokhttp3/internal/URLFilter;
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
.line 605
|
|
iget-object v1, p0, Lokhttp3/internal/huc/OkHttpURLConnection$NetworkInterceptor;->a:Lokhttp3/internal/huc/OkHttpURLConnection;
|
|
|
|
iget-object v1, v1, Lokhttp3/internal/huc/OkHttpURLConnection;->e:Lokhttp3/internal/URLFilter;
|
|
|
|
invoke-virtual {v0}, Lokhttp3/Request;->a()Lokhttp3/HttpUrl;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v2}, Lokhttp3/HttpUrl;->a()Ljava/net/URL;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-interface {v1, v2}, Lokhttp3/internal/URLFilter;->a(Ljava/net/URL;)V
|
|
|
|
.line 608
|
|
:cond_0
|
|
iget-object v1, p0, Lokhttp3/internal/huc/OkHttpURLConnection$NetworkInterceptor;->a:Lokhttp3/internal/huc/OkHttpURLConnection;
|
|
|
|
invoke-static {v1}, Lokhttp3/internal/huc/OkHttpURLConnection;->a(Lokhttp3/internal/huc/OkHttpURLConnection;)Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
monitor-enter v1
|
|
|
|
.line 609
|
|
:try_start_0
|
|
iget-object v2, p0, Lokhttp3/internal/huc/OkHttpURLConnection$NetworkInterceptor;->a:Lokhttp3/internal/huc/OkHttpURLConnection;
|
|
|
|
const/4 v3, 0x0
|
|
|
|
iput-boolean v3, v2, Lokhttp3/internal/huc/OkHttpURLConnection;->g:Z
|
|
|
|
.line 610
|
|
iget-object v2, p0, Lokhttp3/internal/huc/OkHttpURLConnection$NetworkInterceptor;->a:Lokhttp3/internal/huc/OkHttpURLConnection;
|
|
|
|
invoke-interface {p1}, Lokhttp3/Interceptor$Chain;->b()Lokhttp3/Connection;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-interface {v3}, Lokhttp3/Connection;->a()Lokhttp3/Route;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {v3}, Lokhttp3/Route;->b()Ljava/net/Proxy;
|
|
|
|
move-result-object v3
|
|
|
|
iput-object v3, v2, Lokhttp3/internal/huc/OkHttpURLConnection;->h:Ljava/net/Proxy;
|
|
|
|
.line 611
|
|
iget-object v2, p0, Lokhttp3/internal/huc/OkHttpURLConnection$NetworkInterceptor;->a:Lokhttp3/internal/huc/OkHttpURLConnection;
|
|
|
|
invoke-interface {p1}, Lokhttp3/Interceptor$Chain;->b()Lokhttp3/Connection;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-interface {v3}, Lokhttp3/Connection;->b()Lokhttp3/Handshake;
|
|
|
|
move-result-object v3
|
|
|
|
iput-object v3, v2, Lokhttp3/internal/huc/OkHttpURLConnection;->i:Lokhttp3/Handshake;
|
|
|
|
.line 612
|
|
iget-object v2, p0, Lokhttp3/internal/huc/OkHttpURLConnection$NetworkInterceptor;->a:Lokhttp3/internal/huc/OkHttpURLConnection;
|
|
|
|
invoke-static {v2}, Lokhttp3/internal/huc/OkHttpURLConnection;->a(Lokhttp3/internal/huc/OkHttpURLConnection;)Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v2}, Ljava/lang/Object;->notifyAll()V
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_1
|
|
|
|
.line 615
|
|
:goto_0
|
|
:try_start_1
|
|
iget-boolean v2, p0, Lokhttp3/internal/huc/OkHttpURLConnection$NetworkInterceptor;->b:Z
|
|
|
|
if-nez v2, :cond_1
|
|
|
|
.line 616
|
|
iget-object v2, p0, Lokhttp3/internal/huc/OkHttpURLConnection$NetworkInterceptor;->a:Lokhttp3/internal/huc/OkHttpURLConnection;
|
|
|
|
invoke-static {v2}, Lokhttp3/internal/huc/OkHttpURLConnection;->a(Lokhttp3/internal/huc/OkHttpURLConnection;)Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v2}, Ljava/lang/Object;->wait()V
|
|
:try_end_1
|
|
.catch Ljava/lang/InterruptedException; {:try_start_1 .. :try_end_1} :catch_0
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_1
|
|
|
|
goto :goto_0
|
|
|
|
.line 621
|
|
:cond_1
|
|
:try_start_2
|
|
monitor-exit v1
|
|
:try_end_2
|
|
.catchall {:try_start_2 .. :try_end_2} :catchall_1
|
|
|
|
.line 624
|
|
invoke-virtual {v0}, Lokhttp3/Request;->d()Lokhttp3/RequestBody;
|
|
|
|
move-result-object v1
|
|
|
|
instance-of v1, v1, Lokhttp3/internal/huc/OutputStreamRequestBody;
|
|
|
|
if-eqz v1, :cond_2
|
|
|
|
.line 625
|
|
invoke-virtual {v0}, Lokhttp3/Request;->d()Lokhttp3/RequestBody;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Lokhttp3/internal/huc/OutputStreamRequestBody;
|
|
|
|
.line 626
|
|
invoke-virtual {v1, v0}, Lokhttp3/internal/huc/OutputStreamRequestBody;->a(Lokhttp3/Request;)Lokhttp3/Request;
|
|
|
|
move-result-object v0
|
|
|
|
.line 629
|
|
:cond_2
|
|
invoke-interface {p1, v0}, Lokhttp3/Interceptor$Chain;->a(Lokhttp3/Request;)Lokhttp3/Response;
|
|
|
|
move-result-object p1
|
|
|
|
.line 631
|
|
iget-object v0, p0, Lokhttp3/internal/huc/OkHttpURLConnection$NetworkInterceptor;->a:Lokhttp3/internal/huc/OkHttpURLConnection;
|
|
|
|
invoke-static {v0}, Lokhttp3/internal/huc/OkHttpURLConnection;->a(Lokhttp3/internal/huc/OkHttpURLConnection;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
monitor-enter v0
|
|
|
|
.line 632
|
|
:try_start_3
|
|
iget-object v1, p0, Lokhttp3/internal/huc/OkHttpURLConnection$NetworkInterceptor;->a:Lokhttp3/internal/huc/OkHttpURLConnection;
|
|
|
|
iput-object p1, v1, Lokhttp3/internal/huc/OkHttpURLConnection;->f:Lokhttp3/Response;
|
|
|
|
.line 633
|
|
iget-object v1, p0, Lokhttp3/internal/huc/OkHttpURLConnection$NetworkInterceptor;->a:Lokhttp3/internal/huc/OkHttpURLConnection;
|
|
|
|
invoke-virtual {p1}, Lokhttp3/Response;->a()Lokhttp3/Request;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v2}, Lokhttp3/Request;->a()Lokhttp3/HttpUrl;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v2}, Lokhttp3/HttpUrl;->a()Ljava/net/URL;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-static {v1, v2}, Lokhttp3/internal/huc/OkHttpURLConnection;->a(Lokhttp3/internal/huc/OkHttpURLConnection;Ljava/net/URL;)Ljava/net/URL;
|
|
|
|
.line 634
|
|
monitor-exit v0
|
|
|
|
return-object p1
|
|
|
|
:catchall_0
|
|
move-exception p1
|
|
|
|
monitor-exit v0
|
|
:try_end_3
|
|
.catchall {:try_start_3 .. :try_end_3} :catchall_0
|
|
|
|
throw p1
|
|
|
|
.line 619
|
|
:catch_0
|
|
:try_start_4
|
|
new-instance p1, Ljava/io/InterruptedIOException;
|
|
|
|
invoke-direct {p1}, Ljava/io/InterruptedIOException;-><init>()V
|
|
|
|
throw p1
|
|
|
|
:catchall_1
|
|
move-exception p1
|
|
|
|
.line 621
|
|
monitor-exit v1
|
|
:try_end_4
|
|
.catchall {:try_start_4 .. :try_end_4} :catchall_1
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public a()V
|
|
.locals 2
|
|
|
|
.line 594
|
|
iget-object v0, p0, Lokhttp3/internal/huc/OkHttpURLConnection$NetworkInterceptor;->a:Lokhttp3/internal/huc/OkHttpURLConnection;
|
|
|
|
invoke-static {v0}, Lokhttp3/internal/huc/OkHttpURLConnection;->a(Lokhttp3/internal/huc/OkHttpURLConnection;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
monitor-enter v0
|
|
|
|
const/4 v1, 0x1
|
|
|
|
.line 595
|
|
:try_start_0
|
|
iput-boolean v1, p0, Lokhttp3/internal/huc/OkHttpURLConnection$NetworkInterceptor;->b:Z
|
|
|
|
.line 596
|
|
iget-object v1, p0, Lokhttp3/internal/huc/OkHttpURLConnection$NetworkInterceptor;->a:Lokhttp3/internal/huc/OkHttpURLConnection;
|
|
|
|
invoke-static {v1}, Lokhttp3/internal/huc/OkHttpURLConnection;->a(Lokhttp3/internal/huc/OkHttpURLConnection;)Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1}, Ljava/lang/Object;->notifyAll()V
|
|
|
|
.line 597
|
|
monitor-exit v0
|
|
|
|
return-void
|
|
|
|
:catchall_0
|
|
move-exception v1
|
|
|
|
monitor-exit v0
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
throw v1
|
|
.end method
|