f.smali
.class public Lcom/xiaomi/channel/commonutils/android/f;
.super Ljava/lang/Object;
# static fields
.field private static a:I
# direct methods
.method static constructor <clinit>()V
.registers 1
const/4 v0, 0x0
sput v0, Lcom/xiaomi/channel/commonutils/android/f;->a:I
return-void
.end method
.method public static declared-synchronized a()Z
.registers 3
const/4 v0, 0x1
const-class v1, Lcom/xiaomi/channel/commonutils/android/f;
monitor-enter v1
:try_start_4
invoke-static {}, Lcom/xiaomi/channel/commonutils/android/f;->c()I
:try_end_7
.catchall {:try_start_4 .. :try_end_7} :catchall_e
move-result v2
if-ne v2, v0, :cond_c
:goto_a
monitor-exit v1
return v0
:cond_c
const/4 v0, 0x0
goto :goto_a
:catchall_e
move-exception v0
monitor-exit v1
throw v0
.end method
.method public static declared-synchronized b()Z
.registers 3
const-class v1, Lcom/xiaomi/channel/commonutils/android/f;
monitor-enter v1
:try_start_3
invoke-static {}, Lcom/xiaomi/channel/commonutils/android/f;->c()I
:try_end_6
.catchall {:try_start_3 .. :try_end_6} :catchall_f
move-result v0
const/4 v2, 0x2
if-ne v0, v2, :cond_d
const/4 v0, 0x1
:goto_b
monitor-exit v1
return v0
:cond_d
const/4 v0, 0x0
goto :goto_b
:catchall_f
move-exception v0
monitor-exit v1
throw v0
.end method
.method public static declared-synchronized c()I
.registers 8
const/4 v0, 0x1
const/4 v3, 0x0
const/4 v2, 0x0
const-class v4, Lcom/xiaomi/channel/commonutils/android/f;
monitor-enter v4
:try_start_6
sget v1, Lcom/xiaomi/channel/commonutils/android/f;->a:I
:try_end_8
.catchall {:try_start_6 .. :try_end_8} :catchall_6f
if-nez v1, :cond_58
:try_start_a
new-instance v5, Ljava/util/Properties;
invoke-direct {v5}, Ljava/util/Properties;-><init>()V
new-instance v6, Ljava/io/File;
invoke-static {}, Landroid/os/Environment;->getRootDirectory()Ljava/io/File;
move-result-object v1
const-string/jumbo v7, "build.prop"
invoke-direct {v6, v1, v7}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V
new-instance v1, Ljava/io/FileInputStream;
invoke-direct {v1, v6}, Ljava/io/FileInputStream;-><init>(Ljava/io/File;)V
:try_end_20
.catch Ljava/lang/Throwable; {:try_start_a .. :try_end_20} :catch_60
.catchall {:try_start_a .. :try_end_20} :catchall_72
:try_start_20
invoke-virtual {v5, v1}, Ljava/util/Properties;->load(Ljava/io/InputStream;)V
const-string/jumbo v2, "ro.miui.ui.version.code"
const/4 v6, 0x0
invoke-virtual {v5, v2, v6}, Ljava/util/Properties;->getProperty(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
move-result-object v2
if-nez v2, :cond_37
const-string/jumbo v2, "ro.miui.ui.version.name"
const/4 v6, 0x0
invoke-virtual {v5, v2, v6}, Ljava/util/Properties;->getProperty(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
move-result-object v2
if-eqz v2, :cond_5c
:cond_37
move v2, v0
:goto_38
if-eqz v2, :cond_5e
:goto_3a
sput v0, Lcom/xiaomi/channel/commonutils/android/f;->a:I
:try_end_3c
.catch Ljava/lang/Throwable; {:try_start_20 .. :try_end_3c} :catch_7a
.catchall {:try_start_20 .. :try_end_3c} :catchall_78
:try_start_3c
invoke-static {v1}, Lcom/xiaomi/channel/commonutils/a/a;->a(Ljava/io/InputStream;)V
:goto_3f
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
const-string/jumbo v1, "isMIUI\'s value is: "
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
sget v1, Lcom/xiaomi/channel/commonutils/android/f;->a:I
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v0
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
invoke-static {v0}, Lcom/xiaomi/channel/commonutils/b/c;->b(Ljava/lang/String;)V
:cond_58
sget v0, Lcom/xiaomi/channel/commonutils/android/f;->a:I
:try_end_5a
.catchall {:try_start_3c .. :try_end_5a} :catchall_6f
monitor-exit v4
return v0
:cond_5c
move v2, v3
goto :goto_38
:cond_5e
const/4 v0, 0x2
goto :goto_3a
:catch_60
move-exception v0
move-object v1, v2
:goto_62
:try_start_62
const-string/jumbo v2, "get isMIUI failed"
invoke-static {v2, v0}, Lcom/xiaomi/channel/commonutils/b/c;->a(Ljava/lang/String;Ljava/lang/Throwable;)V
const/4 v0, 0x0
sput v0, Lcom/xiaomi/channel/commonutils/android/f;->a:I
:try_end_6b
.catchall {:try_start_62 .. :try_end_6b} :catchall_78
:try_start_6b
invoke-static {v1}, Lcom/xiaomi/channel/commonutils/a/a;->a(Ljava/io/InputStream;)V
:try_end_6e
.catchall {:try_start_6b .. :try_end_6e} :catchall_6f
goto :goto_3f
:catchall_6f
move-exception v0
monitor-exit v4
throw v0
:catchall_72
move-exception v0
move-object v1, v2
:goto_74
:try_start_74
invoke-static {v1}, Lcom/xiaomi/channel/commonutils/a/a;->a(Ljava/io/InputStream;)V
throw v0
:try_end_78
.catchall {:try_start_74 .. :try_end_78} :catchall_6f
:catchall_78
move-exception v0
goto :goto_74
:catch_7a
move-exception v0
goto :goto_62
.end method