apkfuckery/com.discord/smali_classes2/okhttp3/j.smali

341 lines
6.9 KiB
Smali
Raw Normal View History

2019-02-04 20:08:30 +00:00
.class public final Lokhttp3/j;
.super Ljava/lang/Object;
2019-02-04 20:29:01 +00:00
.source "ConnectionPool.java"
2019-02-04 20:08:30 +00:00
# static fields
.field static final synthetic $assertionsDisabled:Z
.field static final executor:Ljava/util/concurrent/Executor;
# instance fields
2019-02-22 00:19:04 +00:00
.field final blA:I
2019-02-04 20:08:30 +00:00
2019-02-22 00:19:04 +00:00
.field private final blB:J
2019-02-17 00:24:05 +00:00
2019-02-22 00:19:04 +00:00
.field final blC:Ljava/lang/Runnable;
.field final blD:Ljava/util/Deque;
2019-02-04 20:08:30 +00:00
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/Deque<",
"Lokhttp3/internal/b/c;",
">;"
}
.end annotation
.end field
2019-02-22 00:19:04 +00:00
.field final blE:Lokhttp3/internal/b/d;
2019-02-04 20:08:30 +00:00
2019-02-22 00:19:04 +00:00
.field blF:Z
2019-02-04 20:08:30 +00:00
# direct methods
.method static constructor <clinit>()V
.locals 9
new-instance v8, Ljava/util/concurrent/ThreadPoolExecutor;
const/4 v1, 0x0
const v2, 0x7fffffff
const-wide/16 v3, 0x3c
sget-object v5, Ljava/util/concurrent/TimeUnit;->SECONDS:Ljava/util/concurrent/TimeUnit;
new-instance v6, Ljava/util/concurrent/SynchronousQueue;
invoke-direct {v6}, Ljava/util/concurrent/SynchronousQueue;-><init>()V
const-string v0, "OkHttp ConnectionPool"
const/4 v7, 0x1
2019-02-04 20:32:01 +00:00
invoke-static {v0, v7}, Lokhttp3/internal/c;->h(Ljava/lang/String;Z)Ljava/util/concurrent/ThreadFactory;
2019-02-04 20:08:30 +00:00
move-result-object v7
move-object v0, v8
invoke-direct/range {v0 .. v7}, Ljava/util/concurrent/ThreadPoolExecutor;-><init>(IIJLjava/util/concurrent/TimeUnit;Ljava/util/concurrent/BlockingQueue;Ljava/util/concurrent/ThreadFactory;)V
sput-object v8, Lokhttp3/j;->executor:Ljava/util/concurrent/Executor;
return-void
.end method
.method public constructor <init>()V
.locals 1
sget-object v0, Ljava/util/concurrent/TimeUnit;->MINUTES:Ljava/util/concurrent/TimeUnit;
invoke-direct {p0, v0}, Lokhttp3/j;-><init>(Ljava/util/concurrent/TimeUnit;)V
return-void
.end method
.method private constructor <init>(Ljava/util/concurrent/TimeUnit;)V
.locals 2
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
new-instance v0, Lokhttp3/j$1;
invoke-direct {v0, p0}, Lokhttp3/j$1;-><init>(Lokhttp3/j;)V
2019-02-22 00:19:04 +00:00
iput-object v0, p0, Lokhttp3/j;->blC:Ljava/lang/Runnable;
2019-02-04 20:08:30 +00:00
new-instance v0, Ljava/util/ArrayDeque;
invoke-direct {v0}, Ljava/util/ArrayDeque;-><init>()V
2019-02-22 00:19:04 +00:00
iput-object v0, p0, Lokhttp3/j;->blD:Ljava/util/Deque;
2019-02-04 20:08:30 +00:00
new-instance v0, Lokhttp3/internal/b/d;
invoke-direct {v0}, Lokhttp3/internal/b/d;-><init>()V
2019-02-22 00:19:04 +00:00
iput-object v0, p0, Lokhttp3/j;->blE:Lokhttp3/internal/b/d;
2019-02-04 20:08:30 +00:00
const/4 v0, 0x5
2019-02-22 00:19:04 +00:00
iput v0, p0, Lokhttp3/j;->blA:I
2019-02-04 20:08:30 +00:00
const-wide/16 v0, 0x5
invoke-virtual {p1, v0, v1}, Ljava/util/concurrent/TimeUnit;->toNanos(J)J
move-result-wide v0
2019-02-22 00:19:04 +00:00
iput-wide v0, p0, Lokhttp3/j;->blB:J
2019-02-04 20:08:30 +00:00
return-void
.end method
# virtual methods
2019-02-04 20:32:01 +00:00
.method final aj(J)J
2019-02-04 20:08:30 +00:00
.locals 13
monitor-enter p0
:try_start_0
2019-02-22 00:19:04 +00:00
iget-object v0, p0, Lokhttp3/j;->blD:Ljava/util/Deque;
2019-02-04 20:08:30 +00:00
invoke-interface {v0}, Ljava/util/Deque;->iterator()Ljava/util/Iterator;
move-result-object v0
const/4 v1, 0x0
const/4 v2, 0x0
const-wide/high16 v3, -0x8000000000000000L
move-object v5, v2
const/4 v2, 0x0
const/4 v6, 0x0
:cond_0
:goto_0
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
move-result v7
if-eqz v7, :cond_5
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v7
check-cast v7, Lokhttp3/internal/b/c;
2019-02-22 00:19:04 +00:00
iget-object v8, v7, Lokhttp3/internal/b/c;->bpv:Ljava/util/List;
2019-02-04 20:08:30 +00:00
const/4 v9, 0x0
:cond_1
:goto_1
invoke-interface {v8}, Ljava/util/List;->size()I
move-result v10
if-ge v9, v10, :cond_3
invoke-interface {v8, v9}, Ljava/util/List;->get(I)Ljava/lang/Object;
move-result-object v10
check-cast v10, Ljava/lang/ref/Reference;
invoke-virtual {v10}, Ljava/lang/ref/Reference;->get()Ljava/lang/Object;
move-result-object v11
if-eqz v11, :cond_2
add-int/lit8 v9, v9, 0x1
goto :goto_1
:cond_2
check-cast v10, Lokhttp3/internal/b/g$a;
new-instance v11, Ljava/lang/StringBuilder;
const-string v12, "A connection to "
invoke-direct {v11, v12}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
2019-02-22 00:19:04 +00:00
iget-object v12, v7, Lokhttp3/internal/b/c;->bpn:Lokhttp3/y;
2019-02-04 20:08:30 +00:00
2019-02-22 00:19:04 +00:00
iget-object v12, v12, Lokhttp3/y;->boe:Lokhttp3/a;
2019-02-04 20:08:30 +00:00
2019-02-22 00:19:04 +00:00
iget-object v12, v12, Lokhttp3/a;->biE:Lokhttp3/s;
2019-02-04 20:08:30 +00:00
invoke-virtual {v11, v12}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
const-string v12, " was leaked. Did you forget to close a response body?"
invoke-virtual {v11, v12}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v11}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v11
2019-02-21 02:16:48 +00:00
invoke-static {}, Lokhttp3/internal/g/f;->BH()Lokhttp3/internal/g/f;
2019-02-04 20:08:30 +00:00
move-result-object v12
2019-02-22 00:19:04 +00:00
iget-object v10, v10, Lokhttp3/internal/b/g$a;->bpI:Ljava/lang/Object;
2019-02-04 20:08:30 +00:00
invoke-virtual {v12, v11, v10}, Lokhttp3/internal/g/f;->s(Ljava/lang/String;Ljava/lang/Object;)V
invoke-interface {v8, v9}, Ljava/util/List;->remove(I)Ljava/lang/Object;
const/4 v10, 0x1
2019-02-22 00:19:04 +00:00
iput-boolean v10, v7, Lokhttp3/internal/b/c;->bps:Z
2019-02-04 20:08:30 +00:00
invoke-interface {v8}, Ljava/util/List;->isEmpty()Z
move-result v10
if-eqz v10, :cond_1
2019-02-22 00:19:04 +00:00
iget-wide v8, p0, Lokhttp3/j;->blB:J
2019-02-04 20:08:30 +00:00
sub-long v8, p1, v8
2019-02-22 00:19:04 +00:00
iput-wide v8, v7, Lokhttp3/internal/b/c;->bpw:J
2019-02-04 20:08:30 +00:00
const/4 v8, 0x0
goto :goto_2
:cond_3
invoke-interface {v8}, Ljava/util/List;->size()I
move-result v8
:goto_2
if-lez v8, :cond_4
add-int/lit8 v6, v6, 0x1
goto :goto_0
:cond_4
add-int/lit8 v2, v2, 0x1
2019-02-22 00:19:04 +00:00
iget-wide v8, v7, Lokhttp3/internal/b/c;->bpw:J
2019-02-04 20:08:30 +00:00
sub-long v8, p1, v8
cmp-long v10, v8, v3
if-lez v10, :cond_0
move-object v5, v7
move-wide v3, v8
goto :goto_0
:cond_5
2019-02-22 00:19:04 +00:00
iget-wide p1, p0, Lokhttp3/j;->blB:J
2019-02-04 20:08:30 +00:00
cmp-long v0, v3, p1
if-gez v0, :cond_9
2019-02-22 00:19:04 +00:00
iget p1, p0, Lokhttp3/j;->blA:I
2019-02-04 20:08:30 +00:00
if-le v2, p1, :cond_6
goto :goto_3
:cond_6
if-lez v2, :cond_7
2019-02-22 00:19:04 +00:00
iget-wide p1, p0, Lokhttp3/j;->blB:J
2019-02-04 20:08:30 +00:00
sub-long/2addr p1, v3
monitor-exit p0
return-wide p1
:cond_7
if-lez v6, :cond_8
2019-02-22 00:19:04 +00:00
iget-wide p1, p0, Lokhttp3/j;->blB:J
2019-02-04 20:08:30 +00:00
monitor-exit p0
return-wide p1
:cond_8
2019-02-22 00:19:04 +00:00
iput-boolean v1, p0, Lokhttp3/j;->blF:Z
2019-02-04 20:08:30 +00:00
const-wide/16 p1, -0x1
monitor-exit p0
return-wide p1
:cond_9
:goto_3
2019-02-22 00:19:04 +00:00
iget-object p1, p0, Lokhttp3/j;->blD:Ljava/util/Deque;
2019-02-04 20:08:30 +00:00
invoke-interface {p1, v5}, Ljava/util/Deque;->remove(Ljava/lang/Object;)Z
monitor-exit p0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
2019-02-22 00:19:04 +00:00
iget-object p1, v5, Lokhttp3/internal/b/c;->bpp:Ljava/net/Socket;
2019-02-04 20:08:30 +00:00
invoke-static {p1}, Lokhttp3/internal/c;->a(Ljava/net/Socket;)V
const-wide/16 p1, 0x0
return-wide p1
:catchall_0
move-exception p1
:try_start_1
monitor-exit p0
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
throw p1
2019-02-04 20:29:01 +00:00
return-void
2019-02-04 20:08:30 +00:00
.end method