250 lines
5.3 KiB
Smali
250 lines
5.3 KiB
Smali
.class public Lcom/moji/weathersence/data/ThemeConfig$ThemeConfigFactory;
|
|
.super Ljava/lang/Object;
|
|
.source "ThemeConfig.java"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
value = Lcom/moji/weathersence/data/ThemeConfig;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x9
|
|
name = "ThemeConfigFactory"
|
|
.end annotation
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>()V
|
|
.locals 0
|
|
|
|
.line 40
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static a(Ljava/lang/String;)Lcom/moji/weathersence/data/ThemeConfig;
|
|
.locals 5
|
|
.annotation build Landroid/support/annotation/Nullable;
|
|
.end annotation
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 48
|
|
:try_start_0
|
|
new-instance v1, Ljava/io/File;
|
|
|
|
invoke-direct {v1, p0}, Ljava/io/File;-><init>(Ljava/lang/String;)V
|
|
|
|
.line 49
|
|
invoke-virtual {v1}, Ljava/io/File;->exists()Z
|
|
|
|
move-result p0
|
|
|
|
if-eqz p0, :cond_2
|
|
|
|
invoke-virtual {v1}, Ljava/io/File;->isFile()Z
|
|
|
|
move-result p0
|
|
|
|
if-nez p0, :cond_0
|
|
|
|
goto :goto_1
|
|
|
|
.line 52
|
|
:cond_0
|
|
invoke-static {v1}, Lokio/Okio;->source(Ljava/io/File;)Lokio/Source;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-static {p0}, Lokio/Okio;->buffer(Lokio/Source;)Lokio/BufferedSource;
|
|
|
|
move-result-object p0
|
|
:try_end_0
|
|
.catch Ljava/io/FileNotFoundException; {:try_start_0 .. :try_end_0} :catch_6
|
|
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_5
|
|
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_4
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
.line 53
|
|
:try_start_1
|
|
new-instance v1, Lcom/google/gson/Gson;
|
|
|
|
invoke-direct {v1}, Lcom/google/gson/Gson;-><init>()V
|
|
|
|
invoke-interface {p0}, Lokio/BufferedSource;->readUtf8()Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
const-class v3, Lcom/moji/weathersence/data/ThemeConfig;
|
|
|
|
invoke-virtual {v1, v2, v3}, Lcom/google/gson/Gson;->fromJson(Ljava/lang/String;Ljava/lang/Class;)Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Lcom/moji/weathersence/data/ThemeConfig;
|
|
:try_end_1
|
|
.catch Ljava/io/FileNotFoundException; {:try_start_1 .. :try_end_1} :catch_3
|
|
.catch Ljava/io/IOException; {:try_start_1 .. :try_end_1} :catch_2
|
|
.catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_1
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_1
|
|
|
|
if-eqz p0, :cond_1
|
|
|
|
.line 63
|
|
:try_start_2
|
|
invoke-interface {p0}, Lokio/BufferedSource;->close()V
|
|
:try_end_2
|
|
.catch Ljava/io/IOException; {:try_start_2 .. :try_end_2} :catch_0
|
|
|
|
goto :goto_0
|
|
|
|
:catch_0
|
|
move-exception p0
|
|
|
|
.line 66
|
|
invoke-virtual {p0}, Ljava/io/IOException;->printStackTrace()V
|
|
|
|
:cond_1
|
|
:goto_0
|
|
return-object v1
|
|
|
|
:catch_1
|
|
move-exception v1
|
|
|
|
goto :goto_2
|
|
|
|
:catch_2
|
|
move-exception v1
|
|
|
|
goto :goto_3
|
|
|
|
:catch_3
|
|
move-exception v1
|
|
|
|
goto :goto_4
|
|
|
|
:cond_2
|
|
:goto_1
|
|
return-object v0
|
|
|
|
:catchall_0
|
|
move-exception p0
|
|
|
|
move-object v4, v0
|
|
|
|
move-object v0, p0
|
|
|
|
move-object p0, v4
|
|
|
|
goto :goto_6
|
|
|
|
:catch_4
|
|
move-exception v1
|
|
|
|
move-object p0, v0
|
|
|
|
:goto_2
|
|
:try_start_3
|
|
const-string v2, "ThemeConfigFactory"
|
|
|
|
.line 59
|
|
invoke-static {v2, v1}, Lcom/moji/tool/log/MJLogger;->a(Ljava/lang/String;Ljava/lang/Throwable;)V
|
|
:try_end_3
|
|
.catchall {:try_start_3 .. :try_end_3} :catchall_1
|
|
|
|
if-eqz p0, :cond_3
|
|
|
|
.line 63
|
|
:try_start_4
|
|
invoke-interface {p0}, Lokio/BufferedSource;->close()V
|
|
:try_end_4
|
|
.catch Ljava/io/IOException; {:try_start_4 .. :try_end_4} :catch_7
|
|
|
|
goto :goto_5
|
|
|
|
:catch_5
|
|
move-exception v1
|
|
|
|
move-object p0, v0
|
|
|
|
:goto_3
|
|
:try_start_5
|
|
const-string v2, "ThemeConfigFactory"
|
|
|
|
.line 57
|
|
invoke-static {v2, v1}, Lcom/moji/tool/log/MJLogger;->a(Ljava/lang/String;Ljava/lang/Throwable;)V
|
|
:try_end_5
|
|
.catchall {:try_start_5 .. :try_end_5} :catchall_1
|
|
|
|
if-eqz p0, :cond_3
|
|
|
|
.line 63
|
|
:try_start_6
|
|
invoke-interface {p0}, Lokio/BufferedSource;->close()V
|
|
:try_end_6
|
|
.catch Ljava/io/IOException; {:try_start_6 .. :try_end_6} :catch_7
|
|
|
|
goto :goto_5
|
|
|
|
:catch_6
|
|
move-exception v1
|
|
|
|
move-object p0, v0
|
|
|
|
:goto_4
|
|
:try_start_7
|
|
const-string v2, "ThemeConfigFactory"
|
|
|
|
.line 55
|
|
invoke-static {v2, v1}, Lcom/moji/tool/log/MJLogger;->a(Ljava/lang/String;Ljava/lang/Throwable;)V
|
|
:try_end_7
|
|
.catchall {:try_start_7 .. :try_end_7} :catchall_1
|
|
|
|
if-eqz p0, :cond_3
|
|
|
|
.line 63
|
|
:try_start_8
|
|
invoke-interface {p0}, Lokio/BufferedSource;->close()V
|
|
:try_end_8
|
|
.catch Ljava/io/IOException; {:try_start_8 .. :try_end_8} :catch_7
|
|
|
|
goto :goto_5
|
|
|
|
:catch_7
|
|
move-exception p0
|
|
|
|
.line 66
|
|
invoke-virtual {p0}, Ljava/io/IOException;->printStackTrace()V
|
|
|
|
:cond_3
|
|
:goto_5
|
|
return-object v0
|
|
|
|
:catchall_1
|
|
move-exception v0
|
|
|
|
:goto_6
|
|
if-eqz p0, :cond_4
|
|
|
|
.line 63
|
|
:try_start_9
|
|
invoke-interface {p0}, Lokio/BufferedSource;->close()V
|
|
:try_end_9
|
|
.catch Ljava/io/IOException; {:try_start_9 .. :try_end_9} :catch_8
|
|
|
|
goto :goto_7
|
|
|
|
:catch_8
|
|
move-exception p0
|
|
|
|
.line 66
|
|
invoke-virtual {p0}, Ljava/io/IOException;->printStackTrace()V
|
|
|
|
.line 68
|
|
:cond_4
|
|
:goto_7
|
|
throw v0
|
|
.end method
|