2020-05-17 12:40:10 +00:00
|
|
|
.class public Lcom/discord/utilities/error/Error;
|
|
|
|
.super Ljava/lang/Object;
|
|
|
|
.source "Error.java"
|
|
|
|
|
|
|
|
|
|
|
|
# annotations
|
|
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
|
|
value = {
|
|
|
|
Lcom/discord/utilities/error/Error$Response;,
|
2020-08-20 22:29:33 +00:00
|
|
|
Lcom/discord/utilities/error/Error$SkemaError;,
|
|
|
|
Lcom/discord/utilities/error/Error$SkemaErrorItem;,
|
2020-05-17 12:40:10 +00:00
|
|
|
Lcom/discord/utilities/error/Error$Type;
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
|
|
|
|
# static fields
|
2020-07-25 00:57:58 +00:00
|
|
|
.field public static onUnhandledError:Lrx/functions/Action3;
|
2020-05-17 12:40:10 +00:00
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
2020-07-25 00:57:58 +00:00
|
|
|
"Lrx/functions/Action3<",
|
2020-05-17 12:40:10 +00:00
|
|
|
"Ljava/lang/String;",
|
|
|
|
"Ljava/lang/Throwable;",
|
|
|
|
"Ljava/util/Map<",
|
|
|
|
"Ljava/lang/String;",
|
|
|
|
"Ljava/lang/String;",
|
|
|
|
">;>;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
|
|
|
|
|
|
|
# instance fields
|
|
|
|
.field public final bodyText:Ljava/lang/String;
|
|
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
|
|
|
.field public final metadata:Ljava/util/Map;
|
|
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"Ljava/util/Map<",
|
|
|
|
"Ljava/lang/String;",
|
|
|
|
"Ljava/lang/String;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
|
|
|
.field public final response:Lcom/discord/utilities/error/Error$Response;
|
|
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
|
|
|
.field public final shouldLog:Ljava/util/concurrent/atomic/AtomicBoolean;
|
|
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
|
|
|
.field public final showErrorToasts:Ljava/util/concurrent/atomic/AtomicBoolean;
|
|
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
|
|
|
.field public final throwable:Ljava/lang/Throwable;
|
|
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
|
|
|
.field public final type:Lcom/discord/utilities/error/Error$Type;
|
|
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
|
|
|
.method public constructor <init>(Ljava/lang/Throwable;Lcom/discord/utilities/error/Error$Type;Lcom/discord/utilities/error/Error$Response;Ljava/util/Map;Ljava/lang/String;)V
|
|
|
|
.locals 2
|
2020-09-16 23:45:23 +00:00
|
|
|
.param p1 # Ljava/lang/Throwable;
|
|
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
|
|
.end annotation
|
|
|
|
.end param
|
|
|
|
.param p2 # Lcom/discord/utilities/error/Error$Type;
|
|
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
|
|
.end annotation
|
|
|
|
.end param
|
|
|
|
.param p3 # Lcom/discord/utilities/error/Error$Response;
|
|
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
|
|
.end annotation
|
|
|
|
.end param
|
|
|
|
.param p4 # Ljava/util/Map;
|
|
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
|
|
.end annotation
|
|
|
|
.end param
|
|
|
|
.param p5 # Ljava/lang/String;
|
|
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
|
|
.end annotation
|
|
|
|
.end param
|
2020-05-17 12:40:10 +00:00
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(",
|
|
|
|
"Ljava/lang/Throwable;",
|
|
|
|
"Lcom/discord/utilities/error/Error$Type;",
|
|
|
|
"Lcom/discord/utilities/error/Error$Response;",
|
|
|
|
"Ljava/util/Map<",
|
|
|
|
"Ljava/lang/String;",
|
|
|
|
"Ljava/lang/String;",
|
|
|
|
">;",
|
|
|
|
"Ljava/lang/String;",
|
|
|
|
")V"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
|
|
|
|
new-instance v0, Ljava/util/concurrent/atomic/AtomicBoolean;
|
|
|
|
|
|
|
|
const/4 v1, 0x1
|
|
|
|
|
|
|
|
invoke-direct {v0, v1}, Ljava/util/concurrent/atomic/AtomicBoolean;-><init>(Z)V
|
|
|
|
|
|
|
|
iput-object v0, p0, Lcom/discord/utilities/error/Error;->showErrorToasts:Ljava/util/concurrent/atomic/AtomicBoolean;
|
|
|
|
|
|
|
|
new-instance v0, Ljava/util/concurrent/atomic/AtomicBoolean;
|
|
|
|
|
|
|
|
invoke-direct {v0, v1}, Ljava/util/concurrent/atomic/AtomicBoolean;-><init>(Z)V
|
|
|
|
|
|
|
|
iput-object v0, p0, Lcom/discord/utilities/error/Error;->shouldLog:Ljava/util/concurrent/atomic/AtomicBoolean;
|
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
if-eqz p1, :cond_2
|
|
|
|
|
|
|
|
if-eqz p2, :cond_1
|
|
|
|
|
|
|
|
if-eqz p3, :cond_0
|
|
|
|
|
2020-05-17 12:40:10 +00:00
|
|
|
iput-object p1, p0, Lcom/discord/utilities/error/Error;->throwable:Ljava/lang/Throwable;
|
|
|
|
|
|
|
|
iput-object p2, p0, Lcom/discord/utilities/error/Error;->type:Lcom/discord/utilities/error/Error$Type;
|
|
|
|
|
|
|
|
iput-object p3, p0, Lcom/discord/utilities/error/Error;->response:Lcom/discord/utilities/error/Error$Response;
|
|
|
|
|
|
|
|
iput-object p4, p0, Lcom/discord/utilities/error/Error;->metadata:Ljava/util/Map;
|
|
|
|
|
|
|
|
iput-object p5, p0, Lcom/discord/utilities/error/Error;->bodyText:Ljava/lang/String;
|
|
|
|
|
|
|
|
return-void
|
2020-09-16 23:45:23 +00:00
|
|
|
|
|
|
|
:cond_0
|
|
|
|
new-instance p1, Ljava/lang/NullPointerException;
|
|
|
|
|
|
|
|
const-string p2, "response is marked non-null but is null"
|
|
|
|
|
|
|
|
invoke-direct {p1, p2}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
throw p1
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
new-instance p1, Ljava/lang/NullPointerException;
|
|
|
|
|
|
|
|
const-string/jumbo p2, "type is marked non-null but is null"
|
|
|
|
|
|
|
|
invoke-direct {p1, p2}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
throw p1
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
new-instance p1, Ljava/lang/NullPointerException;
|
|
|
|
|
2020-09-23 03:12:49 +00:00
|
|
|
const-string/jumbo p2, "throwable is marked non-null but is null"
|
2020-09-16 23:45:23 +00:00
|
|
|
|
|
|
|
invoke-direct {p1, p2}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
throw p1
|
2020-05-17 12:40:10 +00:00
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static create(Ljava/lang/Throwable;)Lcom/discord/utilities/error/Error;
|
2020-07-08 16:44:49 +00:00
|
|
|
.locals 9
|
2020-05-17 12:40:10 +00:00
|
|
|
.param p0 # Ljava/lang/Throwable;
|
|
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
|
|
.end annotation
|
|
|
|
.end param
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
instance-of v0, p0, Lretrofit2/HttpException;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
const-string v1, ""
|
|
|
|
|
|
|
|
const/4 v2, 0x0
|
|
|
|
|
|
|
|
if-eqz v0, :cond_f
|
|
|
|
|
|
|
|
move-object v0, p0
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
check-cast v0, Lretrofit2/HttpException;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
iget v3, v0, Lretrofit2/HttpException;->code:I
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-05 23:18:16 +00:00
|
|
|
iget-object v0, v0, Lretrofit2/HttpException;->d:Lk0/b0;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
if-eqz v0, :cond_3
|
|
|
|
|
2020-10-05 23:18:16 +00:00
|
|
|
iget-object v4, v0, Lk0/b0;->a:Lokhttp3/Response;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
iget-object v4, v4, Lokhttp3/Response;->i:Lokhttp3/Headers;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-05 23:18:16 +00:00
|
|
|
iget-object v5, v0, Lk0/b0;->c:Lokhttp3/ResponseBody;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
if-eqz v5, :cond_2
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {v5}, Lokhttp3/ResponseBody;->b()Lokhttp3/MediaType;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object v6
|
|
|
|
|
|
|
|
if-eqz v6, :cond_0
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
iget-object v7, v6, Lokhttp3/MediaType;->a:Ljava/lang/String;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
move-object v7, v1
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
if-eqz v6, :cond_1
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
iget-object v1, v6, Lokhttp3/MediaType;->c:Ljava/lang/String;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
:cond_1
|
|
|
|
:try_start_0
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {v5}, Lokhttp3/ResponseBody;->d()Ljava/lang/String;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object v6
|
|
|
|
:try_end_0
|
|
|
|
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {v5}, Lokhttp3/ResponseBody;->close()V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:catchall_0
|
|
|
|
move-exception p0
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {v5}, Lokhttp3/ResponseBody;->close()V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
throw p0
|
|
|
|
|
|
|
|
:catch_0
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {v5}, Lokhttp3/ResponseBody;->close()V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-object v6, v2
|
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
move-object v6, v2
|
|
|
|
|
|
|
|
move-object v7, v6
|
|
|
|
|
|
|
|
:goto_1
|
2020-10-05 23:18:16 +00:00
|
|
|
iget-object v0, v0, Lk0/b0;->a:Lokhttp3/Response;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-static {v0}, Lcom/discord/utilities/error/Error;->getRequestUrl(Lokhttp3/Response;)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
goto :goto_2
|
|
|
|
|
|
|
|
:cond_3
|
|
|
|
move-object v0, v2
|
|
|
|
|
|
|
|
move-object v4, v0
|
|
|
|
|
|
|
|
move-object v6, v4
|
|
|
|
|
|
|
|
move-object v7, v6
|
|
|
|
|
|
|
|
:goto_2
|
|
|
|
const/16 v5, 0x1f4
|
|
|
|
|
|
|
|
if-ne v3, v5, :cond_4
|
|
|
|
|
|
|
|
sget-object v0, Lcom/discord/utilities/error/Error$Type;->INTERNAL_SERVER_ERROR:Lcom/discord/utilities/error/Error$Type;
|
|
|
|
|
|
|
|
goto/16 :goto_5
|
|
|
|
|
|
|
|
:cond_4
|
|
|
|
const/16 v5, 0x1f6
|
|
|
|
|
|
|
|
if-eq v3, v5, :cond_e
|
|
|
|
|
|
|
|
const/16 v5, 0x1f7
|
|
|
|
|
|
|
|
if-eq v3, v5, :cond_e
|
|
|
|
|
|
|
|
const/16 v5, 0x208
|
|
|
|
|
|
|
|
if-eq v3, v5, :cond_e
|
|
|
|
|
|
|
|
const/16 v5, 0x209
|
|
|
|
|
|
|
|
if-eq v3, v5, :cond_e
|
|
|
|
|
|
|
|
const/16 v5, 0x20a
|
|
|
|
|
|
|
|
if-eq v3, v5, :cond_e
|
|
|
|
|
|
|
|
const/16 v5, 0x20d
|
|
|
|
|
|
|
|
if-ne v3, v5, :cond_5
|
|
|
|
|
|
|
|
goto :goto_4
|
|
|
|
|
|
|
|
:cond_5
|
|
|
|
const/16 v5, 0x191
|
|
|
|
|
|
|
|
if-ne v3, v5, :cond_6
|
|
|
|
|
|
|
|
sget-object v0, Lcom/discord/utilities/error/Error$Type;->UNAUTHORIZED:Lcom/discord/utilities/error/Error$Type;
|
|
|
|
|
|
|
|
goto :goto_5
|
|
|
|
|
|
|
|
:cond_6
|
|
|
|
const/16 v5, 0x193
|
|
|
|
|
|
|
|
if-ne v3, v5, :cond_7
|
|
|
|
|
|
|
|
const-string v8, "html"
|
|
|
|
|
|
|
|
invoke-virtual {v1, v8}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
|
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
if-eqz v1, :cond_7
|
|
|
|
|
|
|
|
sget-object v0, Lcom/discord/utilities/error/Error$Type;->FORBIDDEN_CLOUD_FLARE:Lcom/discord/utilities/error/Error$Type;
|
|
|
|
|
|
|
|
goto :goto_5
|
|
|
|
|
|
|
|
:cond_7
|
|
|
|
const/16 v1, 0x19d
|
|
|
|
|
|
|
|
if-ne v3, v1, :cond_8
|
|
|
|
|
|
|
|
sget-object v0, Lcom/discord/utilities/error/Error$Type;->REQUEST_TOO_LARGE:Lcom/discord/utilities/error/Error$Type;
|
|
|
|
|
|
|
|
goto :goto_5
|
|
|
|
|
|
|
|
:cond_8
|
|
|
|
new-instance v1, Lcom/discord/utilities/error/Error$Response;
|
|
|
|
|
|
|
|
invoke-direct {v1, v6, v2}, Lcom/discord/utilities/error/Error$Response;-><init>(Ljava/lang/String;Lcom/discord/utilities/error/Error$1;)V
|
|
|
|
|
|
|
|
const/16 v8, 0x190
|
|
|
|
|
|
|
|
if-ne v3, v8, :cond_9
|
|
|
|
|
|
|
|
sget-object v0, Lcom/discord/utilities/error/Error$Type;->DISCORD_BAD_REQUEST:Lcom/discord/utilities/error/Error$Type;
|
|
|
|
|
|
|
|
goto :goto_3
|
|
|
|
|
|
|
|
:cond_9
|
|
|
|
if-ne v3, v5, :cond_a
|
|
|
|
|
|
|
|
sget-object v0, Lcom/discord/utilities/error/Error$Type;->FORBIDDEN_DISCORD:Lcom/discord/utilities/error/Error$Type;
|
|
|
|
|
|
|
|
goto :goto_3
|
|
|
|
|
|
|
|
:cond_a
|
|
|
|
invoke-virtual {v1}, Lcom/discord/utilities/error/Error$Response;->isKnownResponse()Z
|
|
|
|
|
|
|
|
move-result v5
|
|
|
|
|
|
|
|
if-eqz v5, :cond_b
|
|
|
|
|
|
|
|
sget-object v0, Lcom/discord/utilities/error/Error$Type;->DISCORD_REQUEST_ERROR:Lcom/discord/utilities/error/Error$Type;
|
|
|
|
|
|
|
|
goto :goto_3
|
|
|
|
|
|
|
|
:cond_b
|
|
|
|
const/16 v5, 0x194
|
|
|
|
|
|
|
|
if-ne v3, v5, :cond_c
|
|
|
|
|
|
|
|
sget-object v0, Lcom/discord/utilities/error/Error$Type;->DISCORD_REQUEST_RESOURCE_NOT_FOUND:Lcom/discord/utilities/error/Error$Type;
|
|
|
|
|
|
|
|
goto :goto_3
|
|
|
|
|
|
|
|
:cond_c
|
|
|
|
const/16 v5, 0x1ad
|
|
|
|
|
|
|
|
if-ne v3, v5, :cond_d
|
|
|
|
|
|
|
|
sget-object v0, Lcom/discord/utilities/error/Error$Type;->RATE_LIMITED:Lcom/discord/utilities/error/Error$Type;
|
|
|
|
|
|
|
|
:goto_3
|
|
|
|
move-object v3, v1
|
|
|
|
|
|
|
|
move-object v1, v2
|
|
|
|
|
|
|
|
goto :goto_6
|
|
|
|
|
|
|
|
:cond_d
|
|
|
|
sget-object v5, Lcom/discord/utilities/error/Error$Type;->DISCORD_REQUEST_ERROR_UNKNOWN:Lcom/discord/utilities/error/Error$Type;
|
|
|
|
|
|
|
|
invoke-static {v0, v3, v7, v4}, Lcom/discord/utilities/error/Error;->getMetaData(Ljava/lang/String;ILjava/lang/String;Lokhttp3/Headers;)Ljava/util/Map;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
move-object v3, v1
|
|
|
|
|
|
|
|
move-object v1, v0
|
|
|
|
|
|
|
|
move-object v0, v5
|
|
|
|
|
|
|
|
goto :goto_6
|
|
|
|
|
|
|
|
:cond_e
|
|
|
|
:goto_4
|
|
|
|
sget-object v0, Lcom/discord/utilities/error/Error$Type;->INTERMITTENT_CLOUD_FLARE:Lcom/discord/utilities/error/Error$Type;
|
|
|
|
|
|
|
|
:goto_5
|
|
|
|
move-object v1, v2
|
|
|
|
|
|
|
|
move-object v3, v1
|
|
|
|
|
|
|
|
:goto_6
|
2020-07-08 16:44:49 +00:00
|
|
|
move-object v5, v0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
move-object v7, v1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
move-object v8, v6
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
goto/16 :goto_a
|
|
|
|
|
|
|
|
:cond_f
|
|
|
|
instance-of v0, p0, Ljava/net/UnknownHostException;
|
|
|
|
|
|
|
|
if-eqz v0, :cond_10
|
|
|
|
|
|
|
|
sget-object v0, Lcom/discord/utilities/error/Error$Type;->NETWORK:Lcom/discord/utilities/error/Error$Type;
|
|
|
|
|
|
|
|
goto/16 :goto_9
|
|
|
|
|
|
|
|
:cond_10
|
|
|
|
instance-of v0, p0, Ljava/io/IOException;
|
|
|
|
|
|
|
|
if-eqz v0, :cond_17
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Ljava/lang/Throwable;->getMessage()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
if-eqz v0, :cond_11
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Ljava/lang/Throwable;->getMessage()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
:cond_11
|
|
|
|
const-string v0, "Canceled"
|
|
|
|
|
|
|
|
invoke-virtual {v1, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
if-nez v0, :cond_16
|
|
|
|
|
|
|
|
const-string v0, "Connection reset by peer"
|
|
|
|
|
|
|
|
invoke-virtual {v1, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
if-nez v0, :cond_16
|
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
const-string/jumbo v0, "stream was reset:"
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual {v1, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
if-nez v0, :cond_16
|
|
|
|
|
|
|
|
instance-of v0, p0, Ljava/net/NoRouteToHostException;
|
|
|
|
|
|
|
|
if-nez v0, :cond_16
|
|
|
|
|
|
|
|
instance-of v0, p0, Ljava/net/SocketException;
|
|
|
|
|
|
|
|
if-nez v0, :cond_16
|
|
|
|
|
|
|
|
instance-of v0, p0, Ljava/io/InterruptedIOException;
|
|
|
|
|
|
|
|
if-nez v0, :cond_16
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Ljava/lang/Throwable;->getCause()Ljava/lang/Throwable;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
if-eqz v0, :cond_12
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Ljava/lang/Throwable;->getCause()Ljava/lang/Throwable;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
instance-of v0, v0, Ljava/lang/InterruptedException;
|
|
|
|
|
|
|
|
if-nez v0, :cond_16
|
|
|
|
|
|
|
|
:cond_12
|
|
|
|
invoke-virtual {p0}, Ljava/lang/Throwable;->getCause()Ljava/lang/Throwable;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
instance-of v0, v0, Ljava/net/SocketTimeoutException;
|
|
|
|
|
|
|
|
if-eqz v0, :cond_13
|
|
|
|
|
|
|
|
goto :goto_8
|
|
|
|
|
|
|
|
:cond_13
|
|
|
|
instance-of v0, p0, Ljavax/net/ssl/SSLHandshakeException;
|
|
|
|
|
|
|
|
if-nez v0, :cond_15
|
|
|
|
|
|
|
|
instance-of v0, p0, Ljavax/net/ssl/SSLException;
|
|
|
|
|
|
|
|
if-eqz v0, :cond_14
|
|
|
|
|
|
|
|
goto :goto_7
|
|
|
|
|
|
|
|
:cond_14
|
|
|
|
sget-object v0, Lcom/discord/utilities/error/Error$Type;->OTHER:Lcom/discord/utilities/error/Error$Type;
|
|
|
|
|
|
|
|
goto :goto_9
|
|
|
|
|
|
|
|
:cond_15
|
|
|
|
:goto_7
|
|
|
|
sget-object v0, Lcom/discord/utilities/error/Error$Type;->SSL:Lcom/discord/utilities/error/Error$Type;
|
|
|
|
|
|
|
|
goto :goto_9
|
|
|
|
|
|
|
|
:cond_16
|
|
|
|
:goto_8
|
|
|
|
sget-object v0, Lcom/discord/utilities/error/Error$Type;->NETWORK:Lcom/discord/utilities/error/Error$Type;
|
|
|
|
|
|
|
|
goto :goto_9
|
|
|
|
|
|
|
|
:cond_17
|
|
|
|
instance-of v0, p0, Ljava/util/concurrent/TimeoutException;
|
|
|
|
|
|
|
|
if-eqz v0, :cond_18
|
|
|
|
|
|
|
|
sget-object v0, Lcom/discord/utilities/error/Error$Type;->TIMEOUT:Lcom/discord/utilities/error/Error$Type;
|
|
|
|
|
|
|
|
goto :goto_9
|
|
|
|
|
|
|
|
:cond_18
|
|
|
|
instance-of v0, p0, Lcom/discord/utilities/captcha/CaptchaHelper$Failure;
|
|
|
|
|
|
|
|
if-eqz v0, :cond_19
|
|
|
|
|
|
|
|
sget-object v0, Lcom/discord/utilities/error/Error$Type;->CAPTCHA_KNOWN_FAILURE:Lcom/discord/utilities/error/Error$Type;
|
|
|
|
|
|
|
|
goto :goto_9
|
|
|
|
|
|
|
|
:cond_19
|
|
|
|
instance-of v0, p0, Lcom/discord/utilities/images/MGImagesBitmap$ImageNotFoundException;
|
|
|
|
|
|
|
|
if-eqz v0, :cond_1a
|
|
|
|
|
|
|
|
sget-object v0, Lcom/discord/utilities/error/Error$Type;->IMAGE_NOT_FOUND:Lcom/discord/utilities/error/Error$Type;
|
|
|
|
|
|
|
|
goto :goto_9
|
|
|
|
|
|
|
|
:cond_1a
|
|
|
|
sget-object v0, Lcom/discord/utilities/error/Error$Type;->OTHER:Lcom/discord/utilities/error/Error$Type;
|
|
|
|
|
|
|
|
:goto_9
|
2020-07-08 16:44:49 +00:00
|
|
|
move-object v5, v0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-object v3, v2
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
move-object v7, v3
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
move-object v8, v7
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
:goto_a
|
|
|
|
if-nez v3, :cond_1b
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
new-instance v0, Lcom/discord/utilities/error/Error$Response;
|
|
|
|
|
|
|
|
invoke-direct {v0, v2, v2}, Lcom/discord/utilities/error/Error$Response;-><init>(Ljava/lang/String;Lcom/discord/utilities/error/Error$1;)V
|
|
|
|
|
|
|
|
move-object v6, v0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
goto :goto_b
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
:cond_1b
|
2020-07-08 16:44:49 +00:00
|
|
|
move-object v6, v3
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
:goto_b
|
2020-05-17 12:40:10 +00:00
|
|
|
new-instance v0, Lcom/discord/utilities/error/Error;
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
move-object v3, v0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
move-object v4, p0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-direct/range {v3 .. v8}, Lcom/discord/utilities/error/Error;-><init>(Ljava/lang/Throwable;Lcom/discord/utilities/error/Error$Type;Lcom/discord/utilities/error/Error$Response;Ljava/util/Map;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static getMetaData(Ljava/lang/String;ILjava/lang/String;Lokhttp3/Headers;)Ljava/util/Map;
|
|
|
|
.locals 2
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(",
|
|
|
|
"Ljava/lang/String;",
|
|
|
|
"I",
|
|
|
|
"Ljava/lang/String;",
|
|
|
|
"Lokhttp3/Headers;",
|
|
|
|
")",
|
|
|
|
"Ljava/util/Map<",
|
|
|
|
"Ljava/lang/String;",
|
|
|
|
"Ljava/lang/String;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
new-instance v0, Ljava/util/HashMap;
|
|
|
|
|
|
|
|
invoke-direct {v0}, Ljava/util/HashMap;-><init>()V
|
|
|
|
|
|
|
|
invoke-static {p1}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
const-string v1, "responseCode"
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {v0, v1, p1}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
const-string p1, "requestUrl"
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {v0, p1, p0}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
const-string p0, "content-type"
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {v0, p0, p2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
const-string p0, "CF-Ray"
|
|
|
|
|
|
|
|
if-eqz p3, :cond_0
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {p3, p0}, Lokhttp3/Headers;->c(Ljava/lang/String;)Ljava/lang/String;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const/4 p1, 0x0
|
|
|
|
|
|
|
|
:goto_0
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {v0, p0, p1}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static getRequestUrl(Lokhttp3/Response;)Ljava/lang/String;
|
|
|
|
.locals 0
|
|
|
|
.param p0 # Lokhttp3/Response;
|
|
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
|
|
.end annotation
|
|
|
|
.end param
|
|
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
if-nez p0, :cond_0
|
|
|
|
|
|
|
|
const/4 p0, 0x0
|
|
|
|
|
|
|
|
return-object p0
|
|
|
|
|
|
|
|
:cond_0
|
2020-10-05 23:18:16 +00:00
|
|
|
iget-object p0, p0, Lokhttp3/Response;->d:Lg0/b0;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-05 23:18:16 +00:00
|
|
|
iget-object p0, p0, Lg0/b0;->b:Lg0/y;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-10-05 23:18:16 +00:00
|
|
|
iget-object p0, p0, Lg0/y;->j:Ljava/lang/String;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
return-object p0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private getToastMessages(Landroid/content/Context;)Ljava/util/List;
|
|
|
|
.locals 2
|
|
|
|
.param p1 # Landroid/content/Context;
|
|
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
|
|
.end annotation
|
|
|
|
.end param
|
|
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(",
|
|
|
|
"Landroid/content/Context;",
|
|
|
|
")",
|
|
|
|
"Ljava/util/List<",
|
|
|
|
"Ljava/lang/String;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/utilities/error/Error;->type:Lcom/discord/utilities/error/Error$Type;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Enum;->ordinal()I
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
packed-switch v0, :pswitch_data_0
|
|
|
|
|
|
|
|
:pswitch_0
|
2020-10-19 23:59:54 +00:00
|
|
|
const v0, 0x7f12104c
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual {p1, v0}, Landroid/content/Context;->getString(I)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-static {p1}, Ljava/util/Collections;->singletonList(Ljava/lang/Object;)Ljava/util/List;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
return-object p1
|
|
|
|
|
|
|
|
:pswitch_1
|
2020-10-19 23:59:54 +00:00
|
|
|
const v0, 0x7f120d96
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual {p1, v0}, Landroid/content/Context;->getString(I)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-static {p1}, Ljava/util/Collections;->singletonList(Ljava/lang/Object;)Ljava/util/List;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
return-object p1
|
|
|
|
|
|
|
|
:pswitch_2
|
2020-10-19 23:59:54 +00:00
|
|
|
const v0, 0x7f12104b
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual {p1, v0}, Landroid/content/Context;->getString(I)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-static {p1}, Ljava/util/Collections;->singletonList(Ljava/lang/Object;)Ljava/util/List;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
return-object p1
|
|
|
|
|
|
|
|
:pswitch_3
|
2020-10-19 23:59:54 +00:00
|
|
|
const v0, 0x7f121048
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual {p1, v0}, Landroid/content/Context;->getString(I)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-static {p1}, Ljava/util/Collections;->singletonList(Ljava/lang/Object;)Ljava/util/List;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
return-object p1
|
|
|
|
|
|
|
|
:pswitch_4
|
2020-10-19 23:59:54 +00:00
|
|
|
const v0, 0x7f121764
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual {p1, v0}, Landroid/content/Context;->getString(I)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-static {p1}, Ljava/util/Collections;->singletonList(Ljava/lang/Object;)Ljava/util/List;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
return-object p1
|
|
|
|
|
|
|
|
:pswitch_5
|
2020-10-19 23:59:54 +00:00
|
|
|
const v0, 0x7f12104a
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual {p1, v0}, Landroid/content/Context;->getString(I)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-static {p1}, Ljava/util/Collections;->singletonList(Ljava/lang/Object;)Ljava/util/List;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
return-object p1
|
|
|
|
|
|
|
|
:pswitch_6
|
2020-10-19 23:59:54 +00:00
|
|
|
const v0, 0x7f121046
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual {p1, v0}, Landroid/content/Context;->getString(I)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-static {p1}, Ljava/util/Collections;->singletonList(Ljava/lang/Object;)Ljava/util/List;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
return-object p1
|
|
|
|
|
|
|
|
:pswitch_7
|
|
|
|
iget-object v0, p0, Lcom/discord/utilities/error/Error;->response:Lcom/discord/utilities/error/Error$Response;
|
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
const v1, 0x7f121043
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-static {v0, p1, v1}, Lcom/discord/utilities/error/Error$Response;->access$100(Lcom/discord/utilities/error/Error$Response;Landroid/content/Context;I)Ljava/lang/String;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-static {p1}, Ljava/util/Collections;->singletonList(Ljava/lang/Object;)Ljava/util/List;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
return-object p1
|
|
|
|
|
|
|
|
:pswitch_8
|
|
|
|
iget-object v0, p0, Lcom/discord/utilities/error/Error;->response:Lcom/discord/utilities/error/Error$Response;
|
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
const v1, 0x7f121047
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-static {v0, p1, v1}, Lcom/discord/utilities/error/Error$Response;->access$100(Lcom/discord/utilities/error/Error$Response;Landroid/content/Context;I)Ljava/lang/String;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-static {p1}, Ljava/util/Collections;->singletonList(Ljava/lang/Object;)Ljava/util/List;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
return-object p1
|
|
|
|
|
|
|
|
:pswitch_9
|
2020-10-19 23:59:54 +00:00
|
|
|
const v0, 0x7f12143f
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual {p1, v0}, Landroid/content/Context;->getString(I)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-static {p1}, Ljava/util/Collections;->singletonList(Ljava/lang/Object;)Ljava/util/List;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
return-object p1
|
|
|
|
|
|
|
|
:pswitch_a
|
2020-10-19 23:59:54 +00:00
|
|
|
const v0, 0x7f121045
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual {p1, v0}, Landroid/content/Context;->getString(I)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-static {p1}, Ljava/util/Collections;->singletonList(Ljava/lang/Object;)Ljava/util/List;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
return-object p1
|
|
|
|
|
|
|
|
:pswitch_b
|
2020-10-19 23:59:54 +00:00
|
|
|
const v0, 0x7f121044
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual {p1, v0}, Landroid/content/Context;->getString(I)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-static {p1}, Ljava/util/Collections;->singletonList(Ljava/lang/Object;)Ljava/util/List;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
return-object p1
|
|
|
|
|
|
|
|
:pswitch_c
|
|
|
|
iget-object v0, p0, Lcom/discord/utilities/error/Error;->response:Lcom/discord/utilities/error/Error$Response;
|
|
|
|
|
2020-10-19 23:59:54 +00:00
|
|
|
const v1, 0x7f121049
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-static {v0, p1, v1}, Lcom/discord/utilities/error/Error$Response;->access$100(Lcom/discord/utilities/error/Error$Response;Landroid/content/Context;I)Ljava/lang/String;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-static {p1}, Ljava/util/Collections;->singletonList(Ljava/lang/Object;)Ljava/util/List;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
return-object p1
|
|
|
|
|
|
|
|
nop
|
|
|
|
|
|
|
|
:pswitch_data_0
|
|
|
|
.packed-switch 0x0
|
|
|
|
:pswitch_a
|
|
|
|
:pswitch_8
|
|
|
|
:pswitch_b
|
|
|
|
:pswitch_c
|
|
|
|
:pswitch_0
|
|
|
|
:pswitch_7
|
|
|
|
:pswitch_1
|
|
|
|
:pswitch_3
|
|
|
|
:pswitch_2
|
|
|
|
:pswitch_c
|
|
|
|
:pswitch_9
|
|
|
|
:pswitch_6
|
|
|
|
:pswitch_5
|
|
|
|
:pswitch_4
|
|
|
|
.end packed-switch
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static handle(Ljava/lang/Throwable;Ljava/lang/String;Lrx/functions/Action1;Landroid/content/Context;)V
|
|
|
|
.locals 1
|
|
|
|
.param p0 # Ljava/lang/Throwable;
|
|
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
|
|
.end annotation
|
|
|
|
.end param
|
|
|
|
.param p1 # Ljava/lang/String;
|
|
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
|
|
.end annotation
|
|
|
|
.end param
|
|
|
|
.param p2 # Lrx/functions/Action1;
|
|
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
|
|
.end annotation
|
|
|
|
.end param
|
|
|
|
.param p3 # Landroid/content/Context;
|
|
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
|
|
.end annotation
|
|
|
|
.end param
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(",
|
|
|
|
"Ljava/lang/Throwable;",
|
|
|
|
"Ljava/lang/String;",
|
|
|
|
"Lrx/functions/Action1<",
|
|
|
|
"Lcom/discord/utilities/error/Error;",
|
|
|
|
">;",
|
|
|
|
"Landroid/content/Context;",
|
|
|
|
")V"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
|
|
value = {
|
|
|
|
Ljava/lang/Throwable;
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
invoke-static {p0}, Lcom/discord/utilities/error/Error;->create(Ljava/lang/Throwable;)Lcom/discord/utilities/error/Error;
|
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Lcom/discord/utilities/error/Error;->getType()Lcom/discord/utilities/error/Error$Type;
|
|
|
|
|
|
|
|
sget-object v0, Lcom/discord/utilities/error/Error$Type;->OTHER:Lcom/discord/utilities/error/Error$Type;
|
|
|
|
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
|
|
|
|
:try_start_0
|
|
|
|
invoke-interface {p2, p0}, Lrx/functions/Action1;->call(Ljava/lang/Object;)V
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/utilities/error/Error;->logError(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
invoke-virtual {p0, p3}, Lcom/discord/utilities/error/Error;->showToasts(Landroid/content/Context;)V
|
|
|
|
:try_end_0
|
|
|
|
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:catch_0
|
|
|
|
move-exception p2
|
|
|
|
|
|
|
|
const-string p3, " / "
|
|
|
|
|
2020-10-05 23:18:16 +00:00
|
|
|
invoke-static {p1, p3}, Lf/e/c/a/a;->J(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/StringBuilder;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object p3
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Lcom/discord/utilities/error/Error;->toString()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
invoke-virtual {p3, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-virtual {p3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
sget-object p3, Lcom/discord/utilities/error/Error;->onUnhandledError:Lrx/functions/Action3;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
new-instance v0, Ljava/lang/Exception;
|
|
|
|
|
|
|
|
invoke-direct {v0, p0, p2}, Ljava/lang/Exception;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
|
|
|
|
|
|
|
|
const/4 p0, 0x0
|
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-interface {p3, p1, v0, p0}, Lrx/functions/Action3;->call(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
:goto_0
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
.method public static init(Lrx/functions/Action3;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
.locals 0
|
2020-07-25 00:57:58 +00:00
|
|
|
.param p0 # Lrx/functions/Action3;
|
2020-05-17 12:40:10 +00:00
|
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
|
|
.end annotation
|
|
|
|
.end param
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(",
|
2020-07-25 00:57:58 +00:00
|
|
|
"Lrx/functions/Action3<",
|
2020-05-17 12:40:10 +00:00
|
|
|
"Ljava/lang/String;",
|
|
|
|
"Ljava/lang/Throwable;",
|
|
|
|
"Ljava/util/Map<",
|
|
|
|
"Ljava/lang/String;",
|
|
|
|
"Ljava/lang/String;",
|
|
|
|
">;>;)V"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
sput-object p0, Lcom/discord/utilities/error/Error;->onUnhandledError:Lrx/functions/Action3;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private logError(Ljava/lang/String;)V
|
2020-07-25 00:57:58 +00:00
|
|
|
.locals 3
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/utilities/error/Error;->shouldLog:Ljava/util/concurrent/atomic/AtomicBoolean;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Ljava/util/concurrent/atomic/AtomicBoolean;->get()Z
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
iget-object v0, p0, Lcom/discord/utilities/error/Error;->type:Lcom/discord/utilities/error/Error$Type;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Enum;->ordinal()I
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
const/16 v1, 0x9
|
|
|
|
|
|
|
|
if-eq v0, v1, :cond_2
|
|
|
|
|
|
|
|
const/16 v1, 0x10
|
|
|
|
|
|
|
|
if-eq v0, v1, :cond_1
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_1
|
2020-07-25 00:57:58 +00:00
|
|
|
sget-object v0, Lcom/discord/utilities/error/Error;->onUnhandledError:Lrx/functions/Action3;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
if-eqz v0, :cond_3
|
|
|
|
|
|
|
|
iget-object v1, p0, Lcom/discord/utilities/error/Error;->throwable:Ljava/lang/Throwable;
|
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
iget-object v2, p0, Lcom/discord/utilities/error/Error;->metadata:Ljava/util/Map;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-interface {v0, p1, v1, v2}, Lrx/functions/Action3;->call(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_2
|
2020-07-25 00:57:58 +00:00
|
|
|
sget-object p1, Lcom/discord/utilities/error/Error;->onUnhandledError:Lrx/functions/Action3;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
if-eqz p1, :cond_3
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/utilities/error/Error;->type:Lcom/discord/utilities/error/Error$Type;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Enum;->name()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
iget-object v1, p0, Lcom/discord/utilities/error/Error;->throwable:Ljava/lang/Throwable;
|
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
iget-object v2, p0, Lcom/discord/utilities/error/Error;->metadata:Ljava/util/Map;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-interface {p1, v0, v1, v2}, Lrx/functions/Action3;->call(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
:cond_3
|
|
|
|
:goto_0
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
|
|
|
|
# virtual methods
|
|
|
|
.method public canEqual(Ljava/lang/Object;)Z
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
instance-of p1, p1, Lcom/discord/utilities/error/Error;
|
|
|
|
|
|
|
|
return p1
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public equals(Ljava/lang/Object;)Z
|
|
|
|
.locals 4
|
|
|
|
|
|
|
|
const/4 v0, 0x1
|
|
|
|
|
|
|
|
if-ne p1, p0, :cond_0
|
|
|
|
|
|
|
|
return v0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
instance-of v1, p1, Lcom/discord/utilities/error/Error;
|
|
|
|
|
|
|
|
const/4 v2, 0x0
|
|
|
|
|
|
|
|
if-nez v1, :cond_1
|
|
|
|
|
|
|
|
return v2
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
check-cast p1, Lcom/discord/utilities/error/Error;
|
|
|
|
|
|
|
|
invoke-virtual {p1, p0}, Lcom/discord/utilities/error/Error;->canEqual(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
if-nez v1, :cond_2
|
|
|
|
|
|
|
|
return v2
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
iget-object v1, p0, Lcom/discord/utilities/error/Error;->showErrorToasts:Ljava/util/concurrent/atomic/AtomicBoolean;
|
|
|
|
|
|
|
|
iget-object v3, p1, Lcom/discord/utilities/error/Error;->showErrorToasts:Ljava/util/concurrent/atomic/AtomicBoolean;
|
|
|
|
|
|
|
|
if-nez v1, :cond_3
|
|
|
|
|
|
|
|
if-eqz v3, :cond_4
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_3
|
|
|
|
invoke-virtual {v1, v3}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
if-nez v1, :cond_4
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
return v2
|
|
|
|
|
|
|
|
:cond_4
|
|
|
|
iget-object v1, p0, Lcom/discord/utilities/error/Error;->shouldLog:Ljava/util/concurrent/atomic/AtomicBoolean;
|
|
|
|
|
|
|
|
iget-object v3, p1, Lcom/discord/utilities/error/Error;->shouldLog:Ljava/util/concurrent/atomic/AtomicBoolean;
|
|
|
|
|
|
|
|
if-nez v1, :cond_5
|
|
|
|
|
|
|
|
if-eqz v3, :cond_6
|
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:cond_5
|
|
|
|
invoke-virtual {v1, v3}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
if-nez v1, :cond_6
|
|
|
|
|
|
|
|
:goto_1
|
|
|
|
return v2
|
|
|
|
|
|
|
|
:cond_6
|
|
|
|
invoke-virtual {p0}, Lcom/discord/utilities/error/Error;->getThrowable()Ljava/lang/Throwable;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/utilities/error/Error;->getThrowable()Ljava/lang/Throwable;
|
|
|
|
|
|
|
|
move-result-object v3
|
|
|
|
|
|
|
|
if-nez v1, :cond_7
|
|
|
|
|
|
|
|
if-eqz v3, :cond_8
|
|
|
|
|
|
|
|
goto :goto_2
|
|
|
|
|
|
|
|
:cond_7
|
|
|
|
invoke-virtual {v1, v3}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
if-nez v1, :cond_8
|
|
|
|
|
|
|
|
:goto_2
|
|
|
|
return v2
|
|
|
|
|
|
|
|
:cond_8
|
|
|
|
invoke-virtual {p0}, Lcom/discord/utilities/error/Error;->getType()Lcom/discord/utilities/error/Error$Type;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/utilities/error/Error;->getType()Lcom/discord/utilities/error/Error$Type;
|
|
|
|
|
|
|
|
move-result-object v3
|
|
|
|
|
|
|
|
if-nez v1, :cond_9
|
|
|
|
|
|
|
|
if-eqz v3, :cond_a
|
|
|
|
|
|
|
|
goto :goto_3
|
|
|
|
|
|
|
|
:cond_9
|
|
|
|
invoke-virtual {v1, v3}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
if-nez v1, :cond_a
|
|
|
|
|
|
|
|
:goto_3
|
|
|
|
return v2
|
|
|
|
|
|
|
|
:cond_a
|
|
|
|
invoke-virtual {p0}, Lcom/discord/utilities/error/Error;->getResponse()Lcom/discord/utilities/error/Error$Response;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/utilities/error/Error;->getResponse()Lcom/discord/utilities/error/Error$Response;
|
|
|
|
|
|
|
|
move-result-object v3
|
|
|
|
|
|
|
|
if-nez v1, :cond_b
|
|
|
|
|
|
|
|
if-eqz v3, :cond_c
|
|
|
|
|
|
|
|
goto :goto_4
|
|
|
|
|
|
|
|
:cond_b
|
|
|
|
invoke-virtual {v1, v3}, Lcom/discord/utilities/error/Error$Response;->equals(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
if-nez v1, :cond_c
|
|
|
|
|
|
|
|
:goto_4
|
|
|
|
return v2
|
|
|
|
|
|
|
|
:cond_c
|
|
|
|
iget-object v1, p0, Lcom/discord/utilities/error/Error;->metadata:Ljava/util/Map;
|
|
|
|
|
|
|
|
iget-object v3, p1, Lcom/discord/utilities/error/Error;->metadata:Ljava/util/Map;
|
|
|
|
|
|
|
|
if-nez v1, :cond_d
|
|
|
|
|
|
|
|
if-eqz v3, :cond_e
|
|
|
|
|
|
|
|
goto :goto_5
|
|
|
|
|
|
|
|
:cond_d
|
|
|
|
invoke-virtual {v1, v3}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
if-nez v1, :cond_e
|
|
|
|
|
|
|
|
:goto_5
|
|
|
|
return v2
|
|
|
|
|
|
|
|
:cond_e
|
|
|
|
invoke-virtual {p0}, Lcom/discord/utilities/error/Error;->getBodyText()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/utilities/error/Error;->getBodyText()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
if-nez v1, :cond_f
|
|
|
|
|
|
|
|
if-eqz p1, :cond_10
|
|
|
|
|
|
|
|
goto :goto_6
|
|
|
|
|
|
|
|
:cond_f
|
|
|
|
invoke-virtual {v1, p1}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
move-result p1
|
|
|
|
|
|
|
|
if-nez p1, :cond_10
|
|
|
|
|
|
|
|
:goto_6
|
|
|
|
return v2
|
|
|
|
|
|
|
|
:cond_10
|
|
|
|
return v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public getBodyText()Ljava/lang/String;
|
|
|
|
.locals 1
|
|
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/utilities/error/Error;->bodyText:Ljava/lang/String;
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public getResponse()Lcom/discord/utilities/error/Error$Response;
|
|
|
|
.locals 1
|
|
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/utilities/error/Error;->response:Lcom/discord/utilities/error/Error$Response;
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public getThrowable()Ljava/lang/Throwable;
|
|
|
|
.locals 1
|
|
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/utilities/error/Error;->throwable:Ljava/lang/Throwable;
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public getType()Lcom/discord/utilities/error/Error$Type;
|
|
|
|
.locals 1
|
|
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/utilities/error/Error;->type:Lcom/discord/utilities/error/Error$Type;
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public hashCode()I
|
|
|
|
.locals 4
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/utilities/error/Error;->showErrorToasts:Ljava/util/concurrent/atomic/AtomicBoolean;
|
|
|
|
|
|
|
|
const/16 v1, 0x2b
|
|
|
|
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
|
|
|
|
const/16 v0, 0x2b
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Object;->hashCode()I
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
const/16 v2, 0x3b
|
|
|
|
|
|
|
|
add-int/2addr v0, v2
|
|
|
|
|
|
|
|
iget-object v3, p0, Lcom/discord/utilities/error/Error;->shouldLog:Ljava/util/concurrent/atomic/AtomicBoolean;
|
|
|
|
|
|
|
|
mul-int/lit8 v0, v0, 0x3b
|
|
|
|
|
|
|
|
if-nez v3, :cond_1
|
|
|
|
|
|
|
|
const/16 v3, 0x2b
|
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
invoke-virtual {v3}, Ljava/lang/Object;->hashCode()I
|
|
|
|
|
|
|
|
move-result v3
|
|
|
|
|
|
|
|
:goto_1
|
|
|
|
add-int/2addr v0, v3
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Lcom/discord/utilities/error/Error;->getThrowable()Ljava/lang/Throwable;
|
|
|
|
|
|
|
|
move-result-object v3
|
|
|
|
|
|
|
|
mul-int/lit8 v0, v0, 0x3b
|
|
|
|
|
|
|
|
if-nez v3, :cond_2
|
|
|
|
|
|
|
|
const/16 v3, 0x2b
|
|
|
|
|
|
|
|
goto :goto_2
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
invoke-virtual {v3}, Ljava/lang/Object;->hashCode()I
|
|
|
|
|
|
|
|
move-result v3
|
|
|
|
|
|
|
|
:goto_2
|
|
|
|
add-int/2addr v0, v3
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Lcom/discord/utilities/error/Error;->getType()Lcom/discord/utilities/error/Error$Type;
|
|
|
|
|
|
|
|
move-result-object v3
|
|
|
|
|
|
|
|
mul-int/lit8 v0, v0, 0x3b
|
|
|
|
|
|
|
|
if-nez v3, :cond_3
|
|
|
|
|
|
|
|
const/16 v3, 0x2b
|
|
|
|
|
|
|
|
goto :goto_3
|
|
|
|
|
|
|
|
:cond_3
|
|
|
|
invoke-virtual {v3}, Ljava/lang/Object;->hashCode()I
|
|
|
|
|
|
|
|
move-result v3
|
|
|
|
|
|
|
|
:goto_3
|
|
|
|
add-int/2addr v0, v3
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Lcom/discord/utilities/error/Error;->getResponse()Lcom/discord/utilities/error/Error$Response;
|
|
|
|
|
|
|
|
move-result-object v3
|
|
|
|
|
|
|
|
mul-int/lit8 v0, v0, 0x3b
|
|
|
|
|
|
|
|
if-nez v3, :cond_4
|
|
|
|
|
|
|
|
const/16 v3, 0x2b
|
|
|
|
|
|
|
|
goto :goto_4
|
|
|
|
|
|
|
|
:cond_4
|
|
|
|
invoke-virtual {v3}, Lcom/discord/utilities/error/Error$Response;->hashCode()I
|
|
|
|
|
|
|
|
move-result v3
|
|
|
|
|
|
|
|
:goto_4
|
|
|
|
add-int/2addr v0, v3
|
|
|
|
|
|
|
|
iget-object v3, p0, Lcom/discord/utilities/error/Error;->metadata:Ljava/util/Map;
|
|
|
|
|
|
|
|
mul-int/lit8 v0, v0, 0x3b
|
|
|
|
|
|
|
|
if-nez v3, :cond_5
|
|
|
|
|
|
|
|
const/16 v3, 0x2b
|
|
|
|
|
|
|
|
goto :goto_5
|
|
|
|
|
|
|
|
:cond_5
|
|
|
|
invoke-virtual {v3}, Ljava/lang/Object;->hashCode()I
|
|
|
|
|
|
|
|
move-result v3
|
|
|
|
|
|
|
|
:goto_5
|
|
|
|
add-int/2addr v0, v3
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Lcom/discord/utilities/error/Error;->getBodyText()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v3
|
|
|
|
|
|
|
|
mul-int/lit8 v0, v0, 0x3b
|
|
|
|
|
|
|
|
if-nez v3, :cond_6
|
|
|
|
|
|
|
|
goto :goto_6
|
|
|
|
|
|
|
|
:cond_6
|
|
|
|
invoke-virtual {v3}, Ljava/lang/Object;->hashCode()I
|
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
:goto_6
|
|
|
|
add-int/2addr v0, v1
|
|
|
|
|
|
|
|
return v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public setShouldLog(Z)V
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/utilities/error/Error;->shouldLog:Ljava/util/concurrent/atomic/AtomicBoolean;
|
|
|
|
|
|
|
|
invoke-virtual {v0, p1}, Ljava/util/concurrent/atomic/AtomicBoolean;->set(Z)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public setShowErrorToasts(Z)V
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/utilities/error/Error;->showErrorToasts:Ljava/util/concurrent/atomic/AtomicBoolean;
|
|
|
|
|
|
|
|
invoke-virtual {v0, p1}, Ljava/util/concurrent/atomic/AtomicBoolean;->set(Z)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public showToasts(Landroid/content/Context;)V
|
|
|
|
.locals 3
|
|
|
|
.param p1 # Landroid/content/Context;
|
|
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
|
|
.end annotation
|
|
|
|
.end param
|
|
|
|
.annotation build Landroidx/annotation/UiThread;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/utilities/error/Error;->showErrorToasts:Ljava/util/concurrent/atomic/AtomicBoolean;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Ljava/util/concurrent/atomic/AtomicBoolean;->get()Z
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/utilities/error/Error;->getToastMessages(Landroid/content/Context;)Ljava/util/List;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
|
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
check-cast v1, Ljava/lang/String;
|
|
|
|
|
|
|
|
const/4 v2, 0x0
|
|
|
|
|
|
|
|
invoke-static {p1, v1, v2}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
invoke-virtual {v1}, Landroid/widget/Toast;->show()V
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
:goto_1
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public toString()Ljava/lang/String;
|
|
|
|
.locals 2
|
|
|
|
|
|
|
|
const-string v0, "Error(showErrorToasts="
|
|
|
|
|
2020-10-05 23:18:16 +00:00
|
|
|
invoke-static {v0}, Lf/e/c/a/a;->E(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
iget-object v1, p0, Lcom/discord/utilities/error/Error;->showErrorToasts:Ljava/util/concurrent/atomic/AtomicBoolean;
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
const-string v1, ", shouldLog="
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
iget-object v1, p0, Lcom/discord/utilities/error/Error;->shouldLog:Ljava/util/concurrent/atomic/AtomicBoolean;
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
const-string v1, ", throwable="
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Lcom/discord/utilities/error/Error;->getThrowable()Ljava/lang/Throwable;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
const-string v1, ", type="
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Lcom/discord/utilities/error/Error;->getType()Lcom/discord/utilities/error/Error$Type;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
const-string v1, ", response="
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Lcom/discord/utilities/error/Error;->getResponse()Lcom/discord/utilities/error/Error$Response;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
const-string v1, ", metadata="
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
iget-object v1, p0, Lcom/discord/utilities/error/Error;->metadata:Ljava/util/Map;
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
const-string v1, ", bodyText="
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Lcom/discord/utilities/error/Error;->getBodyText()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
const-string v1, ")"
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|