cdy.smali
.class public Ldxoptimizer/cdy;
.super Ljava/lang/Object;
.source "MemoryUtils.java"
# direct methods
.method public static a(Landroid/content/Context;)Ljava/lang/String;
.registers 7
.prologue
.line 118
:try_start_0
invoke-virtual {p0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string v1, "default_input_method"
invoke-static {v0, v1}, Landroid/provider/Settings$Secure;->getString(Landroid/content/ContentResolver;Ljava/lang/String;)Ljava/lang/String;
move-result-object v2
.line 120
const-string v0, "input_method"
invoke-virtual {p0, v0}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/view/inputmethod/InputMethodManager;
.line 121
invoke-virtual {v0}, Landroid/view/inputmethod/InputMethodManager;->getEnabledInputMethodList()Ljava/util/List;
move-result-object v3
.line 122
invoke-interface {v3}, Ljava/util/List;->size()I
move-result v4
.line 123
const/4 v0, 0x0
move v1, v0
:goto_1c
if-ge v1, v4, :cond_38
.line 124
invoke-interface {v3, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/view/inputmethod/InputMethodInfo;
.line 125
invoke-virtual {v0}, Landroid/view/inputmethod/InputMethodInfo;->getId()Ljava/lang/String;
move-result-object v5
invoke-virtual {v5, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v5
if-eqz v5, :cond_33
.line 126
invoke-virtual {v0}, Landroid/view/inputmethod/InputMethodInfo;->getPackageName()Ljava/lang/String;
:try_end_31
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_31} :catch_37
move-result-object v0
.line 131
:goto_32
return-object v0
.line 123
:cond_33
add-int/lit8 v0, v1, 0x1
move v1, v0
goto :goto_1c
.line 129
:catch_37
move-exception v0
.line 131
:cond_38
const-string v0, ""
goto :goto_32
.end method
.method public static a()[I
.registers 8
.prologue
const/4 v6, 0x2
const/4 v2, 0x0
.line 140
const/4 v0, 0x0
.line 142
:try_start_3
new-instance v1, Ljava/io/BufferedReader;
new-instance v3, Ljava/io/FileReader;
const-string v4, "/proc/meminfo"
invoke-direct {v3, v4}, Ljava/io/FileReader;-><init>(Ljava/lang/String;)V
invoke-direct {v1, v3}, Ljava/io/BufferedReader;-><init>(Ljava/io/Reader;)V
:try_end_f
.catch Ljava/lang/Exception; {:try_start_3 .. :try_end_f} :catch_67
.catchall {:try_start_3 .. :try_end_f} :catchall_6c
move v3, v2
move v0, v2
.line 147
:cond_11
:try_start_11
invoke-virtual {v1}, Ljava/io/BufferedReader;->readLine()Ljava/lang/String;
move-result-object v4
if-eqz v4, :cond_79
.line 148
const-string v5, "MemTotal"
invoke-virtual {v4, v5}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v5
if-eqz v5, :cond_3c
.line 149
add-int/lit8 v3, v3, 0x1
.line 150
const/4 v0, 0x0
invoke-static {v4, v0}, Ldxoptimizer/cfa;->a(Ljava/lang/String;I)I
move-result v0
.line 158
:cond_26
:goto_26
const/4 v4, 0x3
if-ne v3, v4, :cond_11
move v3, v2
move v2, v0
.line 162
:goto_2b
if-lez v3, :cond_5e
if-lez v2, :cond_5e
.line 163
const/4 v0, 0x2
new-array v0, v0, [I
const/4 v4, 0x0
aput v3, v0, v4
const/4 v3, 0x1
aput v2, v0, v3
:try_end_38
.catch Ljava/lang/Exception; {:try_start_11 .. :try_end_38} :catch_76
.catchall {:try_start_11 .. :try_end_38} :catchall_74
.line 168
invoke-static {v1}, Ldxoptimizer/cdp;->a(Ljava/io/Closeable;)V
.line 170
:goto_3b
return-object v0
.line 151
:cond_3c
:try_start_3c
const-string v5, "MemFree"
invoke-virtual {v4, v5}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v5
if-eqz v5, :cond_4d
.line 152
add-int/lit8 v3, v3, 0x1
.line 153
const/4 v5, 0x0
invoke-static {v4, v5}, Ldxoptimizer/cfa;->a(Ljava/lang/String;I)I
move-result v4
add-int/2addr v2, v4
goto :goto_26
.line 154
:cond_4d
const-string v5, "Cached"
invoke-virtual {v4, v5}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v5
if-eqz v5, :cond_26
.line 155
add-int/lit8 v3, v3, 0x1
.line 156
const/4 v5, 0x0
invoke-static {v4, v5}, Ldxoptimizer/cfa;->a(Ljava/lang/String;I)I
:try_end_5b
.catch Ljava/lang/Exception; {:try_start_3c .. :try_end_5b} :catch_76
.catchall {:try_start_3c .. :try_end_5b} :catchall_74
move-result v4
add-int/2addr v2, v4
goto :goto_26
.line 168
:cond_5e
invoke-static {v1}, Ldxoptimizer/cdp;->a(Ljava/io/Closeable;)V
.line 170
:goto_61
new-array v0, v6, [I
fill-array-data v0, :array_7c
goto :goto_3b
.line 165
:catch_67
move-exception v1
.line 168
:goto_68
invoke-static {v0}, Ldxoptimizer/cdp;->a(Ljava/io/Closeable;)V
goto :goto_61
:catchall_6c
move-exception v1
move-object v7, v1
move-object v1, v0
move-object v0, v7
:goto_70
invoke-static {v1}, Ldxoptimizer/cdp;->a(Ljava/io/Closeable;)V
throw v0
:catchall_74
move-exception v0
goto :goto_70
.line 165
:catch_76
move-exception v0
move-object v0, v1
goto :goto_68
:cond_79
move v3, v2
move v2, v0
goto :goto_2b
.line 170
:array_7c
.array-data 4
0x0
0x0
.end array-data
.end method
.method public static a(Landroid/app/ActivityManager;[I)[I
.registers 7
.prologue
const/4 v1, 0x0
.line 88
:try_start_1
invoke-virtual {p0, p1}, Landroid/app/ActivityManager;->getProcessMemoryInfo([I)[Landroid/os/Debug$MemoryInfo;
:try_end_4
.catch Ljava/lang/Exception; {:try_start_1 .. :try_end_4} :catch_d
move-result-object v3
.line 92
if-eqz v3, :cond_a
array-length v0, v3
if-nez v0, :cond_11
.line 93
:cond_a
new-array v0, v1, [I
.line 108
:goto_c
return-object v0
.line 89
:catch_d
move-exception v0
.line 90
new-array v0, v1, [I
goto :goto_c
.line 96
:cond_11
array-length v0, v3
new-array v2, v0, [I
move v0, v1
.line 97
:goto_15
array-length v4, v3
if-ge v0, v4, :cond_27
.line 100
:try_start_18
aget-object v4, v3, v0
invoke-virtual {v4}, Landroid/os/Debug$MemoryInfo;->getTotalPss()I
move-result v4
aput v4, v2, v0
:try_end_20
.catch Ljava/lang/Exception; {:try_start_18 .. :try_end_20} :catch_23
.line 97
:goto_20
add-int/lit8 v0, v0, 0x1
goto :goto_15
.line 101
:catch_23
move-exception v4
.line 105
aput v1, v2, v0
goto :goto_20
:cond_27
move-object v0, v2
.line 108
goto :goto_c
.end method