u.smali
.class public Lcom/amap/api/services/a/u;
.super Lcom/amap/api/services/a/x;
# static fields
.field private static a:Z
# instance fields
.field private b:[Ljava/lang/String;
.field private c:I
.field private d:Z
.field private e:I
# direct methods
.method static constructor <clinit>()V
.registers 1
const/4 v0, 0x1
sput-boolean v0, Lcom/amap/api/services/a/u;->a:Z
return-void
.end method
.method protected constructor <init>(I)V
.registers 4
const/4 v1, 0x0
invoke-direct {p0, p1}, Lcom/amap/api/services/a/x;-><init>(I)V
const/16 v0, 0xa
new-array v0, v0, [Ljava/lang/String;
iput-object v0, p0, Lcom/amap/api/services/a/u;->b:[Ljava/lang/String;
iput v1, p0, Lcom/amap/api/services/a/u;->c:I
iput-boolean v1, p0, Lcom/amap/api/services/a/u;->d:Z
iput v1, p0, Lcom/amap/api/services/a/u;->e:I
return-void
.end method
.method private b(Ljava/lang/String;)V
.registers 5
:try_start_0
iget v0, p0, Lcom/amap/api/services/a/u;->c:I
const/16 v1, 0x9
if-le v0, v1, :cond_9
const/4 v0, 0x0
iput v0, p0, Lcom/amap/api/services/a/u;->c:I
:cond_9
iget-object v0, p0, Lcom/amap/api/services/a/u;->b:[Ljava/lang/String;
iget v1, p0, Lcom/amap/api/services/a/u;->c:I
aput-object p1, v0, v1
iget v0, p0, Lcom/amap/api/services/a/u;->c:I
add-int/lit8 v0, v0, 0x1
iput v0, p0, Lcom/amap/api/services/a/u;->c:I
:try_end_15
.catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_15} :catch_16
:goto_15
return-void
:catch_16
move-exception v0
const-string/jumbo v1, "ANRWriter"
const-string/jumbo v2, "addData"
invoke-static {v0, v1, v2}, Lcom/amap/api/services/a/q;->a(Ljava/lang/Throwable;Ljava/lang/String;Ljava/lang/String;)V
goto :goto_15
.end method
.method private d()Ljava/lang/String;
.registers 5
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
:try_start_5
iget v0, p0, Lcom/amap/api/services/a/u;->c:I
:goto_7
const/16 v2, 0xa
if-ge v0, v2, :cond_f
const/16 v2, 0x9
if-le v0, v2, :cond_1e
:cond_f
const/4 v0, 0x0
:goto_10
iget v2, p0, Lcom/amap/api/services/a/u;->c:I
if-ge v0, v2, :cond_32
iget-object v2, p0, Lcom/amap/api/services/a/u;->b:[Ljava/lang/String;
aget-object v2, v2, v0
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
add-int/lit8 v0, v0, 0x1
goto :goto_10
:cond_1e
iget-object v2, p0, Lcom/amap/api/services/a/u;->b:[Ljava/lang/String;
aget-object v2, v2, v0
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
:try_end_25
.catch Ljava/lang/Throwable; {:try_start_5 .. :try_end_25} :catch_28
add-int/lit8 v0, v0, 0x1
goto :goto_7
:catch_28
move-exception v0
const-string/jumbo v2, "ANRWriter"
const-string/jumbo v3, "getLogInfo"
invoke-static {v0, v2, v3}, Lcom/amap/api/services/a/q;->a(Ljava/lang/Throwable;Ljava/lang/String;Ljava/lang/String;)V
:cond_32
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
return-object v0
.end method
# virtual methods
.method protected a(Ljava/util/List;)Ljava/lang/String;
.registers 11
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/util/List",
"<",
"Lcom/amap/api/services/a/n;",
">;)",
"Ljava/lang/String;"
}
.end annotation
const/4 v5, 0x0
const/4 v1, 0x0
const/4 v0, 0x0
const/4 v2, 0x0
:try_start_4
new-instance v4, Ljava/io/File;
const-string/jumbo v3, "/data/anr/traces.txt"
invoke-direct {v4, v3}, Ljava/io/File;-><init>(Ljava/lang/String;)V
invoke-virtual {v4}, Ljava/io/File;->exists()Z
:try_end_f
.catch Ljava/io/FileNotFoundException; {:try_start_4 .. :try_end_f} :catch_1bd
.catch Ljava/io/IOException; {:try_start_4 .. :try_end_f} :catch_b8
.catchall {:try_start_4 .. :try_end_f} :catchall_d7
move-result v3
if-nez v3, :cond_1e
if-eqz v1, :cond_17
:try_start_14
invoke-virtual {v2}, Lcom/amap/api/services/a/az;->close()V
:try_end_17
.catch Ljava/io/IOException; {:try_start_14 .. :try_end_17} :catch_155
.catch Ljava/lang/Throwable; {:try_start_14 .. :try_end_17} :catch_161
:cond_17
:goto_17
if-eqz v1, :cond_1c
:try_start_19
invoke-virtual {v0}, Ljava/io/InputStream;->close()V
:try_end_1c
.catch Ljava/io/IOException; {:try_start_19 .. :try_end_1c} :catch_16d
.catch Ljava/lang/Throwable; {:try_start_19 .. :try_end_1c} :catch_179
:cond_1c
:goto_1c
move-object v0, v1
:goto_1d
return-object v0
:cond_1e
:try_start_1e
new-instance v3, Ljava/io/FileInputStream;
invoke-direct {v3, v4}, Ljava/io/FileInputStream;-><init>(Ljava/io/File;)V
:try_end_23
.catch Ljava/io/FileNotFoundException; {:try_start_1e .. :try_end_23} :catch_1bd
.catch Ljava/io/IOException; {:try_start_1e .. :try_end_23} :catch_b8
.catchall {:try_start_1e .. :try_end_23} :catchall_d7
:try_start_23
new-instance v2, Lcom/amap/api/services/a/az;
sget-object v0, Lcom/amap/api/services/a/ba;->a:Ljava/nio/charset/Charset;
invoke-direct {v2, v3, v0}, Lcom/amap/api/services/a/az;-><init>(Ljava/io/InputStream;Ljava/nio/charset/Charset;)V
:try_end_2a
.catch Ljava/io/FileNotFoundException; {:try_start_23 .. :try_end_2a} :catch_1c2
.catch Ljava/io/IOException; {:try_start_23 .. :try_end_2a} :catch_1b6
.catchall {:try_start_23 .. :try_end_2a} :catchall_1af
move v4, v5
:cond_2b
:goto_2b
:try_start_2b
invoke-virtual {v2}, Lcom/amap/api/services/a/az;->a()Ljava/lang/String;
move-result-object v0
const-string/jumbo v6, "pid"
invoke-virtual {v0, v6}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v6
if-eqz v6, :cond_1ca
:goto_38
const-string/jumbo v4, "\"main\""
invoke-virtual {v0, v4}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v4
if-nez v4, :cond_46
invoke-virtual {v2}, Lcom/amap/api/services/a/az;->a()Ljava/lang/String;
move-result-object v0
goto :goto_38
:cond_46
const/4 v4, 0x1
move-object v6, v0
move v0, v4
:goto_49
const-string/jumbo v4, ""
invoke-virtual {v6, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v4
if-eqz v4, :cond_1c7
move v4, v5
:goto_53
if-eqz v4, :cond_2b
invoke-direct {p0, v6}, Lcom/amap/api/services/a/u;->b(Ljava/lang/String;)V
iget v0, p0, Lcom/amap/api/services/a/u;->e:I
:try_end_5a
.catch Ljava/io/EOFException; {:try_start_2b .. :try_end_5a} :catch_96
.catch Ljava/io/FileNotFoundException; {:try_start_2b .. :try_end_5a} :catch_9f
.catch Ljava/io/IOException; {:try_start_2b .. :try_end_5a} :catch_1ba
.catchall {:try_start_2b .. :try_end_5a} :catchall_1b3
const/4 v7, 0x5
if-ne v0, v7, :cond_70
:goto_5d
if-eqz v2, :cond_62
:try_start_5f
invoke-virtual {v2}, Lcom/amap/api/services/a/az;->close()V
:try_end_62
.catch Ljava/io/IOException; {:try_start_5f .. :try_end_62} :catch_185
.catch Ljava/lang/Throwable; {:try_start_5f .. :try_end_62} :catch_191
:cond_62
:goto_62
if-eqz v3, :cond_67
:try_start_64
invoke-virtual {v3}, Ljava/io/InputStream;->close()V
:try_end_67
.catch Ljava/io/IOException; {:try_start_64 .. :try_end_67} :catch_19d
.catch Ljava/lang/Throwable; {:try_start_64 .. :try_end_67} :catch_1a6
:cond_67
:goto_67
iget-boolean v0, p0, Lcom/amap/api/services/a/u;->d:Z
if-eqz v0, :cond_e5
invoke-direct {p0}, Lcom/amap/api/services/a/u;->d()Ljava/lang/String;
move-result-object v0
goto :goto_1d
:cond_70
:try_start_70
iget-boolean v0, p0, Lcom/amap/api/services/a/u;->d:Z
if-nez v0, :cond_98
invoke-interface {p1}, Ljava/util/List;->iterator()Ljava/util/Iterator;
move-result-object v7
:cond_78
:goto_78
invoke-interface {v7}, Ljava/util/Iterator;->hasNext()Z
move-result v0
if-eqz v0, :cond_2b
invoke-interface {v7}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v0
check-cast v0, Lcom/amap/api/services/a/n;
invoke-virtual {v0}, Lcom/amap/api/services/a/n;->e()[Ljava/lang/String;
move-result-object v8
invoke-static {v8, v6}, Lcom/amap/api/services/a/u;->b([Ljava/lang/String;Ljava/lang/String;)Z
move-result v8
iput-boolean v8, p0, Lcom/amap/api/services/a/u;->d:Z
iget-boolean v8, p0, Lcom/amap/api/services/a/u;->d:Z
if-eqz v8, :cond_78
invoke-virtual {p0, v0}, Lcom/amap/api/services/a/u;->a(Lcom/amap/api/services/a/n;)V
goto :goto_78
:catch_96
move-exception v0
goto :goto_5d
:cond_98
iget v0, p0, Lcom/amap/api/services/a/u;->e:I
add-int/lit8 v0, v0, 0x1
iput v0, p0, Lcom/amap/api/services/a/u;->e:I
:try_end_9e
.catch Ljava/io/EOFException; {:try_start_70 .. :try_end_9e} :catch_96
.catch Ljava/io/FileNotFoundException; {:try_start_70 .. :try_end_9e} :catch_9f
.catch Ljava/io/IOException; {:try_start_70 .. :try_end_9e} :catch_1ba
.catchall {:try_start_70 .. :try_end_9e} :catchall_1b3
goto :goto_2b
:catch_9f
move-exception v0
move-object v0, v2
move-object v2, v3
:goto_a2
if-eqz v0, :cond_a7
:try_start_a4
invoke-virtual {v0}, Lcom/amap/api/services/a/az;->close()V
:try_end_a7
.catch Ljava/io/IOException; {:try_start_a4 .. :try_end_a7} :catch_e8
.catch Ljava/lang/Throwable; {:try_start_a4 .. :try_end_a7} :catch_f3
:cond_a7
:goto_a7
if-eqz v2, :cond_67
:try_start_a9
invoke-virtual {v2}, Ljava/io/InputStream;->close()V
:try_end_ac
.catch Ljava/io/IOException; {:try_start_a9 .. :try_end_ac} :catch_ad
.catch Ljava/lang/Throwable; {:try_start_a9 .. :try_end_ac} :catch_fe
goto :goto_67
:catch_ad
move-exception v0
const-string/jumbo v2, "ANRWriter"
const-string/jumbo v3, "initLog3"
:goto_b4
invoke-static {v0, v2, v3}, Lcom/amap/api/services/a/q;->a(Ljava/lang/Throwable;Ljava/lang/String;Ljava/lang/String;)V
goto :goto_67
:catch_b8
move-exception v0
move-object v2, v1
move-object v3, v1
:goto_bb
:try_start_bb
const-string/jumbo v4, "ANRWriter"
const-string/jumbo v5, "initLog"
invoke-static {v0, v4, v5}, Lcom/amap/api/services/a/q;->a(Ljava/lang/Throwable;Ljava/lang/String;Ljava/lang/String;)V
:try_end_c4
.catchall {:try_start_bb .. :try_end_c4} :catchall_1b3
if-eqz v2, :cond_c9
:try_start_c6
invoke-virtual {v2}, Lcom/amap/api/services/a/az;->close()V
:try_end_c9
.catch Ljava/io/IOException; {:try_start_c6 .. :try_end_c9} :catch_136
.catch Ljava/lang/Throwable; {:try_start_c6 .. :try_end_c9} :catch_141
:cond_c9
:goto_c9
if-eqz v3, :cond_67
:try_start_cb
invoke-virtual {v3}, Ljava/io/InputStream;->close()V
:try_end_ce
.catch Ljava/io/IOException; {:try_start_cb .. :try_end_ce} :catch_cf
.catch Ljava/lang/Throwable; {:try_start_cb .. :try_end_ce} :catch_14d
goto :goto_67
:catch_cf
move-exception v0
const-string/jumbo v2, "ANRWriter"
const-string/jumbo v3, "initLog3"
goto :goto_b4
:catchall_d7
move-exception v0
move-object v2, v1
move-object v3, v1
:goto_da
if-eqz v2, :cond_df
:try_start_dc
invoke-virtual {v2}, Lcom/amap/api/services/a/az;->close()V
:try_end_df
.catch Ljava/io/IOException; {:try_start_dc .. :try_end_df} :catch_10a
.catch Ljava/lang/Throwable; {:try_start_dc .. :try_end_df} :catch_115
:cond_df
:goto_df
if-eqz v3, :cond_e4
:try_start_e1
invoke-virtual {v3}, Ljava/io/InputStream;->close()V
:try_end_e4
.catch Ljava/io/IOException; {:try_start_e1 .. :try_end_e4} :catch_120
.catch Ljava/lang/Throwable; {:try_start_e1 .. :try_end_e4} :catch_12b
:cond_e4
:goto_e4
throw v0
:cond_e5
move-object v0, v1
goto/16 :goto_1d
:catch_e8
move-exception v0
const-string/jumbo v3, "ANRWriter"
const-string/jumbo v4, "initLog1"
invoke-static {v0, v3, v4}, Lcom/amap/api/services/a/q;->a(Ljava/lang/Throwable;Ljava/lang/String;Ljava/lang/String;)V
goto :goto_a7
:catch_f3
move-exception v0
const-string/jumbo v3, "ANRWriter"
const-string/jumbo v4, "initLog2"
invoke-static {v0, v3, v4}, Lcom/amap/api/services/a/q;->a(Ljava/lang/Throwable;Ljava/lang/String;Ljava/lang/String;)V
goto :goto_a7
:catch_fe
move-exception v0
const-string/jumbo v2, "ANRWriter"
const-string/jumbo v3, "initLog4"
:goto_105
invoke-static {v0, v2, v3}, Lcom/amap/api/services/a/q;->a(Ljava/lang/Throwable;Ljava/lang/String;Ljava/lang/String;)V
goto/16 :goto_67
:catch_10a
move-exception v1
const-string/jumbo v2, "ANRWriter"
const-string/jumbo v4, "initLog1"
invoke-static {v1, v2, v4}, Lcom/amap/api/services/a/q;->a(Ljava/lang/Throwable;Ljava/lang/String;Ljava/lang/String;)V
goto :goto_df
:catch_115
move-exception v1
const-string/jumbo v2, "ANRWriter"
const-string/jumbo v4, "initLog2"
invoke-static {v1, v2, v4}, Lcom/amap/api/services/a/q;->a(Ljava/lang/Throwable;Ljava/lang/String;Ljava/lang/String;)V
goto :goto_df
:catch_120
move-exception v1
const-string/jumbo v2, "ANRWriter"
const-string/jumbo v3, "initLog3"
invoke-static {v1, v2, v3}, Lcom/amap/api/services/a/q;->a(Ljava/lang/Throwable;Ljava/lang/String;Ljava/lang/String;)V
goto :goto_e4
:catch_12b
move-exception v1
const-string/jumbo v2, "ANRWriter"
const-string/jumbo v3, "initLog4"
invoke-static {v1, v2, v3}, Lcom/amap/api/services/a/q;->a(Ljava/lang/Throwable;Ljava/lang/String;Ljava/lang/String;)V
goto :goto_e4
:catch_136
move-exception v0
const-string/jumbo v2, "ANRWriter"
const-string/jumbo v4, "initLog1"
invoke-static {v0, v2, v4}, Lcom/amap/api/services/a/q;->a(Ljava/lang/Throwable;Ljava/lang/String;Ljava/lang/String;)V
goto :goto_c9
:catch_141
move-exception v0
const-string/jumbo v2, "ANRWriter"
const-string/jumbo v4, "initLog2"
invoke-static {v0, v2, v4}, Lcom/amap/api/services/a/q;->a(Ljava/lang/Throwable;Ljava/lang/String;Ljava/lang/String;)V
goto/16 :goto_c9
:catch_14d
move-exception v0
const-string/jumbo v2, "ANRWriter"
const-string/jumbo v3, "initLog4"
goto :goto_105
:catch_155
move-exception v2
const-string/jumbo v3, "ANRWriter"
const-string/jumbo v4, "initLog1"
invoke-static {v2, v3, v4}, Lcom/amap/api/services/a/q;->a(Ljava/lang/Throwable;Ljava/lang/String;Ljava/lang/String;)V
goto/16 :goto_17
:catch_161
move-exception v2
const-string/jumbo v3, "ANRWriter"
const-string/jumbo v4, "initLog2"
invoke-static {v2, v3, v4}, Lcom/amap/api/services/a/q;->a(Ljava/lang/Throwable;Ljava/lang/String;Ljava/lang/String;)V
goto/16 :goto_17
:catch_16d
move-exception v0
const-string/jumbo v2, "ANRWriter"
const-string/jumbo v3, "initLog3"
invoke-static {v0, v2, v3}, Lcom/amap/api/services/a/q;->a(Ljava/lang/Throwable;Ljava/lang/String;Ljava/lang/String;)V
goto/16 :goto_1c
:catch_179
move-exception v0
const-string/jumbo v2, "ANRWriter"
const-string/jumbo v3, "initLog4"
invoke-static {v0, v2, v3}, Lcom/amap/api/services/a/q;->a(Ljava/lang/Throwable;Ljava/lang/String;Ljava/lang/String;)V
goto/16 :goto_1c
:catch_185
move-exception v0
const-string/jumbo v2, "ANRWriter"
const-string/jumbo v4, "initLog1"
invoke-static {v0, v2, v4}, Lcom/amap/api/services/a/q;->a(Ljava/lang/Throwable;Ljava/lang/String;Ljava/lang/String;)V
goto/16 :goto_62
:catch_191
move-exception v0
const-string/jumbo v2, "ANRWriter"
const-string/jumbo v4, "initLog2"
invoke-static {v0, v2, v4}, Lcom/amap/api/services/a/q;->a(Ljava/lang/Throwable;Ljava/lang/String;Ljava/lang/String;)V
goto/16 :goto_62
:catch_19d
move-exception v0
const-string/jumbo v2, "ANRWriter"
const-string/jumbo v3, "initLog3"
goto/16 :goto_b4
:catch_1a6
move-exception v0
const-string/jumbo v2, "ANRWriter"
const-string/jumbo v3, "initLog4"
goto/16 :goto_105
:catchall_1af
move-exception v0
move-object v2, v1
goto/16 :goto_da
:catchall_1b3
move-exception v0
goto/16 :goto_da
:catch_1b6
move-exception v0
move-object v2, v1
goto/16 :goto_bb
:catch_1ba
move-exception v0
goto/16 :goto_bb
:catch_1bd
move-exception v0
move-object v0, v1
move-object v2, v1
goto/16 :goto_a2
:catch_1c2
move-exception v0
move-object v0, v1
move-object v2, v3
goto/16 :goto_a2
:cond_1c7
move v4, v0
goto/16 :goto_53
:cond_1ca
move-object v6, v0
move v0, v4
goto/16 :goto_49
.end method
.method protected a(Landroid/content/Context;)Z
.registers 8
const/4 v0, 0x1
const/4 v1, 0x0
invoke-static {p1}, Lcom/amap/api/services/a/j;->m(Landroid/content/Context;)I
move-result v2
if-ne v2, v0, :cond_35
sget-boolean v2, Lcom/amap/api/services/a/u;->a:Z
if-eqz v2, :cond_35
sput-boolean v1, Lcom/amap/api/services/a/u;->a:Z
invoke-static {}, Landroid/os/Looper;->getMainLooper()Landroid/os/Looper;
move-result-object v2
monitor-enter v2
:try_start_13
new-instance v3, Lcom/amap/api/services/a/ai;
invoke-direct {v3, p1}, Lcom/amap/api/services/a/ai;-><init>(Landroid/content/Context;)V
invoke-virtual {v3}, Lcom/amap/api/services/a/ai;->a()Lcom/amap/api/services/a/aj;
move-result-object v4
if-nez v4, :cond_20
monitor-exit v2
:goto_1f
return v0
:cond_20
invoke-virtual {v4}, Lcom/amap/api/services/a/aj;->c()Z
move-result v5
if-eqz v5, :cond_32
const/4 v1, 0x0
invoke-virtual {v4, v1}, Lcom/amap/api/services/a/aj;->c(Z)V
invoke-virtual {v3, v4}, Lcom/amap/api/services/a/ai;->a(Lcom/amap/api/services/a/aj;)V
monitor-exit v2
goto :goto_1f
:catchall_2f
move-exception v0
monitor-exit v2
:try_end_31
.catchall {:try_start_13 .. :try_end_31} :catchall_2f
throw v0
:cond_32
:try_start_32
monitor-exit v2
:try_end_33
.catchall {:try_start_32 .. :try_end_33} :catchall_2f
move v0, v1
goto :goto_1f
:cond_35
move v0, v1
goto :goto_1f
.end method