apkfuckery/com.discord/smali/f/a/b/j.smali
2020-07-20 19:00:44 +00:00

200 lines
5 KiB
Smali

.class public final Lf/a/b/j;
.super Lj0/o/c/i;
.source "AppLog.kt"
# interfaces
.implements Lkotlin/jvm/functions/Function1;
# annotations
.annotation system Ldalvik/annotation/Signature;
value = {
"Lj0/o/c/i;",
"Lkotlin/jvm/functions/Function1<",
"Ljava/lang/String;",
"Lkotlin/Unit;",
">;"
}
.end annotation
# instance fields
.field public final synthetic $metadata:Ljava/util/Map;
.field public final synthetic $throwable:Ljava/lang/Throwable;
# direct methods
.method public constructor <init>(Ljava/lang/Throwable;Ljava/util/Map;)V
.locals 0
iput-object p1, p0, Lf/a/b/j;->$throwable:Ljava/lang/Throwable;
iput-object p2, p0, Lf/a/b/j;->$metadata:Ljava/util/Map;
const/4 p1, 0x1
invoke-direct {p0, p1}, Lj0/o/c/i;-><init>(I)V
return-void
.end method
# virtual methods
.method public bridge synthetic invoke(Ljava/lang/Object;)Ljava/lang/Object;
.locals 0
check-cast p1, Ljava/lang/String;
invoke-virtual {p0, p1}, Lf/a/b/j;->invoke(Ljava/lang/String;)V
sget-object p1, Lkotlin/Unit;->a:Lkotlin/Unit;
return-object p1
.end method
.method public final invoke(Ljava/lang/String;)V
.locals 7
const/4 v0, 0x0
if-eqz p1, :cond_3
:try_start_0
iget-object v1, p0, Lf/a/b/j;->$throwable:Ljava/lang/Throwable;
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
const-string v2, "Error"
if-eqz v1, :cond_0
:try_start_1
sget-object v1, Lcom/discord/app/AppLog;->c:Lcom/discord/app/AppLog;
new-instance v3, Ljava/lang/StringBuilder;
invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V
const-string v4, "Message "
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v3, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v3
invoke-virtual {v1, v3, v2}, Lcom/discord/app/AppLog;->recordBreadcrumb(Ljava/lang/String;Ljava/lang/String;)V
:cond_0
iget-object v1, p0, Lf/a/b/j;->$metadata:Ljava/util/Map;
if-eqz v1, :cond_1
invoke-interface {v1}, Ljava/util/Map;->entrySet()Ljava/util/Set;
move-result-object v1
if-eqz v1, :cond_1
invoke-interface {v1}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
move-result-object v1
:goto_0
invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z
move-result v3
if-eqz v3, :cond_1
invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v3
check-cast v3, Ljava/util/Map$Entry;
sget-object v4, Lcom/discord/app/AppLog;->c:Lcom/discord/app/AppLog;
new-instance v5, Ljava/lang/StringBuilder;
invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V
const-string v6, "Metadata: "
invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-interface {v3}, Ljava/util/Map$Entry;->getKey()Ljava/lang/Object;
move-result-object v6
check-cast v6, Ljava/lang/String;
invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string v6, ", "
invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-interface {v3}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;
move-result-object v3
check-cast v3, Ljava/lang/String;
invoke-virtual {v5, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v3
invoke-virtual {v4, v3, v2}, Lcom/discord/app/AppLog;->recordBreadcrumb(Ljava/lang/String;Ljava/lang/String;)V
goto :goto_0
:cond_1
invoke-static {}, Lcom/google/firebase/crashlytics/FirebaseCrashlytics;->getInstance()Lcom/google/firebase/crashlytics/FirebaseCrashlytics;
move-result-object v1
iget-object v2, p0, Lf/a/b/j;->$throwable:Ljava/lang/Throwable;
if-eqz v2, :cond_2
goto :goto_1
:cond_2
new-instance v2, Ljava/lang/Exception;
invoke-direct {v2, p1}, Ljava/lang/Exception;-><init>(Ljava/lang/String;)V
:goto_1
invoke-virtual {v1, v2}, Lcom/google/firebase/crashlytics/FirebaseCrashlytics;->recordException(Ljava/lang/Throwable;)V
:try_end_1
.catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_0
goto :goto_2
:catch_0
move-exception p1
sget-object v1, Lcom/discord/app/AppLog;->c:Lcom/discord/app/AppLog;
const/4 v2, 0x4
const-string v3, "Unable to notify error logging."
invoke-virtual {v1, v3, v2, p1, v0}, Lcom/discord/app/AppLog;->b(Ljava/lang/String;ILjava/lang/Throwable;Ljava/util/Map;)V
:goto_2
return-void
:cond_3
const-string p1, "message"
invoke-static {p1}, Lj0/o/c/h;->c(Ljava/lang/String;)V
throw v0
.end method