CrashHandler.smali
.class public final Lcom/facebook/internal/instrument/crashreport/CrashHandler;
.super Ljava/lang/Object;
.source "SourceFile"
# interfaces
.implements Ljava/lang/Thread$UncaughtExceptionHandler;
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/facebook/internal/instrument/crashreport/CrashHandler$Companion;
}
.end annotation
# static fields
.field public static final Companion:Lcom/facebook/internal/instrument/crashreport/CrashHandler$Companion;
.field private static final MAX_CRASH_REPORT_NUM:I = 0x5
.field private static final TAG:Ljava/lang/String;
.field private static instance:Lcom/facebook/internal/instrument/crashreport/CrashHandler;
# instance fields
.field private final previousHandler:Ljava/lang/Thread$UncaughtExceptionHandler;
# direct methods
.method public static constructor <clinit>()V
.registers 2
new-instance v0, Lcom/facebook/internal/instrument/crashreport/CrashHandler$Companion;
const/4 v1, 0x0
invoke-direct {v0, v1}, Lcom/facebook/internal/instrument/crashreport/CrashHandler$Companion;-><init>(Lkotlin/jvm/internal/e;)V
sput-object v0, Lcom/facebook/internal/instrument/crashreport/CrashHandler;->Companion:Lcom/facebook/internal/instrument/crashreport/CrashHandler$Companion;
const-class v0, Lcom/facebook/internal/instrument/crashreport/CrashHandler;
invoke-virtual {v0}, Ljava/lang/Class;->getCanonicalName()Ljava/lang/String;
move-result-object v0
sput-object v0, Lcom/facebook/internal/instrument/crashreport/CrashHandler;->TAG:Ljava/lang/String;
return-void
.end method
.method private constructor <init>(Ljava/lang/Thread$UncaughtExceptionHandler;)V
.registers 2
.line 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 2
iput-object p1, p0, Lcom/facebook/internal/instrument/crashreport/CrashHandler;->previousHandler:Ljava/lang/Thread$UncaughtExceptionHandler;
return-void
.end method
.method public synthetic constructor <init>(Ljava/lang/Thread$UncaughtExceptionHandler;Lkotlin/jvm/internal/e;)V
.registers 3
invoke-direct {p0, p1}, Lcom/facebook/internal/instrument/crashreport/CrashHandler;-><init>(Ljava/lang/Thread$UncaughtExceptionHandler;)V
return-void
.end method
.method public static final synthetic access$getInstance$cp()Lcom/facebook/internal/instrument/crashreport/CrashHandler;
.registers 1
sget-object v0, Lcom/facebook/internal/instrument/crashreport/CrashHandler;->instance:Lcom/facebook/internal/instrument/crashreport/CrashHandler;
return-object v0
.end method
.method public static final synthetic access$getTAG$cp()Ljava/lang/String;
.registers 1
sget-object v0, Lcom/facebook/internal/instrument/crashreport/CrashHandler;->TAG:Ljava/lang/String;
return-object v0
.end method
.method public static final synthetic access$setInstance$cp(Lcom/facebook/internal/instrument/crashreport/CrashHandler;)V
.registers 1
sput-object p0, Lcom/facebook/internal/instrument/crashreport/CrashHandler;->instance:Lcom/facebook/internal/instrument/crashreport/CrashHandler;
return-void
.end method
.method public static final declared-synchronized enable()V
.registers 2
const-class v0, Lcom/facebook/internal/instrument/crashreport/CrashHandler;
monitor-enter v0
:try_start_3
sget-object v1, Lcom/facebook/internal/instrument/crashreport/CrashHandler;->Companion:Lcom/facebook/internal/instrument/crashreport/CrashHandler$Companion;
invoke-virtual {v1}, Lcom/facebook/internal/instrument/crashreport/CrashHandler$Companion;->enable()V
:try_end_8
.catchall {:try_start_3 .. :try_end_8} :catchall_a
monitor-exit v0
return-void
:catchall_a
move-exception v1
monitor-exit v0
throw v1
.end method
# virtual methods
.method public uncaughtException(Ljava/lang/Thread;Ljava/lang/Throwable;)V
.registers 4
const-string v0, "t"
invoke-static {p1, v0}, Lcom/shopee/sz/loadtask/datasource/a;->y(Ljava/lang/Object;Ljava/lang/String;)V
const-string v0, "e"
invoke-static {p2, v0}, Lcom/shopee/sz/loadtask/datasource/a;->y(Ljava/lang/Object;Ljava/lang/String;)V
.line 1
sget-object v0, Lcom/facebook/internal/instrument/InstrumentUtility;->INSTANCE:Lcom/facebook/internal/instrument/InstrumentUtility;
invoke-static {p2}, Lcom/facebook/internal/instrument/InstrumentUtility;->isSDKRelatedException(Ljava/lang/Throwable;)Z
move-result v0
if-eqz v0, :cond_22
.line 2
sget-object v0, Lcom/facebook/internal/instrument/ExceptionAnalyzer;->INSTANCE:Lcom/facebook/internal/instrument/ExceptionAnalyzer;
invoke-static {p2}, Lcom/facebook/internal/instrument/ExceptionAnalyzer;->execute(Ljava/lang/Throwable;)V
.line 3
sget-object v0, Lcom/facebook/internal/instrument/InstrumentData$Builder;->INSTANCE:Lcom/facebook/internal/instrument/InstrumentData$Builder;
sget-object v0, Lcom/facebook/internal/instrument/InstrumentData$Type;->CrashReport:Lcom/facebook/internal/instrument/InstrumentData$Type;
invoke-static {p2, v0}, Lcom/facebook/internal/instrument/InstrumentData$Builder;->build(Ljava/lang/Throwable;Lcom/facebook/internal/instrument/InstrumentData$Type;)Lcom/facebook/internal/instrument/InstrumentData;
move-result-object v0
invoke-virtual {v0}, Lcom/facebook/internal/instrument/InstrumentData;->save()V
.line 4
:cond_22
iget-object v0, p0, Lcom/facebook/internal/instrument/crashreport/CrashHandler;->previousHandler:Ljava/lang/Thread$UncaughtExceptionHandler;
if-nez v0, :cond_27
goto :goto_2a
:cond_27
invoke-interface {v0, p1, p2}, Ljava/lang/Thread$UncaughtExceptionHandler;->uncaughtException(Ljava/lang/Thread;Ljava/lang/Throwable;)V
:goto_2a
return-void
.end method