p.smali
.class public final Lcom/baidu/techain/l/p;
.super Ljava/lang/Object;
.source "NewUid.java"
# static fields
.field private static a:Ljava/lang/String;
# direct methods
.method static constructor <clinit>()V
.registers 1
.prologue
.line 26
const-string v0, ""
sput-object v0, Lcom/baidu/techain/l/p;->a:Ljava/lang/String;
return-void
.end method
.method public constructor <init>()V
.registers 1
.prologue
.line 19
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method public static a(Landroid/content/Context;)Ljava/lang/String;
.registers 2
.prologue
.line 64
sget-object v0, Lcom/baidu/techain/l/p;->a:Ljava/lang/String;
invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v0
if-eqz v0, :cond_13
.line 65
new-instance v0, Lcom/baidu/techain/l/p;
invoke-direct {v0}, Lcom/baidu/techain/l/p;-><init>()V
.line 66
invoke-static {p0}, Lcom/baidu/techain/l/p;->b(Landroid/content/Context;)Ljava/lang/String;
move-result-object v0
sput-object v0, Lcom/baidu/techain/l/p;->a:Ljava/lang/String;
.line 68
:cond_13
sget-object v0, Lcom/baidu/techain/l/p;->a:Ljava/lang/String;
return-object v0
.end method
.method private static a(Landroid/content/Context;Ljava/lang/String;)Ljava/lang/String;
.registers 3
.prologue
.line 132
:try_start_0
invoke-virtual {p0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
invoke-static {v0, p1}, Landroid/provider/Settings$System;->getString(Landroid/content/ContentResolver;Ljava/lang/String;)Ljava/lang/String;
:try_end_7
.catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_7} :catch_9
move-result-object v0
.line 136
:goto_8
return-object v0
.line 134
:catch_9
move-exception v0
invoke-static {}, Lcom/baidu/techain/l/d;->a()V
.line 136
const/4 v0, 0x0
goto :goto_8
.end method
.method private static a(Ljava/io/File;)Ljava/lang/String;
.registers 8
.prologue
const/4 v0, 0x0
.line 140
.line 142
:try_start_1
new-instance v1, Ljava/io/FileReader;
invoke-direct {v1, p0}, Ljava/io/FileReader;-><init>(Ljava/io/File;)V
:try_end_6
.catch Ljava/lang/Throwable; {:try_start_1 .. :try_end_6} :catch_47
.catchall {:try_start_1 .. :try_end_6} :catchall_36
.line 143
const/16 v2, 0x2000
:try_start_8
new-array v2, v2, [C
.line 144
new-instance v3, Ljava/io/CharArrayWriter;
invoke-direct {v3}, Ljava/io/CharArrayWriter;-><init>()V
.line 146
:goto_f
invoke-virtual {v1, v2}, Ljava/io/FileReader;->read([C)I
move-result v4
if-lez v4, :cond_24
.line 147
const/4 v5, 0x0
invoke-virtual {v3, v2, v5, v4}, Ljava/io/CharArrayWriter;->write([CII)V
:try_end_19
.catch Ljava/lang/Throwable; {:try_start_8 .. :try_end_19} :catch_1a
.catchall {:try_start_8 .. :try_end_19} :catchall_45
goto :goto_f
.line 152
:catch_1a
move-exception v2
:goto_1b
:try_start_1b
invoke-static {}, Lcom/baidu/techain/l/d;->a()V
:try_end_1e
.catchall {:try_start_1b .. :try_end_1e} :catchall_45
.line 154
if-eqz v1, :cond_23
.line 156
:try_start_20
invoke-virtual {v1}, Ljava/io/FileReader;->close()V
:try_end_23
.catch Ljava/lang/Throwable; {:try_start_20 .. :try_end_23} :catch_31
.line 162
:cond_23
:goto_23
return-object v0
.line 149
:cond_24
:try_start_24
invoke-virtual {v3}, Ljava/io/CharArrayWriter;->toString()Ljava/lang/String;
:try_end_27
.catch Ljava/lang/Throwable; {:try_start_24 .. :try_end_27} :catch_1a
.catchall {:try_start_24 .. :try_end_27} :catchall_45
move-result-object v0
.line 156
:try_start_28
invoke-virtual {v1}, Ljava/io/FileReader;->close()V
:try_end_2b
.catch Ljava/lang/Throwable; {:try_start_28 .. :try_end_2b} :catch_2c
goto :goto_23
.line 158
:catch_2c
move-exception v1
invoke-static {}, Lcom/baidu/techain/l/d;->a()V
goto :goto_23
:catch_31
move-exception v1
invoke-static {}, Lcom/baidu/techain/l/d;->a()V
goto :goto_23
.line 154
:catchall_36
move-exception v1
move-object v6, v1
move-object v1, v0
move-object v0, v6
:goto_3a
if-eqz v1, :cond_3f
.line 156
:try_start_3c
invoke-virtual {v1}, Ljava/io/FileReader;->close()V
:try_end_3f
.catch Ljava/lang/Throwable; {:try_start_3c .. :try_end_3f} :catch_40
.line 159
:cond_3f
:goto_3f
throw v0
.line 158
:catch_40
move-exception v1
invoke-static {}, Lcom/baidu/techain/l/d;->a()V
goto :goto_3f
.line 154
:catchall_45
move-exception v0
goto :goto_3a
.line 152
:catch_47
move-exception v1
move-object v1, v0
goto :goto_1b
.end method
.method private static a(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)Z
.registers 4
.prologue
.line 181
:try_start_0
invoke-virtual {p0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
invoke-static {v0, p1, p2}, Landroid/provider/Settings$System;->putString(Landroid/content/ContentResolver;Ljava/lang/String;Ljava/lang/String;)Z
:try_end_7
.catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_7} :catch_9
move-result v0
.line 185
:goto_8
return v0
.line 183
:catch_9
move-exception v0
invoke-static {}, Lcom/baidu/techain/l/d;->a()V
.line 185
const/4 v0, 0x0
goto :goto_8
.end method
.method private static b(Landroid/content/Context;)Ljava/lang/String;
.registers 7
.prologue
const/4 v1, 0x1
const/4 v2, 0x0
.line 30
.line 33
invoke-static {p0}, Lcom/baidu/techain/l/p;->c(Landroid/content/Context;)Ljava/lang/String;
move-result-object v0
.line 34
invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v3
if-eqz v3, :cond_124
.line 36
invoke-static {p0}, Lcom/baidu/techain/l/p;->d(Landroid/content/Context;)Ljava/lang/String;
move-result-object v0
.line 37
invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v3
if-eqz v3, :cond_11d
.line 39
invoke-static {p0}, Lcom/baidu/techain/l/p;->e(Landroid/content/Context;)Ljava/lang/String;
move-result-object v0
.line 40
invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v3
if-eqz v3, :cond_117
.line 1072
invoke-static {p0}, Lcom/baidu/techain/l/g;->e(Landroid/content/Context;)Ljava/lang/String;
move-result-object v0
.line 1073
invoke-static {p0}, Lcom/baidu/techain/l/g;->f(Landroid/content/Context;)Ljava/lang/String;
move-result-object v2
.line 1075
invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v3
if-eqz v3, :cond_c0
invoke-static {v2}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v3
if-eqz v3, :cond_c0
.line 1076
new-instance v0, Ljava/lang/StringBuilder;
const-string v2, "1|"
invoke-direct {v0, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-static {}, Ljava/util/UUID;->randomUUID()Ljava/util/UUID;
move-result-object v2
invoke-virtual {v2}, Ljava/util/UUID;->toString()Ljava/lang/String;
move-result-object v2
invoke-static {v2}, Lcom/baidu/techain/l/o;->a(Ljava/lang/String;)Ljava/lang/String;
move-result-object v2
invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
:goto_4f
move-object v2, v0
move v3, v1
move v0, v1
.line 47
:goto_52
if-nez v3, :cond_5e
invoke-static {p0}, Lcom/baidu/techain/l/p;->c(Landroid/content/Context;)Ljava/lang/String;
move-result-object v3
invoke-static {v3}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v3
if-eqz v3, :cond_66
.line 48
:cond_5e
new-instance v3, Lcom/baidu/techain/e;
invoke-direct {v3, p0}, Lcom/baidu/techain/e;-><init>(Landroid/content/Context;)V
.line 49
invoke-virtual {v3, v2}, Lcom/baidu/techain/e;->c(Ljava/lang/String;)V
.line 52
:cond_66
if-nez v1, :cond_72
invoke-static {p0}, Lcom/baidu/techain/l/p;->d(Landroid/content/Context;)Ljava/lang/String;
move-result-object v1
invoke-static {v1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v1
if-eqz v1, :cond_77
.line 53
:cond_72
const-string v1, "com.q.zi.i"
invoke-static {p0, v1, v2}, Lcom/baidu/techain/l/p;->a(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)Z
.line 56
:cond_77
const-string v1, "android.permission.WRITE_EXTERNAL_STORAGE"
invoke-static {p0, v1}, Lcom/baidu/techain/l/p;->b(Landroid/content/Context;Ljava/lang/String;)Z
move-result v1
.line 57
if-eqz v1, :cond_bf
if-nez v0, :cond_8b
invoke-static {p0}, Lcom/baidu/techain/l/p;->e(Landroid/content/Context;)Ljava/lang/String;
move-result-object v0
invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v0
if-eqz v0, :cond_bf
.line 1189
:cond_8b
const/4 v0, 0x0
.line 1191
:try_start_8c
new-instance v1, Ljava/io/File;
invoke-static {}, Landroid/os/Environment;->getExternalStorageDirectory()Ljava/io/File;
move-result-object v3
const-string v4, ".zp"
invoke-direct {v1, v3, v4}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V
.line 1192
new-instance v3, Ljava/io/File;
const-string v4, ".icosc"
invoke-direct {v3, v1, v4}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V
.line 1193
invoke-virtual {v1}, Ljava/io/File;->exists()Z
move-result v4
if-eqz v4, :cond_e6
.line 1194
invoke-virtual {v1}, Ljava/io/File;->isDirectory()Z
move-result v4
if-nez v4, :cond_b0
.line 1195
invoke-virtual {v1}, Ljava/io/File;->delete()Z
.line 1196
invoke-virtual {v1}, Ljava/io/File;->mkdirs()Z
.line 1202
:cond_b0
:goto_b0
new-instance v1, Ljava/io/FileWriter;
const/4 v4, 0x0
invoke-direct {v1, v3, v4}, Ljava/io/FileWriter;-><init>(Ljava/io/File;Z)V
:try_end_b6
.catch Ljava/lang/Throwable; {:try_start_8c .. :try_end_b6} :catch_ea
.catchall {:try_start_8c .. :try_end_b6} :catchall_fe
.line 1203
:try_start_b6
invoke-virtual {v1, v2}, Ljava/io/FileWriter;->write(Ljava/lang/String;)V
.line 1204
invoke-virtual {v1}, Ljava/io/FileWriter;->flush()V
:try_end_bc
.catch Ljava/lang/Throwable; {:try_start_b6 .. :try_end_bc} :catch_114
.catchall {:try_start_b6 .. :try_end_bc} :catchall_10d
.line 1210
:try_start_bc
invoke-virtual {v1}, Ljava/io/FileWriter;->close()V
:try_end_bf
.catch Ljava/lang/Throwable; {:try_start_bc .. :try_end_bf} :catch_f9
.line 60
:cond_bf
:goto_bf
return-object v2
.line 1078
:cond_c0
new-instance v3, Ljava/lang/StringBuilder;
const-string v4, "0|"
invoke-direct {v3, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
new-instance v4, Ljava/lang/StringBuilder;
invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V
invoke-virtual {v4, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)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/baidu/techain/l/o;->a(Ljava/lang/String;)Ljava/lang/String;
move-result-object v0
invoke-virtual {v3, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
goto/16 :goto_4f
.line 1199
:cond_e6
:try_start_e6
invoke-virtual {v1}, Ljava/io/File;->mkdirs()Z
:try_end_e9
.catch Ljava/lang/Throwable; {:try_start_e6 .. :try_end_e9} :catch_ea
.catchall {:try_start_e6 .. :try_end_e9} :catchall_fe
goto :goto_b0
.line 1206
:catch_ea
move-exception v1
:goto_eb
:try_start_eb
invoke-static {}, Lcom/baidu/techain/l/d;->a()V
:try_end_ee
.catchall {:try_start_eb .. :try_end_ee} :catchall_10f
.line 1208
if-eqz v0, :cond_bf
.line 1210
:try_start_f0
invoke-virtual {v0}, Ljava/io/FileWriter;->close()V
:try_end_f3
.catch Ljava/lang/Throwable; {:try_start_f0 .. :try_end_f3} :catch_f4
goto :goto_bf
.line 1212
:catch_f4
move-exception v0
invoke-static {}, Lcom/baidu/techain/l/d;->a()V
goto :goto_bf
:catch_f9
move-exception v0
invoke-static {}, Lcom/baidu/techain/l/d;->a()V
goto :goto_bf
.line 1208
:catchall_fe
move-exception v1
move-object v5, v1
move-object v1, v0
move-object v0, v5
:goto_102
if-eqz v1, :cond_107
.line 1210
:try_start_104
invoke-virtual {v1}, Ljava/io/FileWriter;->close()V
:try_end_107
.catch Ljava/lang/Throwable; {:try_start_104 .. :try_end_107} :catch_108
.line 1213
:cond_107
:goto_107
throw v0
.line 1212
:catch_108
move-exception v1
invoke-static {}, Lcom/baidu/techain/l/d;->a()V
goto :goto_107
.line 1208
:catchall_10d
move-exception v0
goto :goto_102
:catchall_10f
move-exception v1
move-object v5, v1
move-object v1, v0
move-object v0, v5
goto :goto_102
.line 1206
:catch_114
move-exception v0
move-object v0, v1
goto :goto_eb
:cond_117
move v3, v1
move v5, v2
move-object v2, v0
move v0, v5
goto/16 :goto_52
:cond_11d
move v3, v1
move v1, v2
move v5, v2
move-object v2, v0
move v0, v5
goto/16 :goto_52
:cond_124
move v1, v2
move v3, v2
move-object v5, v0
move v0, v2
move-object v2, v5
goto/16 :goto_52
.end method
.method private static b(Landroid/content/Context;Ljava/lang/String;)Z
.registers 5
.prologue
const/4 v0, 0x0
.line 167
:try_start_1
invoke-static {}, Landroid/os/Process;->myPid()I
move-result v1
invoke-static {}, Landroid/os/Process;->myUid()I
move-result v2
invoke-virtual {p0, p1, v1, v2}, Landroid/content/Context;->checkPermission(Ljava/lang/String;II)I
:try_end_c
.catch Ljava/lang/Throwable; {:try_start_1 .. :try_end_c} :catch_11
move-result v1
.line 168
if-nez v1, :cond_10
.line 169
const/4 v0, 0x1
.line 176
:cond_10
:goto_10
return v0
.line 174
:catch_11
move-exception v1
invoke-static {}, Lcom/baidu/techain/l/d;->a()V
goto :goto_10
.end method
.method private static c(Landroid/content/Context;)Ljava/lang/String;
.registers 5
.prologue
.line 85
:try_start_0
new-instance v1, Lcom/baidu/techain/e;
invoke-direct {v1, p0}, Lcom/baidu/techain/e;-><init>(Landroid/content/Context;)V
.line 86
invoke-virtual {v1}, Lcom/baidu/techain/e;->q()Ljava/lang/String;
move-result-object v0
.line 87
invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v2
if-nez v2, :cond_10
.line 100
:goto_f
return-object v0
.line 1410
:cond_10
iget-object v0, v1, Lcom/baidu/techain/e;->b:Landroid/content/SharedPreferences;
const-string v2, "rpnewuid"
const-string v3, ""
invoke-interface {v0, v2, v3}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
move-result-object v0
.line 91
invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v2
if-nez v2, :cond_2b
.line 92
invoke-virtual {v1, v0}, Lcom/baidu/techain/e;->c(Ljava/lang/String;)V
:try_end_23
.catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_23} :catch_24
goto :goto_f
.line 98
:catch_24
move-exception v0
invoke-static {}, Lcom/baidu/techain/l/d;->a()V
.line 100
const-string v0, ""
goto :goto_f
.line 95
:cond_2b
const-string v0, ""
goto :goto_f
.end method
.method private static d(Landroid/content/Context;)Ljava/lang/String;
.registers 2
.prologue
.line 106
:try_start_0
const-string v0, "com.q.zi.i"
invoke-static {p0, v0}, Lcom/baidu/techain/l/p;->a(Landroid/content/Context;Ljava/lang/String;)Ljava/lang/String;
:try_end_5
.catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_5} :catch_7
move-result-object v0
.line 110
:goto_6
return-object v0
.line 108
:catch_7
move-exception v0
invoke-static {}, Lcom/baidu/techain/l/d;->a()V
.line 110
const-string v0, ""
goto :goto_6
.end method
.method private static e(Landroid/content/Context;)Ljava/lang/String;
.registers 4
.prologue
.line 115
:try_start_0
const-string v0, "android.permission.READ_EXTERNAL_STORAGE"
invoke-static {p0, v0}, Lcom/baidu/techain/l/p;->b(Landroid/content/Context;Ljava/lang/String;)Z
move-result v0
.line 116
if-nez v0, :cond_b
.line 117
const-string v0, ""
.line 127
:goto_a
return-object v0
.line 120
:cond_b
new-instance v0, Ljava/io/File;
invoke-static {}, Landroid/os/Environment;->getExternalStorageDirectory()Ljava/io/File;
move-result-object v1
const-string v2, ".zp/.icosc"
invoke-direct {v0, v1, v2}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V
.line 121
invoke-virtual {v0}, Ljava/io/File;->exists()Z
move-result v1
if-eqz v1, :cond_25
.line 122
invoke-static {v0}, Lcom/baidu/techain/l/p;->a(Ljava/io/File;)Ljava/lang/String;
:try_end_1f
.catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_1f} :catch_21
move-result-object v0
goto :goto_a
.line 125
:catch_21
move-exception v0
invoke-static {}, Lcom/baidu/techain/l/d;->a()V
.line 127
:cond_25
const-string v0, ""
goto :goto_a
.end method