apkfuckery/com.discord/smali_classes2/p0/h.smali
2020-07-14 22:43:59 +00:00

966 lines
19 KiB
Smali

.class public final Lp0/h;
.super Ljava/lang/Object;
.source "OkHttpCall.java"
# interfaces
.implements Lp0/b;
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lp0/h$b;,
Lp0/h$c;
}
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">",
"Ljava/lang/Object;",
"Lp0/b<",
"TT;>;"
}
.end annotation
# instance fields
.field public final d:Lp0/q;
.annotation system Ldalvik/annotation/Signature;
value = {
"Lp0/q<",
"TT;*>;"
}
.end annotation
.end field
.field public final e:[Ljava/lang/Object;
.field public volatile f:Z
.field public g:Lm0/f;
.field public h:Ljava/lang/Throwable;
.field public i:Z
# direct methods
.method public constructor <init>(Lp0/q;[Ljava/lang/Object;)V
.locals 0
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lp0/q<",
"TT;*>;[",
"Ljava/lang/Object;",
")V"
}
.end annotation
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
iput-object p1, p0, Lp0/h;->d:Lp0/q;
iput-object p2, p0, Lp0/h;->e:[Ljava/lang/Object;
return-void
.end method
# virtual methods
.method public X(Lp0/d;)V
.locals 3
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lp0/d<",
"TT;>;)V"
}
.end annotation
const-string v0, "callback == null"
invoke-static {p1, v0}, Lp0/r;->b(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;
monitor-enter p0
:try_start_0
iget-boolean v0, p0, Lp0/h;->i:Z
if-nez v0, :cond_3
const/4 v0, 0x1
iput-boolean v0, p0, Lp0/h;->i:Z
iget-object v0, p0, Lp0/h;->g:Lm0/f;
iget-object v1, p0, Lp0/h;->h:Ljava/lang/Throwable;
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_1
if-nez v0, :cond_0
if-nez v1, :cond_0
:try_start_1
invoke-virtual {p0}, Lp0/h;->b()Lm0/f;
move-result-object v2
iput-object v2, p0, Lp0/h;->g:Lm0/f;
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
move-object v0, v2
goto :goto_0
:catchall_0
move-exception v1
:try_start_2
iput-object v1, p0, Lp0/h;->h:Ljava/lang/Throwable;
:cond_0
:goto_0
monitor-exit p0
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_1
if-eqz v1, :cond_1
invoke-interface {p1, p0, v1}, Lp0/d;->a(Lp0/b;Ljava/lang/Throwable;)V
return-void
:cond_1
iget-boolean v1, p0, Lp0/h;->f:Z
if-eqz v1, :cond_2
invoke-interface {v0}, Lm0/f;->cancel()V
:cond_2
new-instance v1, Lp0/h$a;
invoke-direct {v1, p0, p1}, Lp0/h$a;-><init>(Lp0/h;Lp0/d;)V
invoke-interface {v0, v1}, Lm0/f;->E(Lm0/g;)V
return-void
:cond_3
:try_start_3
new-instance p1, Ljava/lang/IllegalStateException;
const-string v0, "Already executed."
invoke-direct {p1, v0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw p1
:catchall_1
move-exception p1
monitor-exit p0
:try_end_3
.catchall {:try_start_3 .. :try_end_3} :catchall_1
throw p1
.end method
.method public final b()Lm0/f;
.locals 12
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
iget-object v0, p0, Lp0/h;->d:Lp0/q;
iget-object v1, p0, Lp0/h;->e:[Ljava/lang/Object;
new-instance v11, Lp0/m;
iget-object v3, v0, Lp0/q;->e:Ljava/lang/String;
iget-object v4, v0, Lp0/q;->c:Lm0/w;
iget-object v5, v0, Lp0/q;->f:Ljava/lang/String;
iget-object v6, v0, Lp0/q;->g:Lokhttp3/Headers;
iget-object v7, v0, Lp0/q;->h:Lokhttp3/MediaType;
iget-boolean v8, v0, Lp0/q;->i:Z
iget-boolean v9, v0, Lp0/q;->j:Z
iget-boolean v10, v0, Lp0/q;->k:Z
move-object v2, v11
invoke-direct/range {v2 .. v10}, Lp0/m;-><init>(Ljava/lang/String;Lm0/w;Ljava/lang/String;Lokhttp3/Headers;Lokhttp3/MediaType;ZZZ)V
iget-object v0, v0, Lp0/q;->l:[Lp0/k;
const/4 v2, 0x0
if-eqz v1, :cond_0
array-length v3, v1
goto :goto_0
:cond_0
const/4 v3, 0x0
:goto_0
array-length v4, v0
if-ne v3, v4, :cond_a
const/4 v4, 0x0
:goto_1
if-ge v4, v3, :cond_1
aget-object v5, v0, v4
aget-object v6, v1, v4
invoke-virtual {v5, v11, v6}, Lp0/k;->a(Lp0/m;Ljava/lang/Object;)V
add-int/lit8 v4, v4, 0x1
goto :goto_1
:cond_1
iget-object v0, v11, Lp0/m;->d:Lm0/w$a;
if-eqz v0, :cond_2
invoke-virtual {v0}, Lm0/w$a;->b()Lm0/w;
move-result-object v0
goto :goto_2
:cond_2
iget-object v0, v11, Lp0/m;->b:Lm0/w;
iget-object v1, v11, Lp0/m;->c:Ljava/lang/String;
invoke-virtual {v0, v1}, Lm0/w;->j(Ljava/lang/String;)Lm0/w;
move-result-object v0
if-eqz v0, :cond_9
:goto_2
iget-object v1, v11, Lp0/m;->j:Lokhttp3/RequestBody;
if-nez v1, :cond_5
iget-object v3, v11, Lp0/m;->i:Lm0/u$a;
const/4 v4, 0x0
if-eqz v3, :cond_3
new-instance v1, Lm0/u;
iget-object v2, v3, Lm0/u$a;->a:Ljava/util/List;
iget-object v3, v3, Lm0/u$a;->b:Ljava/util/List;
invoke-direct {v1, v2, v3}, Lm0/u;-><init>(Ljava/util/List;Ljava/util/List;)V
goto :goto_3
:cond_3
iget-object v3, v11, Lp0/m;->h:Lokhttp3/MultipartBody$a;
if-eqz v3, :cond_4
invoke-virtual {v3}, Lokhttp3/MultipartBody$a;->b()Lokhttp3/MultipartBody;
move-result-object v1
goto :goto_3
:cond_4
iget-boolean v3, v11, Lp0/m;->g:Z
if-eqz v3, :cond_5
new-array v1, v2, [B
invoke-static {v4, v1}, Lokhttp3/RequestBody;->create(Lokhttp3/MediaType;[B)Lokhttp3/RequestBody;
move-result-object v1
:cond_5
:goto_3
iget-object v2, v11, Lp0/m;->f:Lokhttp3/MediaType;
if-eqz v2, :cond_7
if-eqz v1, :cond_6
new-instance v3, Lp0/m$a;
invoke-direct {v3, v1, v2}, Lp0/m$a;-><init>(Lokhttp3/RequestBody;Lokhttp3/MediaType;)V
move-object v1, v3
goto :goto_4
:cond_6
iget-object v3, v11, Lp0/m;->e:Lm0/a0$a;
iget-object v2, v2, Lokhttp3/MediaType;->a:Ljava/lang/String;
const-string v4, "Content-Type"
invoke-virtual {v3, v4, v2}, Lm0/a0$a;->a(Ljava/lang/String;Ljava/lang/String;)Lm0/a0$a;
:cond_7
:goto_4
iget-object v2, v11, Lp0/m;->e:Lm0/a0$a;
iput-object v0, v2, Lm0/a0$a;->a:Lm0/w;
iget-object v0, v11, Lp0/m;->a:Ljava/lang/String;
invoke-virtual {v2, v0, v1}, Lm0/a0$a;->d(Ljava/lang/String;Lokhttp3/RequestBody;)Lm0/a0$a;
invoke-virtual {v2}, Lm0/a0$a;->b()Lm0/a0;
move-result-object v0
iget-object v1, p0, Lp0/h;->d:Lp0/q;
iget-object v1, v1, Lp0/q;->a:Lm0/f$a;
invoke-interface {v1, v0}, Lm0/f$a;->b(Lm0/a0;)Lm0/f;
move-result-object v0
if-eqz v0, :cond_8
return-object v0
:cond_8
new-instance v0, Ljava/lang/NullPointerException;
const-string v1, "Call.Factory returned null."
invoke-direct {v0, v1}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
throw v0
:cond_9
new-instance v0, Ljava/lang/IllegalArgumentException;
const-string v1, "Malformed URL. Base: "
invoke-static {v1}, Lf/e/b/a/a;->D(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
iget-object v2, v11, Lp0/m;->b:Lm0/w;
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
const-string v2, ", Relative: "
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
iget-object v2, v11, Lp0/m;->c:Ljava/lang/String;
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-direct {v0, v1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw v0
:cond_a
new-instance v1, Ljava/lang/IllegalArgumentException;
const-string v2, "Argument count ("
const-string v4, ") doesn\'t match expected count ("
invoke-static {v2, v3, v4}, Lf/e/b/a/a;->E(Ljava/lang/String;ILjava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v2
array-length v0, v0
const-string v3, ")"
invoke-static {v2, v0, v3}, Lf/e/b/a/a;->s(Ljava/lang/StringBuilder;ILjava/lang/String;)Ljava/lang/String;
move-result-object v0
invoke-direct {v1, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw v1
.end method
.method public c(Lokhttp3/Response;)Lp0/n;
.locals 20
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lokhttp3/Response;",
")",
"Lp0/n<",
"TT;>;"
}
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
move-object/from16 v0, p1
iget-object v1, v0, Lokhttp3/Response;->j:Lokhttp3/ResponseBody;
iget-object v3, v0, Lokhttp3/Response;->d:Lm0/a0;
iget-object v4, v0, Lokhttp3/Response;->e:Lm0/y;
iget v6, v0, Lokhttp3/Response;->g:I
iget-object v5, v0, Lokhttp3/Response;->f:Ljava/lang/String;
iget-object v7, v0, Lokhttp3/Response;->h:Lm0/v;
iget-object v2, v0, Lokhttp3/Response;->i:Lokhttp3/Headers;
invoke-virtual {v2}, Lokhttp3/Headers;->e()Lokhttp3/Headers$a;
move-result-object v2
iget-object v8, v0, Lokhttp3/Response;->j:Lokhttp3/ResponseBody;
iget-object v10, v0, Lokhttp3/Response;->k:Lokhttp3/Response;
iget-object v11, v0, Lokhttp3/Response;->l:Lokhttp3/Response;
iget-object v12, v0, Lokhttp3/Response;->m:Lokhttp3/Response;
iget-wide v13, v0, Lokhttp3/Response;->n:J
iget-wide v8, v0, Lokhttp3/Response;->o:J
iget-object v0, v0, Lokhttp3/Response;->p:Lm0/g0/d/c;
new-instance v15, Lp0/h$c;
move-wide/from16 v16, v8
invoke-virtual {v1}, Lokhttp3/ResponseBody;->b()Lokhttp3/MediaType;
move-result-object v8
move-wide/from16 v18, v13
invoke-virtual {v1}, Lokhttp3/ResponseBody;->a()J
move-result-wide v13
invoke-direct {v15, v8, v13, v14}, Lp0/h$c;-><init>(Lokhttp3/MediaType;J)V
if-ltz v6, :cond_0
const/4 v8, 0x1
goto :goto_0
:cond_0
const/4 v8, 0x0
:goto_0
if-eqz v8, :cond_a
if-eqz v3, :cond_9
if-eqz v4, :cond_8
if-eqz v5, :cond_7
invoke-virtual {v2}, Lokhttp3/Headers$a;->c()Lokhttp3/Headers;
move-result-object v8
new-instance v13, Lokhttp3/Response;
move-object v2, v13
move-object v9, v15
move-object v15, v13
move-wide/from16 v13, v18
move-object/from16 v18, v1
move-object v1, v15
move-wide/from16 v15, v16
move-object/from16 v17, v0
invoke-direct/range {v2 .. v17}, Lokhttp3/Response;-><init>(Lm0/a0;Lm0/y;Ljava/lang/String;ILm0/v;Lokhttp3/Headers;Lokhttp3/ResponseBody;Lokhttp3/Response;Lokhttp3/Response;Lokhttp3/Response;JJLm0/g0/d/c;)V
iget v0, v1, Lokhttp3/Response;->g:I
const/16 v2, 0xc8
const/4 v3, 0x0
if-lt v0, v2, :cond_5
const/16 v2, 0x12c
if-lt v0, v2, :cond_1
goto :goto_2
:cond_1
const/16 v2, 0xcc
if-eq v0, v2, :cond_4
const/16 v2, 0xcd
if-ne v0, v2, :cond_2
goto :goto_1
:cond_2
new-instance v2, Lp0/h$b;
move-object/from16 v4, v18
invoke-direct {v2, v4}, Lp0/h$b;-><init>(Lokhttp3/ResponseBody;)V
move-object/from16 v5, p0
:try_start_0
iget-object v0, v5, Lp0/h;->d:Lp0/q;
iget-object v0, v0, Lp0/q;->d:Lp0/e;
invoke-interface {v0, v2}, Lp0/e;->a(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v0
invoke-static {v0, v1}, Lp0/n;->a(Ljava/lang/Object;Lokhttp3/Response;)Lp0/n;
move-result-object v0
:try_end_0
.catch Ljava/lang/RuntimeException; {:try_start_0 .. :try_end_0} :catch_0
return-object v0
:catch_0
move-exception v0
iget-object v1, v2, Lp0/h$b;->g:Ljava/io/IOException;
if-nez v1, :cond_3
throw v0
:cond_3
throw v1
:cond_4
:goto_1
move-object/from16 v5, p0
move-object/from16 v4, v18
invoke-virtual {v4}, Lokhttp3/ResponseBody;->close()V
invoke-static {v3, v1}, Lp0/n;->a(Ljava/lang/Object;Lokhttp3/Response;)Lp0/n;
move-result-object v0
return-object v0
:cond_5
:goto_2
move-object/from16 v5, p0
move-object/from16 v4, v18
:try_start_1
invoke-static {v4}, Lp0/r;->a(Lokhttp3/ResponseBody;)Lokhttp3/ResponseBody;
move-result-object v0
const-string v2, "body == null"
invoke-static {v0, v2}, Lp0/r;->b(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;
const-string v2, "rawResponse == null"
invoke-static {v1, v2}, Lp0/r;->b(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;
invoke-virtual {v1}, Lokhttp3/Response;->b()Z
move-result v2
if-nez v2, :cond_6
new-instance v2, Lp0/n;
invoke-direct {v2, v1, v3, v0}, Lp0/n;-><init>(Lokhttp3/Response;Ljava/lang/Object;Lokhttp3/ResponseBody;)V
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
invoke-virtual {v4}, Lokhttp3/ResponseBody;->close()V
return-object v2
:cond_6
:try_start_2
new-instance v0, Ljava/lang/IllegalArgumentException;
const-string v1, "rawResponse should not be successful response"
invoke-direct {v0, v1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw v0
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_0
:catchall_0
move-exception v0
invoke-virtual {v4}, Lokhttp3/ResponseBody;->close()V
throw v0
:cond_7
move-object/from16 v5, p0
new-instance v0, Ljava/lang/IllegalStateException;
const-string v1, "message == null"
invoke-virtual {v1}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object v1
invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw v0
:cond_8
move-object/from16 v5, p0
new-instance v0, Ljava/lang/IllegalStateException;
const-string v1, "protocol == null"
invoke-virtual {v1}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object v1
invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw v0
:cond_9
move-object/from16 v5, p0
new-instance v0, Ljava/lang/IllegalStateException;
const-string v1, "request == null"
invoke-virtual {v1}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object v1
invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw v0
:cond_a
move-object/from16 v5, p0
const-string v0, "code < 0: "
invoke-static {v0, v6}, Lf/e/b/a/a;->h(Ljava/lang/String;I)Ljava/lang/String;
move-result-object v0
new-instance v1, Ljava/lang/IllegalStateException;
invoke-virtual {v0}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object v0
invoke-direct {v1, v0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw v1
.end method
.method public cancel()V
.locals 1
const/4 v0, 0x1
iput-boolean v0, p0, Lp0/h;->f:Z
monitor-enter p0
:try_start_0
iget-object v0, p0, Lp0/h;->g:Lm0/f;
monitor-exit p0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
if-eqz v0, :cond_0
invoke-interface {v0}, Lm0/f;->cancel()V
:cond_0
return-void
:catchall_0
move-exception v0
:try_start_1
monitor-exit p0
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
throw v0
.end method
.method public clone()Ljava/lang/Object;
.locals 3
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/lang/CloneNotSupportedException;
}
.end annotation
new-instance v0, Lp0/h;
iget-object v1, p0, Lp0/h;->d:Lp0/q;
iget-object v2, p0, Lp0/h;->e:[Ljava/lang/Object;
invoke-direct {v0, v1, v2}, Lp0/h;-><init>(Lp0/q;[Ljava/lang/Object;)V
return-object v0
.end method
.method public e0()Lp0/b;
.locals 3
new-instance v0, Lp0/h;
iget-object v1, p0, Lp0/h;->d:Lp0/q;
iget-object v2, p0, Lp0/h;->e:[Ljava/lang/Object;
invoke-direct {v0, v1, v2}, Lp0/h;-><init>(Lp0/q;[Ljava/lang/Object;)V
return-object v0
.end method
.method public execute()Lp0/n;
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Lp0/n<",
"TT;>;"
}
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
monitor-enter p0
:try_start_0
iget-boolean v0, p0, Lp0/h;->i:Z
if-nez v0, :cond_4
const/4 v0, 0x1
iput-boolean v0, p0, Lp0/h;->i:Z
iget-object v0, p0, Lp0/h;->h:Ljava/lang/Throwable;
if-eqz v0, :cond_1
iget-object v0, p0, Lp0/h;->h:Ljava/lang/Throwable;
instance-of v0, v0, Ljava/io/IOException;
if-eqz v0, :cond_0
iget-object v0, p0, Lp0/h;->h:Ljava/lang/Throwable;
check-cast v0, Ljava/io/IOException;
throw v0
:cond_0
iget-object v0, p0, Lp0/h;->h:Ljava/lang/Throwable;
check-cast v0, Ljava/lang/RuntimeException;
throw v0
:cond_1
iget-object v0, p0, Lp0/h;->g:Lm0/f;
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
if-nez v0, :cond_2
:try_start_1
invoke-virtual {p0}, Lp0/h;->b()Lm0/f;
move-result-object v0
iput-object v0, p0, Lp0/h;->g:Lm0/f;
:try_end_1
.catch Ljava/io/IOException; {:try_start_1 .. :try_end_1} :catch_1
.catch Ljava/lang/RuntimeException; {:try_start_1 .. :try_end_1} :catch_0
.catchall {:try_start_1 .. :try_end_1} :catchall_0
goto :goto_1
:catch_0
move-exception v0
goto :goto_0
:catch_1
move-exception v0
:goto_0
:try_start_2
iput-object v0, p0, Lp0/h;->h:Ljava/lang/Throwable;
throw v0
:cond_2
:goto_1
monitor-exit p0
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_0
iget-boolean v1, p0, Lp0/h;->f:Z
if-eqz v1, :cond_3
invoke-interface {v0}, Lm0/f;->cancel()V
:cond_3
invoke-interface {v0}, Lm0/f;->execute()Lokhttp3/Response;
move-result-object v0
invoke-virtual {p0, v0}, Lp0/h;->c(Lokhttp3/Response;)Lp0/n;
move-result-object v0
return-object v0
:cond_4
:try_start_3
new-instance v0, Ljava/lang/IllegalStateException;
const-string v1, "Already executed."
invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw v0
:catchall_0
move-exception v0
monitor-exit p0
:try_end_3
.catchall {:try_start_3 .. :try_end_3} :catchall_0
throw v0
.end method
.method public l()Z
.locals 2
iget-boolean v0, p0, Lp0/h;->f:Z
const/4 v1, 0x1
if-eqz v0, :cond_0
return v1
:cond_0
monitor-enter p0
:try_start_0
iget-object v0, p0, Lp0/h;->g:Lm0/f;
if-eqz v0, :cond_1
iget-object v0, p0, Lp0/h;->g:Lm0/f;
invoke-interface {v0}, Lm0/f;->l()Z
move-result v0
if-eqz v0, :cond_1
goto :goto_0
:cond_1
const/4 v1, 0x0
:goto_0
monitor-exit p0
return v1
:catchall_0
move-exception v0
monitor-exit p0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
throw v0
.end method