a.smali
.class public Lcom/huawei/hms/a/a;
.super Ljava/lang/Object;
.source "HwBuildEx.java"
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/huawei/hms/a/a$a;
}
.end annotation
# static fields
.field public static final a:Ljava/lang/String;
# direct methods
.method static constructor <clinit>()V
.registers 2
.prologue
.line 19
const-string v0, "ro.build.version.emui"
const-string v1, ""
invoke-static {v0, v1}, Lcom/huawei/hms/a/a;->a(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
move-result-object v0
sput-object v0, Lcom/huawei/hms/a/a;->a:Ljava/lang/String;
return-void
.end method
.method public static a(Ljava/lang/String;I)I
.registers 7
.prologue
.line 61
:try_start_0
const-string v0, "android.os.SystemProperties"
invoke-static {v0}, Ljava/lang/Class;->forName(Ljava/lang/String;)Ljava/lang/Class;
move-result-object v0
.line 62
const-string v1, "getInt"
const/4 v2, 0x2
new-array v2, v2, [Ljava/lang/Class;
const/4 v3, 0x0
const-class v4, Ljava/lang/String;
aput-object v4, v2, v3
const/4 v3, 0x1
sget-object v4, Ljava/lang/Integer;->TYPE:Ljava/lang/Class;
aput-object v4, v2, v3
invoke-virtual {v0, v1, v2}, Ljava/lang/Class;->getDeclaredMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
move-result-object v1
.line 63
const/4 v2, 0x2
new-array v2, v2, [Ljava/lang/Object;
const/4 v3, 0x0
aput-object p0, v2, v3
const/4 v3, 0x1
invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v4
aput-object v4, v2, v3
invoke-virtual {v1, v0, v2}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Ljava/lang/Integer;
invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I
:try_end_2f
.catch Ljava/lang/ClassNotFoundException; {:try_start_0 .. :try_end_2f} :catch_31
.catch Ljava/lang/NoSuchMethodException; {:try_start_0 .. :try_end_2f} :catch_40
.catch Ljava/lang/IllegalAccessException; {:try_start_0 .. :try_end_2f} :catch_3c
.catch Ljava/lang/IllegalArgumentException; {:try_start_0 .. :try_end_2f} :catch_3e
.catch Ljava/lang/reflect/InvocationTargetException; {:try_start_0 .. :try_end_2f} :catch_42
.catch Ljava/lang/ClassCastException; {:try_start_0 .. :try_end_2f} :catch_3a
move-result p1
.line 68
:goto_30
return p1
.line 64
:catch_31
move-exception v0
.line 66
:goto_32
const-string v0, "HwBuildEx"
const-string v1, "An exception occurred while reading: EMUI_SDK_INT"
invoke-static {v0, v1}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
goto :goto_30
.line 64
:catch_3a
move-exception v0
goto :goto_32
:catch_3c
move-exception v0
goto :goto_32
:catch_3e
move-exception v0
goto :goto_32
:catch_40
move-exception v0
goto :goto_32
:catch_42
move-exception v0
goto :goto_32
.end method
.method public static a(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
.registers 7
.prologue
.line 49
:try_start_0
const-string v0, "android.os.SystemProperties"
invoke-static {v0}, Ljava/lang/Class;->forName(Ljava/lang/String;)Ljava/lang/Class;
move-result-object v0
.line 50
const-string v1, "get"
const/4 v2, 0x2
new-array v2, v2, [Ljava/lang/Class;
const/4 v3, 0x0
const-class v4, Ljava/lang/String;
aput-object v4, v2, v3
const/4 v3, 0x1
const-class v4, Ljava/lang/String;
aput-object v4, v2, v3
invoke-virtual {v0, v1, v2}, Ljava/lang/Class;->getDeclaredMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
move-result-object v1
.line 51
const/4 v2, 0x2
new-array v2, v2, [Ljava/lang/Object;
const/4 v3, 0x0
aput-object p0, v2, v3
const/4 v3, 0x1
aput-object p1, v2, v3
invoke-virtual {v1, v0, v2}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Ljava/lang/String;
:try_end_28
.catch Ljava/lang/ClassNotFoundException; {:try_start_0 .. :try_end_28} :catch_29
.catch Ljava/lang/NoSuchMethodException; {:try_start_0 .. :try_end_28} :catch_39
.catch Ljava/lang/IllegalAccessException; {:try_start_0 .. :try_end_28} :catch_35
.catch Ljava/lang/IllegalArgumentException; {:try_start_0 .. :try_end_28} :catch_37
.catch Ljava/lang/reflect/InvocationTargetException; {:try_start_0 .. :try_end_28} :catch_3b
.catch Ljava/lang/ClassCastException; {:try_start_0 .. :try_end_28} :catch_33
.line 56
:goto_28
return-object v0
.line 52
:catch_29
move-exception v0
.line 54
:goto_2a
const-string v0, "HwBuildEx"
const-string v1, "An exception occurred while reading: EMUI_VERSION"
invoke-static {v0, v1}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
move-object v0, p1
.line 56
goto :goto_28
.line 52
:catch_33
move-exception v0
goto :goto_2a
:catch_35
move-exception v0
goto :goto_2a
:catch_37
move-exception v0
goto :goto_2a
:catch_39
move-exception v0
goto :goto_2a
:catch_3b
move-exception v0
goto :goto_2a
.end method