173 lines
4.7 KiB
Smali
173 lines
4.7 KiB
Smali
.class public final Lcom/discord/widgets/debugging/WidgetFatalCrash$Companion;
|
|
.super Ljava/lang/Object;
|
|
.source "WidgetFatalCrash.kt"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
value = Lcom/discord/widgets/debugging/WidgetFatalCrash;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x19
|
|
name = "Companion"
|
|
.end annotation
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>()V
|
|
.locals 0
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public synthetic constructor <init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/debugging/WidgetFatalCrash$Companion;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private final createIntent(Ljava/lang/String;)Landroid/content/Intent;
|
|
.locals 2
|
|
.annotation build Landroid/annotation/SuppressLint;
|
|
value = {
|
|
"SimpleDateFormat"
|
|
}
|
|
.end annotation
|
|
|
|
new-instance v0, Landroid/os/Bundle;
|
|
|
|
invoke-direct {v0}, Landroid/os/Bundle;-><init>()V
|
|
|
|
const-string v1, "INTENT_EXTRA_CRASH_SOURCE"
|
|
|
|
invoke-virtual {v0, v1, p1}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
new-instance p1, Ljava/text/SimpleDateFormat;
|
|
|
|
const-string v1, "MM/dd/yyyy HH:mm:ss"
|
|
|
|
invoke-direct {p1, v1}, Ljava/text/SimpleDateFormat;-><init>(Ljava/lang/String;)V
|
|
|
|
const-string v1, "GMT"
|
|
|
|
invoke-static {v1}, Ljava/util/TimeZone;->getTimeZone(Ljava/lang/String;)Ljava/util/TimeZone;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {p1, v1}, Ljava/text/SimpleDateFormat;->setTimeZone(Ljava/util/TimeZone;)V
|
|
|
|
new-instance v1, Ljava/util/Date;
|
|
|
|
invoke-direct {v1}, Ljava/util/Date;-><init>()V
|
|
|
|
invoke-virtual {p1, v1}, Ljava/text/SimpleDateFormat;->format(Ljava/util/Date;)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
new-instance v1, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
const-string p1, " GMT"
|
|
|
|
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
const-string v1, "INTENT_EXTRA_CRASH_TIME"
|
|
|
|
invoke-virtual {v0, v1, p1}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
new-instance p1, Landroid/content/Intent;
|
|
|
|
invoke-direct {p1}, Landroid/content/Intent;-><init>()V
|
|
|
|
invoke-virtual {p1, v0}, Landroid/content/Intent;->putExtras(Landroid/os/Bundle;)Landroid/content/Intent;
|
|
|
|
move-result-object p1
|
|
|
|
const-string v0, "Intent().putExtras(extras)"
|
|
|
|
invoke-static {p1, v0}, Lz/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final launch(Landroid/content/Context;Ljava/lang/Throwable;Ljava/lang/String;)V
|
|
.locals 7
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
if-eqz p2, :cond_1
|
|
|
|
if-eqz p3, :cond_0
|
|
|
|
sget-object v1, Lcom/discord/app/AppLog;->c:Lcom/discord/app/AppLog;
|
|
|
|
const-class v0, Lcom/discord/widgets/debugging/WidgetFatalCrash;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Class;->getSimpleName()Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
const-string v0, "WidgetFatalCrash::class.java.simpleName"
|
|
|
|
invoke-static {v2, v0}, Lz/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
new-instance v3, Ljava/lang/Throwable;
|
|
|
|
invoke-direct {v3, p3, p2}, Ljava/lang/Throwable;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
|
|
|
|
const/4 v4, 0x0
|
|
|
|
const/4 v5, 0x4
|
|
|
|
const/4 v6, 0x0
|
|
|
|
invoke-static/range {v1 .. v6}, Lcom/discord/utilities/logging/Logger;->e$default(Lcom/discord/utilities/logging/Logger;Ljava/lang/String;Ljava/lang/Throwable;Ljava/util/Map;ILjava/lang/Object;)V
|
|
|
|
const-class p2, Lcom/discord/widgets/debugging/WidgetFatalCrash;
|
|
|
|
invoke-direct {p0, p3}, Lcom/discord/widgets/debugging/WidgetFatalCrash$Companion;->createIntent(Ljava/lang/String;)Landroid/content/Intent;
|
|
|
|
move-result-object p3
|
|
|
|
invoke-static {p1, p2, p3}, Lf/a/b/h;->b(Landroid/content/Context;Ljava/lang/Class;Landroid/content/Intent;)V
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const-string p1, "crashSource"
|
|
|
|
invoke-static {p1}, Lz/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_1
|
|
const-string p1, "throwable"
|
|
|
|
invoke-static {p1}, Lz/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_2
|
|
const-string p1, "context"
|
|
|
|
invoke-static {p1}, Lz/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|