ty.smali
.class public Ldxoptimizer/ty;
.super Ljava/lang/Object;
.source "LcService.java"
# static fields
.field private static a:I
.field private static b:Ljava/lang/String;
# direct methods
.method static constructor <clinit>()V
.registers 1
.prologue
.line 26
const/4 v0, 0x0
sput v0, Ldxoptimizer/ty;->a:I
.line 30
const-string v0, ""
sput-object v0, Ldxoptimizer/ty;->b:Ljava/lang/String;
return-void
.end method
.method private static a()Ljava/lang/String;
.registers 2
.prologue
.line 108
const-string v0, "/system/etc/dianxinos/ota/lc"
invoke-static {v0}, Ldxoptimizer/zk;->a(Ljava/lang/String;)[B
move-result-object v0
.line 109
if-eqz v0, :cond_12
.line 110
new-instance v1, Ljava/lang/String;
invoke-direct {v1, v0}, Ljava/lang/String;-><init>([B)V
invoke-virtual {v1}, Ljava/lang/String;->trim()Ljava/lang/String;
move-result-object v0
.line 112
:goto_11
return-object v0
:cond_12
const-string v0, ""
goto :goto_11
.end method
.method public static a(Landroid/content/Context;)Ljava/lang/String;
.registers 2
.prologue
.line 55
sget-object v0, Ldxoptimizer/ty;->b:Ljava/lang/String;
invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v0
if-eqz v0, :cond_e
.line 56
invoke-static {p0}, Ldxoptimizer/ty;->b(Landroid/content/Context;)Ljava/lang/String;
move-result-object v0
sput-object v0, Ldxoptimizer/ty;->b:Ljava/lang/String;
.line 58
:cond_e
sget-object v0, Ldxoptimizer/ty;->b:Ljava/lang/String;
return-object v0
.end method
.method public static a(I)Z
.registers 3
.prologue
const/4 v0, 0x1
.line 33
if-eqz p0, :cond_e
if-eq v0, p0, :cond_e
const/4 v1, 0x2
if-eq v1, p0, :cond_e
const/4 v1, 0x3
if-eq v1, p0, :cond_e
const/4 v1, 0x4
if-ne v1, p0, :cond_f
:cond_e
:goto_e
return v0
:cond_f
const/4 v0, 0x0
goto :goto_e
.end method
.method public static a(Ljava/lang/String;)Z
.registers 3
.prologue
.line 46
sget v0, Ldxoptimizer/ty;->a:I
const/4 v1, 0x3
if-ne v0, v1, :cond_b
invoke-static {p0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v0
if-eqz v0, :cond_d
.line 47
:cond_b
const/4 v0, 0x0
.line 51
:goto_c
return v0
.line 50
:cond_d
sput-object p0, Ldxoptimizer/ty;->b:Ljava/lang/String;
.line 51
const/4 v0, 0x1
goto :goto_c
.end method
.method private static b()Ljava/lang/String;
.registers 1
.prologue
.line 117
const-string v0, "ro.dianxinos.os.lc"
invoke-static {v0}, Ldxoptimizer/zn;->a(Ljava/lang/String;)Ljava/lang/String;
move-result-object v0
return-object v0
.end method
.method private static b(Landroid/content/Context;)Ljava/lang/String;
.registers 3
.prologue
.line 62
sget v0, Ldxoptimizer/ty;->a:I
if-nez v0, :cond_9
.line 63
invoke-static {p0}, Ldxoptimizer/ty;->c(Landroid/content/Context;)Ljava/lang/String;
move-result-object v0
.line 71
:goto_8
return-object v0
.line 64
:cond_9
const/4 v0, 0x1
sget v1, Ldxoptimizer/ty;->a:I
if-ne v0, v1, :cond_13
.line 65
invoke-static {p0}, Ldxoptimizer/ty;->d(Landroid/content/Context;)Ljava/lang/String;
move-result-object v0
goto :goto_8
.line 66
:cond_13
const/4 v0, 0x2
sget v1, Ldxoptimizer/ty;->a:I
if-ne v0, v1, :cond_1d
.line 67
invoke-static {}, Ldxoptimizer/ty;->a()Ljava/lang/String;
move-result-object v0
goto :goto_8
.line 68
:cond_1d
const/4 v0, 0x4
sget v1, Ldxoptimizer/ty;->a:I
if-ne v0, v1, :cond_27
.line 69
invoke-static {}, Ldxoptimizer/ty;->b()Ljava/lang/String;
move-result-object v0
goto :goto_8
.line 71
:cond_27
const-string v0, ""
goto :goto_8
.end method
.method public static b(I)Z
.registers 2
.prologue
.line 38
invoke-static {p0}, Ldxoptimizer/ty;->a(I)Z
move-result v0
if-nez v0, :cond_8
.line 39
const/4 v0, 0x0
.line 42
:goto_7
return v0
.line 41
:cond_8
sput p0, Ldxoptimizer/ty;->a:I
.line 42
const/4 v0, 0x1
goto :goto_7
.end method
.method private static c(Landroid/content/Context;)Ljava/lang/String;
.registers 6
.prologue
const/4 v0, 0x0
.line 75
.line 77
:try_start_1
new-instance v2, Ljava/io/BufferedReader;
new-instance v1, Ljava/io/InputStreamReader;
invoke-virtual {p0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v3
invoke-virtual {v3}, Landroid/content/res/Resources;->getAssets()Landroid/content/res/AssetManager;
move-result-object v3
const-string v4, "lc.txt"
invoke-virtual {v3, v4}, Landroid/content/res/AssetManager;->open(Ljava/lang/String;)Ljava/io/InputStream;
move-result-object v3
invoke-direct {v1, v3}, Ljava/io/InputStreamReader;-><init>(Ljava/io/InputStream;)V
invoke-direct {v2, v1}, Ljava/io/BufferedReader;-><init>(Ljava/io/Reader;)V
:try_end_19
.catch Ljava/lang/Exception; {:try_start_1 .. :try_end_19} :catch_2f
.catchall {:try_start_1 .. :try_end_19} :catchall_3e
.line 78
:try_start_19
invoke-virtual {v2}, Ljava/io/BufferedReader;->readLine()Ljava/lang/String;
move-result-object v1
.line 80
if-eqz v1, :cond_23
.line 81
invoke-virtual {v1}, Ljava/lang/String;->trim()Ljava/lang/String;
move-result-object v1
.line 83
:cond_23
invoke-virtual {v1}, Ljava/lang/String;->length()I
:try_end_26
.catch Ljava/lang/Exception; {:try_start_19 .. :try_end_26} :catch_47
.catchall {:try_start_19 .. :try_end_26} :catchall_45
move-result v3
if-nez v3, :cond_2d
.line 90
:goto_29
invoke-static {v2}, Ldxoptimizer/zt;->a(Ljava/io/Closeable;)V
.line 88
:goto_2c
return-object v0
:cond_2d
move-object v0, v1
.line 83
goto :goto_29
.line 84
:catch_2f
move-exception v1
move-object v2, v0
.line 85
:goto_31
:try_start_31
sget-boolean v3, Ldxoptimizer/zj;->a:Z
if-eqz v3, :cond_3a
.line 86
const-string v3, "Failed to get the lc info."
invoke-static {v3, v1}, Ldxoptimizer/zm;->b(Ljava/lang/String;Ljava/lang/Throwable;)V
:try_end_3a
.catchall {:try_start_31 .. :try_end_3a} :catchall_45
.line 90
:cond_3a
invoke-static {v2}, Ldxoptimizer/zt;->a(Ljava/io/Closeable;)V
goto :goto_2c
:catchall_3e
move-exception v1
move-object v2, v0
move-object v0, v1
:goto_41
invoke-static {v2}, Ldxoptimizer/zt;->a(Ljava/io/Closeable;)V
throw v0
:catchall_45
move-exception v0
goto :goto_41
.line 84
:catch_47
move-exception v1
goto :goto_31
.end method
.method private static d(Landroid/content/Context;)Ljava/lang/String;
.registers 4
.prologue
.line 96
:try_start_0
invoke-virtual {p0}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;
move-result-object v0
.line 97
invoke-virtual {p0}, Landroid/content/Context;->getPackageName()Ljava/lang/String;
move-result-object v1
const/16 v2, 0x80
invoke-virtual {v0, v1, v2}, Landroid/content/pm/PackageManager;->getApplicationInfo(Ljava/lang/String;I)Landroid/content/pm/ApplicationInfo;
move-result-object v0
.line 98
iget-object v0, v0, Landroid/content/pm/ApplicationInfo;->metaData:Landroid/os/Bundle;
const-string v1, "LC"
invoke-virtual {v0, v1}, Landroid/os/Bundle;->getString(Ljava/lang/String;)Ljava/lang/String;
:try_end_15
.catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_15} :catch_17
move-result-object v0
.line 103
:goto_16
return-object v0
.line 99
:catch_17
move-exception v0
.line 100
sget-boolean v1, Ldxoptimizer/zj;->a:Z
if-eqz v1, :cond_21
.line 101
const-string v1, "Failed to get the lc info."
invoke-static {v1, v0}, Ldxoptimizer/zm;->b(Ljava/lang/String;Ljava/lang/Throwable;)V
.line 103
:cond_21
const/4 v0, 0x0
goto :goto_16
.end method