CrashModule.smali
.class public Lcom/tencent/bugly/CrashModule;
.super Lcom/tencent/bugly/a;
.source "BUGLY"
# static fields
.field public static final MODULE_ID:I = 0x3ec
.field private static c:I
.field private static e:Lcom/tencent/bugly/CrashModule;
# instance fields
.field private a:J
.field private b:Lcom/tencent/bugly/BuglyStrategy$a;
.field private d:Z
# direct methods
.method static constructor <clinit>()V
.registers 1
.prologue
.line 27
const/4 v0, 0x0
sput v0, Lcom/tencent/bugly/CrashModule;->c:I
.line 30
new-instance v0, Lcom/tencent/bugly/CrashModule;
invoke-direct {v0}, Lcom/tencent/bugly/CrashModule;-><init>()V
sput-object v0, Lcom/tencent/bugly/CrashModule;->e:Lcom/tencent/bugly/CrashModule;
return-void
.end method
.method public constructor <init>()V
.registers 2
.prologue
.line 22
invoke-direct {p0}, Lcom/tencent/bugly/a;-><init>()V
.line 28
const/4 v0, 0x0
iput-boolean v0, p0, Lcom/tencent/bugly/CrashModule;->d:Z
return-void
.end method
.method private declared-synchronized a(Landroid/content/Context;Lcom/tencent/bugly/BuglyStrategy;)V
.registers 9
.prologue
.line 98
monitor-enter p0
if-nez p2, :cond_5
.line 117
:cond_3
:goto_3
monitor-exit p0
return-void
.line 102
:cond_5
:try_start_5
invoke-virtual {p2}, Lcom/tencent/bugly/BuglyStrategy;->getLibBuglySOFilePath()Ljava/lang/String;
move-result-object v0
.line 103
invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v1
if-nez v1, :cond_21
.line 104
invoke-static {p1}, Lcom/tencent/bugly/crashreport/common/info/a;->a(Landroid/content/Context;)Lcom/tencent/bugly/crashreport/common/info/a;
move-result-object v1
iput-object v0, v1, Lcom/tencent/bugly/crashreport/common/info/a;->n:Ljava/lang/String;
.line 105
const-string/jumbo v1, "setted libBugly.so file path :%s"
const/4 v2, 0x1
new-array v2, v2, [Ljava/lang/Object;
const/4 v3, 0x0
aput-object v0, v2, v3
invoke-static {v1, v2}, Lcom/tencent/bugly/proguard/x;->a(Ljava/lang/String;[Ljava/lang/Object;)Z
.line 108
:cond_21
invoke-virtual {p2}, Lcom/tencent/bugly/BuglyStrategy;->getCrashHandleCallback()Lcom/tencent/bugly/BuglyStrategy$a;
move-result-object v0
if-eqz v0, :cond_36
.line 109
invoke-virtual {p2}, Lcom/tencent/bugly/BuglyStrategy;->getCrashHandleCallback()Lcom/tencent/bugly/BuglyStrategy$a;
move-result-object v0
iput-object v0, p0, Lcom/tencent/bugly/CrashModule;->b:Lcom/tencent/bugly/BuglyStrategy$a;
.line 110
const-string/jumbo v0, "setted CrashHanldeCallback"
const/4 v1, 0x0
new-array v1, v1, [Ljava/lang/Object;
invoke-static {v0, v1}, Lcom/tencent/bugly/proguard/x;->a(Ljava/lang/String;[Ljava/lang/Object;)Z
.line 113
:cond_36
invoke-virtual {p2}, Lcom/tencent/bugly/BuglyStrategy;->getAppReportDelay()J
move-result-wide v0
const-wide/16 v2, 0x0
cmp-long v0, v0, v2
if-lez v0, :cond_3
.line 114
invoke-virtual {p2}, Lcom/tencent/bugly/BuglyStrategy;->getAppReportDelay()J
move-result-wide v0
iput-wide v0, p0, Lcom/tencent/bugly/CrashModule;->a:J
.line 115
const-string/jumbo v0, "setted delay: %d"
const/4 v1, 0x1
new-array v1, v1, [Ljava/lang/Object;
const/4 v2, 0x0
iget-wide v4, p0, Lcom/tencent/bugly/CrashModule;->a:J
invoke-static {v4, v5}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
move-result-object v3
aput-object v3, v1, v2
invoke-static {v0, v1}, Lcom/tencent/bugly/proguard/x;->a(Ljava/lang/String;[Ljava/lang/Object;)Z
:try_end_58
.catchall {:try_start_5 .. :try_end_58} :catchall_59
goto :goto_3
.line 98
:catchall_59
move-exception v0
monitor-exit p0
throw v0
.end method
.method public static getInstance()Lcom/tencent/bugly/CrashModule;
.registers 2
.prologue
.line 33
sget-object v0, Lcom/tencent/bugly/CrashModule;->e:Lcom/tencent/bugly/CrashModule;
const/16 v1, 0x3ec
iput v1, v0, Lcom/tencent/bugly/CrashModule;->id:I
.line 34
sget-object v0, Lcom/tencent/bugly/CrashModule;->e:Lcom/tencent/bugly/CrashModule;
return-object v0
.end method
# virtual methods
.method public getTables()[Ljava/lang/String;
.registers 4
.prologue
.line 134
const/4 v0, 0x1
new-array v0, v0, [Ljava/lang/String;
const/4 v1, 0x0
const-string/jumbo v2, "t_cr"
aput-object v2, v0, v1
return-object v0
.end method
.method public declared-synchronized hasInitialized()Z
.registers 2
.prologue
.line 38
monitor-enter p0
:try_start_1
iget-boolean v0, p0, Lcom/tencent/bugly/CrashModule;->d:Z
:try_end_3
.catchall {:try_start_1 .. :try_end_3} :catchall_5
monitor-exit p0
return v0
:catchall_5
move-exception v0
monitor-exit p0
throw v0
.end method
.method public declared-synchronized init(Landroid/content/Context;ZLcom/tencent/bugly/BuglyStrategy;)V
.registers 10
.prologue
.line 48
monitor-enter p0
if-eqz p1, :cond_7
:try_start_3
iget-boolean v0, p0, Lcom/tencent/bugly/CrashModule;->d:Z
:try_end_5
.catchall {:try_start_3 .. :try_end_5} :catchall_8d
if-eqz v0, :cond_9
.line 95
:cond_7
:goto_7
monitor-exit p0
return-void
.line 51
:cond_9
:try_start_9
const-string v0, "Initializing crash module."
const/4 v1, 0x0
new-array v1, v1, [Ljava/lang/Object;
invoke-static {v0, v1}, Lcom/tencent/bugly/proguard/x;->a(Ljava/lang/String;[Ljava/lang/Object;)Z
.line 52
invoke-static {}, Lcom/tencent/bugly/proguard/n;->a()Lcom/tencent/bugly/proguard/n;
move-result-object v0
const/16 v1, 0x3ec
sget v2, Lcom/tencent/bugly/CrashModule;->c:I
add-int/lit8 v2, v2, 0x1
sput v2, Lcom/tencent/bugly/CrashModule;->c:I
invoke-virtual {v0, v1, v2}, Lcom/tencent/bugly/proguard/n;->a(II)V
.line 53
const/4 v0, 0x1
iput-boolean v0, p0, Lcom/tencent/bugly/CrashModule;->d:Z
.line 54
invoke-static {p1}, Lcom/tencent/bugly/crashreport/CrashReport;->setContext(Landroid/content/Context;)V
.line 55
invoke-direct {p0, p1, p3}, Lcom/tencent/bugly/CrashModule;->a(Landroid/content/Context;Lcom/tencent/bugly/BuglyStrategy;)V
.line 56
const/16 v0, 0x3ec
iget-object v3, p0, Lcom/tencent/bugly/CrashModule;->b:Lcom/tencent/bugly/BuglyStrategy$a;
const/4 v4, 0x0
const/4 v5, 0x0
move-object v1, p1
move v2, p2
invoke-static/range {v0 .. v5}, Lcom/tencent/bugly/crashreport/crash/c;->a(ILandroid/content/Context;ZLcom/tencent/bugly/BuglyStrategy$a;Lcom/tencent/bugly/proguard/o;Ljava/lang/String;)Lcom/tencent/bugly/crashreport/crash/c;
move-result-object v2
.line 58
invoke-virtual {v2}, Lcom/tencent/bugly/crashreport/crash/c;->e()V
.line 59
if-eqz p3, :cond_48
.line 60
invoke-virtual {p3}, Lcom/tencent/bugly/BuglyStrategy;->getCallBackType()I
move-result v0
invoke-virtual {v2, v0}, Lcom/tencent/bugly/crashreport/crash/c;->a(I)V
.line 61
invoke-virtual {p3}, Lcom/tencent/bugly/BuglyStrategy;->getCloseErrorCallback()Z
move-result v0
invoke-virtual {v2, v0}, Lcom/tencent/bugly/crashreport/crash/c;->a(Z)V
.line 64
:cond_48
invoke-virtual {v2}, Lcom/tencent/bugly/crashreport/crash/c;->m()V
.line 66
if-eqz p3, :cond_53
invoke-virtual {p3}, Lcom/tencent/bugly/BuglyStrategy;->isEnableNativeCrashMonitor()Z
move-result v0
if-eqz v0, :cond_90
.line 67
:cond_53
invoke-virtual {v2}, Lcom/tencent/bugly/crashreport/crash/c;->g()V
.line 72
:goto_56
if-eqz p3, :cond_5e
invoke-virtual {p3}, Lcom/tencent/bugly/BuglyStrategy;->isEnableANRCrashMonitor()Z
move-result v0
if-eqz v0, :cond_9c
.line 73
:cond_5e
invoke-virtual {v2}, Lcom/tencent/bugly/crashreport/crash/c;->h()V
.line 79
:goto_61
if-eqz p3, :cond_a8
invoke-virtual {p3}, Lcom/tencent/bugly/BuglyStrategy;->getAppReportDelay()J
move-result-wide v0
.line 81
:goto_67
invoke-virtual {v2, v0, v1}, Lcom/tencent/bugly/crashreport/crash/c;->a(J)V
.line 83
invoke-virtual {v2}, Lcom/tencent/bugly/crashreport/crash/c;->l()V
.line 86
invoke-static {p1}, Lcom/tencent/bugly/crashreport/crash/d;->a(Landroid/content/Context;)Lcom/tencent/bugly/crashreport/crash/d;
.line 89
invoke-static {}, Lcom/tencent/bugly/crashreport/crash/BuglyBroadcastReceiver;->getInstance()Lcom/tencent/bugly/crashreport/crash/BuglyBroadcastReceiver;
move-result-object v0
.line 90
const-string v1, "android.net.conn.CONNECTIVITY_CHANGE"
invoke-virtual {v0, v1}, Lcom/tencent/bugly/crashreport/crash/BuglyBroadcastReceiver;->addFilter(Ljava/lang/String;)V
.line 91
invoke-virtual {v0, p1}, Lcom/tencent/bugly/crashreport/crash/BuglyBroadcastReceiver;->register(Landroid/content/Context;)V
.line 93
invoke-static {}, Lcom/tencent/bugly/proguard/n;->a()Lcom/tencent/bugly/proguard/n;
move-result-object v0
const/16 v1, 0x3ec
sget v2, Lcom/tencent/bugly/CrashModule;->c:I
add-int/lit8 v2, v2, -0x1
sput v2, Lcom/tencent/bugly/CrashModule;->c:I
invoke-virtual {v0, v1, v2}, Lcom/tencent/bugly/proguard/n;->a(II)V
:try_end_8b
.catchall {:try_start_9 .. :try_end_8b} :catchall_8d
goto/16 :goto_7
.line 48
:catchall_8d
move-exception v0
monitor-exit p0
throw v0
.line 69
:cond_90
:try_start_90
const-string v0, "[crash] Closed native crash monitor!"
const/4 v1, 0x0
new-array v1, v1, [Ljava/lang/Object;
invoke-static {v0, v1}, Lcom/tencent/bugly/proguard/x;->a(Ljava/lang/String;[Ljava/lang/Object;)Z
.line 70
invoke-virtual {v2}, Lcom/tencent/bugly/crashreport/crash/c;->f()V
goto :goto_56
.line 75
:cond_9c
const-string v0, "[crash] Closed ANR monitor!"
const/4 v1, 0x0
new-array v1, v1, [Ljava/lang/Object;
invoke-static {v0, v1}, Lcom/tencent/bugly/proguard/x;->a(Ljava/lang/String;[Ljava/lang/Object;)Z
.line 76
invoke-virtual {v2}, Lcom/tencent/bugly/crashreport/crash/c;->i()V
:try_end_a7
.catchall {:try_start_90 .. :try_end_a7} :catchall_8d
goto :goto_61
.line 79
:cond_a8
const-wide/16 v0, 0x0
goto :goto_67
.end method
.method public onServerStrategyChanged(Lcom/tencent/bugly/crashreport/common/strategy/StrategyBean;)V
.registers 3
.prologue
.line 121
if-nez p1, :cond_3
.line 128
:cond_2
:goto_2
return-void
.line 124
:cond_3
invoke-static {}, Lcom/tencent/bugly/crashreport/crash/c;->a()Lcom/tencent/bugly/crashreport/crash/c;
move-result-object v0
.line 125
if-eqz v0, :cond_2
.line 126
invoke-virtual {v0, p1}, Lcom/tencent/bugly/crashreport/crash/c;->a(Lcom/tencent/bugly/crashreport/common/strategy/StrategyBean;)V
goto :goto_2
.end method