h.smali
.class public final Lsg/bigo/live/support64/stat/h;
.super Ljava/lang/Object;
.source "SourceFile"
# static fields
.field public static a:I
# direct methods
.method public constructor <init>()V
.registers 1
.line 24
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method public static declared-synchronized a(Landroid/content/Context;Ljava/lang/String;Ljava/lang/Class;)Ljava/lang/Object;
.registers 9
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">(",
"Landroid/content/Context;",
"Ljava/lang/String;",
"Ljava/lang/Class<",
"TT;>;)TT;"
}
.end annotation
const-class v0, Lsg/bigo/live/support64/stat/h;
monitor-enter v0
.line 27
:try_start_3
new-instance v1, Ljava/io/File;
invoke-virtual {p0}, Landroid/content/Context;->getFilesDir()Ljava/io/File;
move-result-object v2
invoke-direct {v1, v2, p1}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V
:try_end_c
.catchall {:try_start_3 .. :try_end_c} :catchall_6e
const/4 v2, 0x0
.line 31
:try_start_d
invoke-static {v1}, Llive/sg/bigo/svcapi/util/g;->a(Ljava/io/File;)[B
move-result-object v1
:try_end_11
.catch Ljava/io/OptionalDataException; {:try_start_d .. :try_end_11} :catch_68
.catch Ljava/lang/ClassNotFoundException; {:try_start_d .. :try_end_11} :catch_64
.catch Ljava/io/IOException; {:try_start_d .. :try_end_11} :catch_60
.catch Ljava/lang/ClassCastException; {:try_start_d .. :try_end_11} :catch_36
.catchall {:try_start_d .. :try_end_11} :catchall_34
if-nez v1, :cond_15
.line 33
monitor-exit v0
return-object v2
.line 35
:cond_15
:try_start_15
new-instance v3, Ljava/io/ObjectInputStream;
new-instance v4, Ljava/io/ByteArrayInputStream;
invoke-direct {v4, v1}, Ljava/io/ByteArrayInputStream;-><init>([B)V
invoke-direct {v3, v4}, Ljava/io/ObjectInputStream;-><init>(Ljava/io/InputStream;)V
:try_end_1f
.catch Ljava/io/OptionalDataException; {:try_start_15 .. :try_end_1f} :catch_68
.catch Ljava/lang/ClassNotFoundException; {:try_start_15 .. :try_end_1f} :catch_64
.catch Ljava/io/IOException; {:try_start_15 .. :try_end_1f} :catch_60
.catch Ljava/lang/ClassCastException; {:try_start_15 .. :try_end_1f} :catch_36
.catchall {:try_start_15 .. :try_end_1f} :catchall_34
.line 36
:try_start_1f
invoke-virtual {v3}, Ljava/io/ObjectInputStream;->readObject()Ljava/lang/Object;
move-result-object v1
invoke-virtual {p2, v1}, Ljava/lang/Class;->cast(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object p0
:try_end_27
.catch Ljava/io/OptionalDataException; {:try_start_1f .. :try_end_27} :catch_32
.catch Ljava/lang/ClassNotFoundException; {:try_start_1f .. :try_end_27} :catch_30
.catch Ljava/io/IOException; {:try_start_1f .. :try_end_27} :catch_2e
.catch Ljava/lang/ClassCastException; {:try_start_1f .. :try_end_27} :catch_2c
.catchall {:try_start_1f .. :try_end_27} :catchall_58
.line 49
:try_start_27
invoke-virtual {v3}, Ljava/io/ObjectInputStream;->close()V
:try_end_2a
.catch Ljava/io/IOException; {:try_start_27 .. :try_end_2a} :catch_2a
.catchall {:try_start_27 .. :try_end_2a} :catchall_6e
.line 36
:catch_2a
monitor-exit v0
return-object p0
:catch_2c
move-exception p2
goto :goto_38
:catch_2e
nop
goto :goto_61
:catch_30
nop
goto :goto_65
:catch_32
nop
goto :goto_69
:catchall_34
move-exception p0
goto :goto_5a
:catch_36
move-exception p2
move-object v3, v2
:goto_38
:try_start_38
const-string v1, "mark"
.line 44
new-instance v4, Ljava/lang/StringBuilder;
const-string v5, "cast exception: "
invoke-direct {v4, v5}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-virtual {p2}, Ljava/lang/ClassCastException;->getMessage()Ljava/lang/String;
move-result-object p2
invoke-virtual {v4, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p2
invoke-static {v1, p2}, Lsg/bigo/log/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
.line 45
invoke-static {p0, p1}, Lsg/bigo/live/support64/stat/h;->a(Landroid/content/Context;Ljava/lang/String;)V
:try_end_52
.catchall {:try_start_38 .. :try_end_52} :catchall_58
if-eqz v3, :cond_6c
.line 49
:goto_54
:try_start_54
invoke-virtual {v3}, Ljava/io/ObjectInputStream;->close()V
:try_end_57
.catch Ljava/io/IOException; {:try_start_54 .. :try_end_57} :catch_6c
.catchall {:try_start_54 .. :try_end_57} :catchall_6e
goto :goto_6c
:catchall_58
move-exception p0
move-object v2, v3
:goto_5a
if-eqz v2, :cond_5f
:try_start_5c
invoke-virtual {v2}, Ljava/io/ObjectInputStream;->close()V
:try_end_5f
.catch Ljava/io/IOException; {:try_start_5c .. :try_end_5f} :catch_5f
.catchall {:try_start_5c .. :try_end_5f} :catchall_6e
.line 52
:catch_5f
:cond_5f
:try_start_5f
throw p0
:try_end_60
.catchall {:try_start_5f .. :try_end_60} :catchall_6e
:catch_60
move-object v3, v2
:goto_61
if-eqz v3, :cond_6c
goto :goto_54
:catch_64
move-object v3, v2
:goto_65
if-eqz v3, :cond_6c
goto :goto_54
:catch_68
move-object v3, v2
:goto_69
if-eqz v3, :cond_6c
goto :goto_54
.line 55
:catch_6c
:cond_6c
:goto_6c
monitor-exit v0
return-object v2
:catchall_6e
move-exception p0
monitor-exit v0
goto :goto_72
:goto_71
throw p0
:goto_72
goto :goto_71
.end method
.method public static declared-synchronized a(Landroid/content/Context;Ljava/lang/String;)V
.registers 4
const-class v0, Lsg/bigo/live/support64/stat/h;
monitor-enter v0
.line 60
:try_start_3
new-instance v1, Ljava/io/File;
invoke-virtual {p0}, Landroid/content/Context;->getFilesDir()Ljava/io/File;
move-result-object p0
invoke-direct {v1, p0, p1}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V
invoke-static {v1}, Llive/sg/bigo/svcapi/util/g;->b(Ljava/io/File;)V
:try_end_f
.catchall {:try_start_3 .. :try_end_f} :catchall_11
.line 61
monitor-exit v0
return-void
:catchall_11
move-exception p0
monitor-exit v0
throw p0
.end method
.method public static declared-synchronized a(Landroid/content/Context;Ljava/lang/String;Ljava/lang/Object;)V
.registers 6
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">(",
"Landroid/content/Context;",
"Ljava/lang/String;",
"TT;)V"
}
.end annotation
const-class v0, Lsg/bigo/live/support64/stat/h;
monitor-enter v0
.line 65
:try_start_3
new-instance v1, Ljava/io/File;
invoke-virtual {p0}, Landroid/content/Context;->getFilesDir()Ljava/io/File;
move-result-object p0
invoke-direct {v1, p0, p1}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V
:try_end_c
.catchall {:try_start_3 .. :try_end_c} :catchall_4d
const/4 p0, 0x0
.line 69
:try_start_d
new-instance p1, Ljava/io/ByteArrayOutputStream;
invoke-direct {p1}, Ljava/io/ByteArrayOutputStream;-><init>()V
.line 70
new-instance v2, Ljava/io/ObjectOutputStream;
invoke-direct {v2, p1}, Ljava/io/ObjectOutputStream;-><init>(Ljava/io/OutputStream;)V
:try_end_17
.catch Ljava/lang/Exception; {:try_start_d .. :try_end_17} :catch_31
.catchall {:try_start_d .. :try_end_17} :catchall_2d
.line 71
:try_start_17
invoke-virtual {v2, p2}, Ljava/io/ObjectOutputStream;->writeObject(Ljava/lang/Object;)V
.line 72
invoke-virtual {v2}, Ljava/io/ObjectOutputStream;->flush()V
.line 73
invoke-virtual {p1}, Ljava/io/ByteArrayOutputStream;->toByteArray()[B
move-result-object p0
.line 75
invoke-static {v1, p0}, Llive/sg/bigo/svcapi/util/g;->a(Ljava/io/File;[B)V
:try_end_24
.catch Ljava/lang/Exception; {:try_start_17 .. :try_end_24} :catch_2b
.catchall {:try_start_17 .. :try_end_24} :catchall_46
.line 81
:try_start_24
invoke-virtual {v2}, Ljava/io/ObjectOutputStream;->close()V
:try_end_27
.catch Ljava/io/IOException; {:try_start_24 .. :try_end_27} :catch_29
.catchall {:try_start_24 .. :try_end_27} :catchall_4d
.line 84
monitor-exit v0
return-void
:catch_29
monitor-exit v0
return-void
:catch_2b
move-exception p0
goto :goto_34
:catchall_2d
move-exception p1
move-object v2, p0
move-object p0, p1
goto :goto_47
:catch_31
move-exception p1
move-object v2, p0
move-object p0, p1
:goto_34
:try_start_34
const-string p1, "mark"
const-string p2, "save stat to file failed"
.line 77
invoke-static {p1, p2, p0}, Lsg/bigo/log/Log;->w(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
:try_end_3b
.catchall {:try_start_34 .. :try_end_3b} :catchall_46
if-eqz v2, :cond_44
.line 81
:try_start_3d
invoke-virtual {v2}, Ljava/io/ObjectOutputStream;->close()V
:try_end_40
.catch Ljava/io/IOException; {:try_start_3d .. :try_end_40} :catch_42
.catchall {:try_start_3d .. :try_end_40} :catchall_4d
.line 84
monitor-exit v0
return-void
:catch_42
monitor-exit v0
return-void
.line 87
:cond_44
monitor-exit v0
return-void
:catchall_46
move-exception p0
:goto_47
if-eqz v2, :cond_4c
.line 81
:try_start_49
invoke-virtual {v2}, Ljava/io/ObjectOutputStream;->close()V
:try_end_4c
.catch Ljava/io/IOException; {:try_start_49 .. :try_end_4c} :catch_4c
.catchall {:try_start_49 .. :try_end_4c} :catchall_4d
.line 84
:catch_4c
:cond_4c
:try_start_4c
throw p0
:try_end_4d
.catchall {:try_start_4c .. :try_end_4d} :catchall_4d
:catchall_4d
move-exception p0
monitor-exit v0
throw p0
.end method