apkfuckery/com.discord/smali_classes2/okhttp3/j.smali
2019-02-04 21:20:43 +01:00

343 lines
7 KiB
Smali

.class public final Lokhttp3/j;
.super Ljava/lang/Object;
# static fields
.field static final synthetic $assertionsDisabled:Z
.field static final executor:Ljava/util/concurrent/Executor;
# instance fields
.field final bYf:I
.field private final bYg:J
.field final bYh:Ljava/lang/Runnable;
.field final bYi:Ljava/util/Deque;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/Deque<",
"Lokhttp3/internal/b/c;",
">;"
}
.end annotation
.end field
.field final bYj:Lokhttp3/internal/b/d;
.field bYk:Z
# 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
invoke-static {v0, v7}, Lokhttp3/internal/c;->j(Ljava/lang/String;Z)Ljava/util/concurrent/ThreadFactory;
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
iput-object v0, p0, Lokhttp3/j;->bYh:Ljava/lang/Runnable;
new-instance v0, Ljava/util/ArrayDeque;
invoke-direct {v0}, Ljava/util/ArrayDeque;-><init>()V
iput-object v0, p0, Lokhttp3/j;->bYi:Ljava/util/Deque;
new-instance v0, Lokhttp3/internal/b/d;
invoke-direct {v0}, Lokhttp3/internal/b/d;-><init>()V
iput-object v0, p0, Lokhttp3/j;->bYj:Lokhttp3/internal/b/d;
const/4 v0, 0x5
iput v0, p0, Lokhttp3/j;->bYf:I
const-wide/16 v0, 0x5
invoke-virtual {p1, v0, v1}, Ljava/util/concurrent/TimeUnit;->toNanos(J)J
move-result-wide v0
iput-wide v0, p0, Lokhttp3/j;->bYg:J
return-void
.end method
# virtual methods
.method final aR(J)J
.locals 13
monitor-enter p0
:try_start_0
iget-object v0, p0, Lokhttp3/j;->bYi:Ljava/util/Deque;
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;
iget-object v8, v7, Lokhttp3/internal/b/c;->cbV:Ljava/util/List;
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
iget-object v12, v7, Lokhttp3/internal/b/c;->cbN:Lokhttp3/y;
iget-object v12, v12, Lokhttp3/y;->caG:Lokhttp3/a;
iget-object v12, v12, Lokhttp3/a;->bVp:Lokhttp3/s;
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
invoke-static {}, Lokhttp3/internal/g/f;->IL()Lokhttp3/internal/g/f;
move-result-object v12
iget-object v10, v10, Lokhttp3/internal/b/g$a;->cci:Ljava/lang/Object;
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
iput-boolean v10, v7, Lokhttp3/internal/b/c;->cbS:Z
invoke-interface {v8}, Ljava/util/List;->isEmpty()Z
move-result v10
if-eqz v10, :cond_1
iget-wide v8, p0, Lokhttp3/j;->bYg:J
const/4 v10, 0x0
sub-long v8, p1, v8
iput-wide v8, v7, Lokhttp3/internal/b/c;->cbW:J
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
iget-wide v8, v7, Lokhttp3/internal/b/c;->cbW:J
const/4 v10, 0x0
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
iget-wide p1, p0, Lokhttp3/j;->bYg:J
cmp-long v0, v3, p1
if-gez v0, :cond_9
iget p1, p0, Lokhttp3/j;->bYf:I
if-le v2, p1, :cond_6
goto :goto_3
:cond_6
if-lez v2, :cond_7
iget-wide p1, p0, Lokhttp3/j;->bYg:J
const/4 v0, 0x0
sub-long/2addr p1, v3
monitor-exit p0
return-wide p1
:cond_7
if-lez v6, :cond_8
iget-wide p1, p0, Lokhttp3/j;->bYg:J
monitor-exit p0
return-wide p1
:cond_8
iput-boolean v1, p0, Lokhttp3/j;->bYk:Z
const-wide/16 p1, -0x1
monitor-exit p0
return-wide p1
:cond_9
:goto_3
iget-object p1, p0, Lokhttp3/j;->bYi:Ljava/util/Deque;
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
iget-object p1, v5, Lokhttp3/internal/b/c;->cbP:Ljava/net/Socket;
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
.end method