l.smali

.class public Lcom/cleanmaster/ui/app/provider/download/l;
.super Ljava/lang/Object;
.source "InstallApkHelper.java"


# static fields
.field private static a:Ljava/lang/String;

.field private static b:Ljava/lang/String;

.field private static c:Z

.field private static d:Ljava/lang/String;

.field private static final e:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List",
            "<",
            "Ljava/lang/String;",
            ">;"
        }
    .end annotation
.end field


# direct methods
.method static constructor <clinit>()V
    .registers 1

    .prologue
    .line 36
    const-string v0, "auto_install"

    sput-object v0, Lcom/cleanmaster/ui/app/provider/download/l;->a:Ljava/lang/String;

    .line 37
    const-string v0, "need_auto_install"

    sput-object v0, Lcom/cleanmaster/ui/app/provider/download/l;->b:Ljava/lang/String;

    .line 38
    const/4 v0, 0x1

    sput-boolean v0, Lcom/cleanmaster/ui/app/provider/download/l;->c:Z

    .line 40
    const-string v0, "need_auto_install_global"

    sput-object v0, Lcom/cleanmaster/ui/app/provider/download/l;->d:Ljava/lang/String;

    .line 42
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    sput-object v0, Lcom/cleanmaster/ui/app/provider/download/l;->e:Ljava/util/List;

    return-void
.end method

.method public static a(Landroid/content/Context;)I
    .registers 3

    .prologue
    .line 83
    invoke-static {}, Lcom/cleanmaster/ui/app/provider/download/l;->c()Z

    move-result v0

    .line 84
    invoke-static {}, Lcom/cm/root/k;->a()Lcom/cm/root/k;

    move-result-object v1

    invoke-virtual {v1}, Lcom/cm/root/k;->isMobileRoot()Z

    move-result v1

    .line 86
    if-eqz v0, :cond_10

    .line 87
    const/4 v0, 0x3

    .line 93
    :goto_f
    return v0

    .line 88
    :cond_10
    if-eqz v1, :cond_1a

    invoke-static {}, Lcom/cleanmaster/ui/app/provider/download/l;->b()Z

    move-result v0

    if-eqz v0, :cond_1a

    .line 89
    const/4 v0, 0x4

    goto :goto_f

    .line 90
    :cond_1a
    invoke-static {p0}, Lcom/cleanmaster/ui/app/provider/download/l;->b(Landroid/content/Context;)Z

    move-result v0

    if-eqz v0, :cond_22

    .line 91
    const/4 v0, 0x2

    goto :goto_f

    .line 93
    :cond_22
    const/4 v0, 0x1

    goto :goto_f
.end method

.method public static a(Landroid/content/Context;Ljava/lang/String;)V
    .registers 3

    .prologue
    .line 70
    new-instance v0, Lcom/cleanmaster/ui/app/provider/download/n;

    invoke-direct {v0, p0, p1}, Lcom/cleanmaster/ui/app/provider/download/n;-><init>(Landroid/content/Context;Ljava/lang/String;)V

    invoke-static {v0}, Lcom/cleanmaster/base/util/concurrent/BackgroundThread;->post(Ljava/lang/Runnable;)V

    .line 80
    return-void
.end method

.method public static a(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)V
    .registers 4
    .annotation build Landroid/support/annotation/WorkerThread;
    .end annotation

    .prologue
    .line 48
    new-instance v0, Lcom/cleanmaster/ui/app/provider/download/m;

    invoke-direct {v0, p0, p1, p2}, Lcom/cleanmaster/ui/app/provider/download/m;-><init>(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)V

    invoke-static {v0}, Lcom/cleanmaster/base/util/concurrent/BackgroundThread;->post(Ljava/lang/Runnable;)V

    .line 55
    return-void
.end method

.method public static a()Z
    .registers 3

    .prologue
    .line 125
    sget-object v0, Lcom/cleanmaster/ui/app/provider/download/l;->a:Ljava/lang/String;

    sget-object v1, Lcom/cleanmaster/ui/app/provider/download/l;->d:Ljava/lang/String;

    sget-boolean v2, Lcom/cleanmaster/ui/app/provider/download/l;->c:Z

    invoke-static {v0, v1, v2}, Lcom/cleanmaster/hpsharelib/cloudconfig/CloudCfgDataWrapper;->getCloudCfgBooleanValue(Ljava/lang/String;Ljava/lang/String;Z)Z

    move-result v0

    return v0
.end method

.method private static a(Ljava/io/DataOutputStream;Ljava/io/DataInputStream;Ljava/io/DataInputStream;)Z
    .registers 7

    .prologue
    const/4 v0, 0x0

    .line 243
    if-eqz p0, :cond_12

    .line 245
    :try_start_3
    const-string v1, "cd /data/data\n"

    invoke-virtual {p0, v1}, Ljava/io/DataOutputStream;->writeBytes(Ljava/lang/String;)V

    .line 246
    const-string v1, "ls -l\n"

    invoke-virtual {p0, v1}, Ljava/io/DataOutputStream;->writeBytes(Ljava/lang/String;)V

    .line 247
    invoke-virtual {p0}, Ljava/io/DataOutputStream;->flush()V

    .line 249
    if-nez p1, :cond_13

    .line 267
    :cond_12
    :goto_12
    return v0

    .line 252
    :cond_13
    const/16 v1, 0x20

    .line 253
    new-array v2, v1, [B

    .line 254
    const/4 v3, 0x0

    invoke-virtual {p1, v2, v3, v1}, Ljava/io/DataInputStream;->read([BII)I

    .line 255
    new-instance v1, Ljava/lang/String;

    invoke-direct {v1, v2}, Ljava/lang/String;-><init>([B)V

    .line 256
    invoke-static {v1}, Lcom/cleanmaster/hpsharelib/base/util/misc/StringUtils;->isMessyCode(Ljava/lang/String;)Z

    move-result v2

    if-nez v2, :cond_12

    const-string v2, "opendir failed"

    invoke-virtual {v1, v2}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z

    move-result v2

    if-nez v2, :cond_12

    const-string v2, "Permission denied"

    .line 257
    invoke-virtual {v1, v2}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z

    move-result v2

    if-nez v2, :cond_12

    const-string v2, "enter main"

    .line 258
    invoke-virtual {v1, v2}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
    :try_end_3b
    .catch Ljava/lang/Exception; {:try_start_3 .. :try_end_3b} :catch_40

    move-result v1

    if-nez v1, :cond_12

    .line 261
    const/4 v0, 0x1

    goto :goto_12

    .line 262
    :catch_40
    move-exception v1

    .line 263
    invoke-virtual {v1}, Ljava/lang/Exception;->printStackTrace()V

    goto :goto_12
.end method

.method public static a(Ljava/lang/String;)Z
    .registers 4

    .prologue
    .line 159
    sget-object v1, Lcom/cleanmaster/ui/app/provider/download/l;->e:Ljava/util/List;

    monitor-enter v1

    .line 160
    :try_start_3
    sget-object v0, Lcom/cleanmaster/ui/app/provider/download/l;->e:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v2

    :cond_9
    invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z

    move-result v0

    if-eqz v0, :cond_1e

    invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/lang/String;

    .line 161
    invoke-virtual {v0, p0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_9

    .line 162
    const/4 v0, 0x1

    monitor-exit v1

    .line 166
    :goto_1d
    return v0

    .line 165
    :cond_1e
    monitor-exit v1

    .line 166
    const/4 v0, 0x0

    goto :goto_1d

    .line 165
    :catchall_21
    move-exception v0

    monitor-exit v1
    :try_end_23
    .catchall {:try_start_3 .. :try_end_23} :catchall_21

    throw v0
.end method

.method public static b(Ljava/lang/String;)Ljava/lang/String;
    .registers 7

    .prologue
    .line 170
    new-instance v0, Ljava/io/File;

    invoke-direct {v0, p0}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    .line 171
    invoke-virtual {v0}, Ljava/io/File;->getParent()Ljava/lang/String;

    move-result-object v0

    .line 173
    new-instance v1, Ljava/io/File;

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v4

    invoke-virtual {v2, v4, v5}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    move-result-object v2

    const-string v3, ".apk"

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-direct {v1, v0, v2}, Ljava/io/File;-><init>(Ljava/lang/String;Ljava/lang/String;)V

    .line 174
    invoke-virtual {v1}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public static b(Landroid/content/Context;Ljava/lang/String;)V
    .registers 8
    .annotation build Landroid/support/annotation/WorkerThread;
    .end annotation

    .prologue
    .line 131
    invoke-static {p1}, Lcom/cleanmaster/ui/app/provider/download/l;->a(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_7

    .line 156
    :goto_6
    return-void

    .line 137
    :cond_7
    sget-object v1, Lcom/cleanmaster/ui/app/provider/download/l;->e:Ljava/util/List;

    monitor-enter v1

    .line 138
    :try_start_a
    sget-object v0, Lcom/cleanmaster/ui/app/provider/download/l;->e:Ljava/util/List;

    invoke-interface {v0, p1}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 139
    monitor-exit v1
    :try_end_10
    .catchall {:try_start_a .. :try_end_10} :catchall_53

    .line 141
    invoke-static {p1}, Lcom/cleanmaster/ui/app/provider/download/l;->b(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    .line 143
    invoke-static {p1, v1}, Lcom/cleanmaster/hpsharelib/base/util/io/FileUtils;->copyFile(Ljava/lang/String;Ljava/lang/String;)I

    move-result v0

    if-nez v0, :cond_56

    const/4 v0, 0x1

    move v2, v0

    .line 145
    :goto_1c
    if-eqz v2, :cond_59

    move-object v0, v1

    .line 147
    :goto_1f
    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    const-string v4, "pm install -r "

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v3, " \n"

    invoke-virtual {v0, v3}, 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

    .line 148
    invoke-static {}, Lcom/cm/root/k;->a()Lcom/cm/root/k;

    move-result-object v3

    const-wide/16 v4, 0x4e20

    invoke-virtual {v3, v0, v4, v5}, Lcom/cm/root/k;->execCmdWithTimeOut(Ljava/lang/String;J)Z

    .line 150
    if-eqz v2, :cond_46

    .line 151
    invoke-static {v1}, Lcom/cleanmaster/hpsharelib/base/util/io/FileUtils;->deleteFile(Ljava/lang/String;)Z

    .line 153
    :cond_46
    sget-object v1, Lcom/cleanmaster/ui/app/provider/download/l;->e:Ljava/util/List;

    monitor-enter v1

    .line 154
    :try_start_49
    sget-object v0, Lcom/cleanmaster/ui/app/provider/download/l;->e:Ljava/util/List;

    invoke-interface {v0, p1}, Ljava/util/List;->remove(Ljava/lang/Object;)Z

    .line 155
    monitor-exit v1

    goto :goto_6

    :catchall_50
    move-exception v0

    monitor-exit v1
    :try_end_52
    .catchall {:try_start_49 .. :try_end_52} :catchall_50

    throw v0

    .line 139
    :catchall_53
    move-exception v0

    :try_start_54
    monitor-exit v1
    :try_end_55
    .catchall {:try_start_54 .. :try_end_55} :catchall_53

    throw v0

    .line 143
    :cond_56
    const/4 v0, 0x0

    move v2, v0

    goto :goto_1c

    :cond_59
    move-object v0, p1

    .line 145
    goto :goto_1f
.end method

.method public static b(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)V
    .registers 5

    .prologue
    .line 58
    invoke-static {}, Lcom/cleanmaster/ui/app/provider/download/l;->c()Z

    move-result v0

    .line 59
    invoke-static {}, Lcom/cm/root/k;->a()Lcom/cm/root/k;

    move-result-object v1

    invoke-virtual {v1}, Lcom/cm/root/k;->isMobileRoot()Z

    move-result v1

    .line 60
    if-eqz v0, :cond_12

    .line 61
    invoke-static {p0, p1}, Lcom/cleanmaster/ui/app/provider/download/l;->b(Landroid/content/Context;Ljava/lang/String;)V

    .line 67
    :goto_11
    return-void

    .line 62
    :cond_12
    if-eqz v1, :cond_1e

    invoke-static {}, Lcom/cleanmaster/ui/app/provider/download/l;->b()Z

    move-result v0

    if-eqz v0, :cond_1e

    .line 63
    invoke-static {p1}, Lcom/cleanmaster/ui/app/provider/download/l;->c(Ljava/lang/String;)V

    goto :goto_11

    .line 65
    :cond_1e
    invoke-static {p0, p1, p2}, Lcom/cleanmaster/ui/app/provider/download/l;->c(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)V

    goto :goto_11
.end method

.method public static b()Z
    .registers 8

    .prologue
    const/4 v0, 0x0

    const/4 v3, 0x0

    .line 196
    :try_start_2
    invoke-static {}, Ljava/lang/Runtime;->getRuntime()Ljava/lang/Runtime;

    move-result-object v1

    const-string/jumbo v2, "su"

    invoke-virtual {v1, v2}, Ljava/lang/Runtime;->exec(Ljava/lang/String;)Ljava/lang/Process;
    :try_end_c
    .catch Ljava/io/IOException; {:try_start_2 .. :try_end_c} :catch_55
    .catch Ljava/lang/InterruptedException; {:try_start_2 .. :try_end_c} :catch_75
    .catchall {:try_start_2 .. :try_end_c} :catchall_95

    move-result-object v5

    .line 197
    :try_start_d
    new-instance v4, Ljava/io/DataOutputStream;

    invoke-virtual {v5}, Ljava/lang/Process;->getOutputStream()Ljava/io/OutputStream;

    move-result-object v1

    invoke-direct {v4, v1}, Ljava/io/DataOutputStream;-><init>(Ljava/io/OutputStream;)V
    :try_end_16
    .catch Ljava/io/IOException; {:try_start_d .. :try_end_16} :catch_c7
    .catch Ljava/lang/InterruptedException; {:try_start_d .. :try_end_16} :catch_bf
    .catchall {:try_start_d .. :try_end_16} :catchall_b2

    .line 198
    :try_start_16
    new-instance v2, Ljava/io/DataInputStream;

    invoke-virtual {v5}, Ljava/lang/Process;->getInputStream()Ljava/io/InputStream;

    move-result-object v1

    invoke-direct {v2, v1}, Ljava/io/DataInputStream;-><init>(Ljava/io/InputStream;)V
    :try_end_1f
    .catch Ljava/io/IOException; {:try_start_16 .. :try_end_1f} :catch_cb
    .catch Ljava/lang/InterruptedException; {:try_start_16 .. :try_end_1f} :catch_c2
    .catchall {:try_start_16 .. :try_end_1f} :catchall_b5

    .line 199
    :try_start_1f
    new-instance v3, Ljava/io/DataInputStream;

    invoke-virtual {v5}, Ljava/lang/Process;->getErrorStream()Ljava/io/InputStream;

    move-result-object v1

    invoke-direct {v3, v1}, Ljava/io/DataInputStream;-><init>(Ljava/io/InputStream;)V

    move v1, v0

    .line 201
    :goto_29
    const/4 v6, 0x3

    if-ge v1, v6, :cond_33

    .line 202
    invoke-static {v4, v2, v3}, Lcom/cleanmaster/ui/app/provider/download/l;->a(Ljava/io/DataOutputStream;Ljava/io/DataInputStream;Ljava/io/DataInputStream;)Z
    :try_end_2f
    .catch Ljava/io/IOException; {:try_start_1f .. :try_end_2f} :catch_d0
    .catch Ljava/lang/InterruptedException; {:try_start_1f .. :try_end_2f} :catch_c4
    .catchall {:try_start_1f .. :try_end_2f} :catchall_b7

    move-result v6

    if-eqz v6, :cond_43

    .line 204
    const/4 v0, 0x1

    .line 215
    :cond_33
    if-eqz v2, :cond_38

    .line 217
    :try_start_35
    invoke-virtual {v2}, Ljava/io/DataInputStream;->close()V
    :try_end_38
    .catch Ljava/io/IOException; {:try_start_35 .. :try_end_38} :catch_4b

    .line 223
    :cond_38
    :goto_38
    if-eqz v4, :cond_3d

    .line 225
    :try_start_3a
    invoke-virtual {v4}, Ljava/io/DataOutputStream;->close()V
    :try_end_3d
    .catch Ljava/io/IOException; {:try_start_3a .. :try_end_3d} :catch_50

    .line 231
    :cond_3d
    :goto_3d
    if-eqz v5, :cond_42

    .line 232
    invoke-virtual {v5}, Ljava/lang/Process;->destroy()V

    .line 238
    :cond_42
    :goto_42
    return v0

    .line 207
    :cond_43
    const-wide/16 v6, 0xc8

    :try_start_45
    invoke-static {v6, v7}, Ljava/lang/Thread;->sleep(J)V
    :try_end_48
    .catch Ljava/io/IOException; {:try_start_45 .. :try_end_48} :catch_d0
    .catch Ljava/lang/InterruptedException; {:try_start_45 .. :try_end_48} :catch_c4
    .catchall {:try_start_45 .. :try_end_48} :catchall_b7

    .line 201
    add-int/lit8 v1, v1, 0x1

    goto :goto_29

    .line 218
    :catch_4b
    move-exception v1

    .line 219
    invoke-virtual {v1}, Ljava/io/IOException;->printStackTrace()V

    goto :goto_38

    .line 226
    :catch_50
    move-exception v1

    .line 227
    invoke-virtual {v1}, Ljava/io/IOException;->printStackTrace()V

    goto :goto_3d

    .line 210
    :catch_55
    move-exception v1

    move-object v2, v3

    move-object v4, v3

    .line 211
    :goto_58
    :try_start_58
    invoke-virtual {v1}, Ljava/io/IOException;->printStackTrace()V
    :try_end_5b
    .catchall {:try_start_58 .. :try_end_5b} :catchall_ba

    .line 215
    if-eqz v2, :cond_60

    .line 217
    :try_start_5d
    invoke-virtual {v2}, Ljava/io/DataInputStream;->close()V
    :try_end_60
    .catch Ljava/io/IOException; {:try_start_5d .. :try_end_60} :catch_6b

    .line 223
    :cond_60
    :goto_60
    if-eqz v3, :cond_65

    .line 225
    :try_start_62
    invoke-virtual {v3}, Ljava/io/DataOutputStream;->close()V
    :try_end_65
    .catch Ljava/io/IOException; {:try_start_62 .. :try_end_65} :catch_70

    .line 231
    :cond_65
    :goto_65
    if-eqz v4, :cond_42

    .line 232
    invoke-virtual {v4}, Ljava/lang/Process;->destroy()V

    goto :goto_42

    .line 218
    :catch_6b
    move-exception v1

    .line 219
    invoke-virtual {v1}, Ljava/io/IOException;->printStackTrace()V

    goto :goto_60

    .line 226
    :catch_70
    move-exception v1

    .line 227
    invoke-virtual {v1}, Ljava/io/IOException;->printStackTrace()V

    goto :goto_65

    .line 212
    :catch_75
    move-exception v1

    move-object v4, v3

    move-object v5, v3

    .line 213
    :goto_78
    :try_start_78
    invoke-virtual {v1}, Ljava/lang/InterruptedException;->printStackTrace()V
    :try_end_7b
    .catchall {:try_start_78 .. :try_end_7b} :catchall_b5

    .line 215
    if-eqz v3, :cond_80

    .line 217
    :try_start_7d
    invoke-virtual {v3}, Ljava/io/DataInputStream;->close()V
    :try_end_80
    .catch Ljava/io/IOException; {:try_start_7d .. :try_end_80} :catch_8b

    .line 223
    :cond_80
    :goto_80
    if-eqz v4, :cond_85

    .line 225
    :try_start_82
    invoke-virtual {v4}, Ljava/io/DataOutputStream;->close()V
    :try_end_85
    .catch Ljava/io/IOException; {:try_start_82 .. :try_end_85} :catch_90

    .line 231
    :cond_85
    :goto_85
    if-eqz v5, :cond_42

    .line 232
    invoke-virtual {v5}, Ljava/lang/Process;->destroy()V

    goto :goto_42

    .line 218
    :catch_8b
    move-exception v1

    .line 219
    invoke-virtual {v1}, Ljava/io/IOException;->printStackTrace()V

    goto :goto_80

    .line 226
    :catch_90
    move-exception v1

    .line 227
    invoke-virtual {v1}, Ljava/io/IOException;->printStackTrace()V

    goto :goto_85

    .line 215
    :catchall_95
    move-exception v0

    move-object v4, v3

    move-object v5, v3

    :goto_98
    if-eqz v3, :cond_9d

    .line 217
    :try_start_9a
    invoke-virtual {v3}, Ljava/io/DataInputStream;->close()V
    :try_end_9d
    .catch Ljava/io/IOException; {:try_start_9a .. :try_end_9d} :catch_a8

    .line 223
    :cond_9d
    :goto_9d
    if-eqz v4, :cond_a2

    .line 225
    :try_start_9f
    invoke-virtual {v4}, Ljava/io/DataOutputStream;->close()V
    :try_end_a2
    .catch Ljava/io/IOException; {:try_start_9f .. :try_end_a2} :catch_ad

    .line 231
    :cond_a2
    :goto_a2
    if-eqz v5, :cond_a7

    .line 232
    invoke-virtual {v5}, Ljava/lang/Process;->destroy()V

    .line 233
    :cond_a7
    throw v0

    .line 218
    :catch_a8
    move-exception v1

    .line 219
    invoke-virtual {v1}, Ljava/io/IOException;->printStackTrace()V

    goto :goto_9d

    .line 226
    :catch_ad
    move-exception v1

    .line 227
    invoke-virtual {v1}, Ljava/io/IOException;->printStackTrace()V

    goto :goto_a2

    .line 215
    :catchall_b2
    move-exception v0

    move-object v4, v3

    goto :goto_98

    :catchall_b5
    move-exception v0

    goto :goto_98

    :catchall_b7
    move-exception v0

    move-object v3, v2

    goto :goto_98

    :catchall_ba
    move-exception v0

    move-object v5, v4

    move-object v4, v3

    move-object v3, v2

    goto :goto_98

    .line 212
    :catch_bf
    move-exception v1

    move-object v4, v3

    goto :goto_78

    :catch_c2
    move-exception v1

    goto :goto_78

    :catch_c4
    move-exception v1

    move-object v3, v2

    goto :goto_78

    .line 210
    :catch_c7
    move-exception v1

    move-object v2, v3

    move-object v4, v5

    goto :goto_58

    :catch_cb
    move-exception v1

    move-object v2, v3

    move-object v3, v4

    move-object v4, v5

    goto :goto_58

    :catch_d0
    move-exception v1

    move-object v3, v4

    move-object v4, v5

    goto :goto_58
.end method

.method public static b(Landroid/content/Context;)Z
    .registers 9

    .prologue
    const/4 v1, 0x1

    const/4 v2, 0x0

    .line 295
    .line 298
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {p0}, Landroid/content/Context;->getPackageName()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v3, "/com.cleanmaster.boost.acc.service.AccessibilityKillService"

    invoke-virtual {v0, v3}, 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 v3

    .line 304
    :try_start_19
    invoke-virtual {p0}, Landroid/content/Context;->getApplicationContext()Landroid/content/Context;

    move-result-object v0

    invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v0

    const-string v4, "accessibility_enabled"

    .line 303
    invoke-static {v0, v4}, Landroid/provider/Settings$Secure;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;)I
    :try_end_26
    .catch Landroid/provider/Settings$SettingNotFoundException; {:try_start_19 .. :try_end_26} :catch_9c

    move-result v0

    .line 306
    :try_start_27
    const-string v4, "InstallApkHelper"

    new-instance v5, Ljava/lang/StringBuilder;

    invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V

    const-string v6, "accessibilityEnabled = "

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v5

    invoke-static {v4, v5}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I
    :try_end_3f
    .catch Landroid/provider/Settings$SettingNotFoundException; {:try_start_27 .. :try_end_3f} :catch_9f

    .line 311
    :goto_3f
    new-instance v4, Landroid/text/TextUtils$SimpleStringSplitter;

    const/16 v5, 0x3a

    invoke-direct {v4, v5}, Landroid/text/TextUtils$SimpleStringSplitter;-><init>(C)V

    .line 313
    if-ne v0, v1, :cond_93

    .line 314
    const-string v0, "InstallApkHelper"

    const-string v5, "***ACCESSIBILIY IS ENABLED*** -----------------"

    invoke-static {v0, v5}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I

    .line 316
    invoke-virtual {p0}, Landroid/content/Context;->getApplicationContext()Landroid/content/Context;

    move-result-object v0

    invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v0

    const-string v5, "enabled_accessibility_services"

    .line 315
    invoke-static {v0, v5}, Landroid/provider/Settings$Secure;->getString(Landroid/content/ContentResolver;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    .line 318
    if-eqz v0, :cond_9a

    .line 320
    invoke-virtual {v4, v0}, Landroid/text/TextUtils$SimpleStringSplitter;->setString(Ljava/lang/String;)V

    .line 321
    :cond_62
    invoke-virtual {v4}, Landroid/text/TextUtils$SimpleStringSplitter;->hasNext()Z

    move-result v0

    if-eqz v0, :cond_9a

    .line 322
    invoke-virtual {v4}, Landroid/text/TextUtils$SimpleStringSplitter;->next()Ljava/lang/String;

    move-result-object v0

    .line 324
    const-string v5, "InstallApkHelper"

    new-instance v6, Ljava/lang/StringBuilder;

    invoke-direct {v6}, Ljava/lang/StringBuilder;-><init>()V

    const-string v7, "-------------- > accessabilityService :: "

    invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v6

    invoke-virtual {v6, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v6

    invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v6

    invoke-static {v5, v6}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I

    .line 325
    invoke-virtual {v0, v3}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_62

    .line 326
    const-string v0, "InstallApkHelper"

    const-string v2, "We\'ve found the correct setting - accessibility is switched on!"

    invoke-static {v0, v2}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I

    move v0, v1

    .line 335
    :goto_92
    return v0

    .line 332
    :cond_93
    const-string v0, "InstallApkHelper"

    const-string v1, "***ACCESSIBILIY IS DISABLED***"

    invoke-static {v0, v1}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I

    :cond_9a
    move v0, v2

    .line 335
    goto :goto_92

    .line 307
    :catch_9c
    move-exception v0

    move v0, v2

    goto :goto_3f

    :catch_9f
    move-exception v4

    goto :goto_3f
.end method

.method private static c(Landroid/content/Context;)V
    .registers 4

    .prologue
    .line 112
    if-nez p0, :cond_3

    .line 118
    :goto_2
    return-void

    .line 114
    :cond_3
    new-instance v0, Landroid/content/Intent;

    invoke-direct {v0}, Landroid/content/Intent;-><init>()V

    .line 115
    const-string v1, "com.cleanmaster.service.acc4install.message"

    invoke-virtual {v0, v1}, Landroid/content/Intent;->setAction(Ljava/lang/String;)Landroid/content/Intent;

    .line 116
    const-string/jumbo v1, "switch"

    const/4 v2, 0x1

    invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Z)Landroid/content/Intent;

    .line 117
    invoke-virtual {p0, v0}, Landroid/content/Context;->sendBroadcast(Landroid/content/Intent;)V

    goto :goto_2
.end method

.method public static c(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)V
    .registers 6

    .prologue
    .line 100
    invoke-static {p0}, Lcom/cleanmaster/ui/app/provider/download/l;->c(Landroid/content/Context;)V

    .line 102
    new-instance v0, Landroid/content/Intent;

    const-class v1, Lcom/cleanmaster/ui/app/provider/download/install/InstallApkActivity;

    invoke-direct {v0, p0, v1}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    .line 103
    const/high16 v1, 0x10000000

    invoke-virtual {v0, v1}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;

    .line 104
    const-string v1, "filepath"

    invoke-virtual {v0, v1, p1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    .line 105
    const-string v1, "pkgName"

    invoke-virtual {v0, v1, p2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    .line 106
    const-string v1, "isAccOn"

    invoke-static {p0}, Lcom/cleanmaster/ui/app/provider/download/l;->b(Landroid/content/Context;)Z

    move-result v2

    invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Z)Landroid/content/Intent;

    .line 108
    invoke-static {p0, v0}, Lcom/cleanmaster/hpsharelib/base/util/system/PackageUtils;->startActivityByBrandInstall(Landroid/content/Context;Landroid/content/Intent;)V

    .line 109
    return-void
.end method

.method private static c(Ljava/lang/String;)V
    .registers 3

    .prologue
    .line 339
    invoke-static {}, Lcom/cleanmaster/service/root4install/b;->a()Lcom/cleanmaster/service/root4install/b;

    move-result-object v0

    const/4 v1, 0x0

    invoke-virtual {v0, p0, v1}, Lcom/cleanmaster/service/root4install/b;->a(Ljava/lang/String;Lcom/cleanmaster/service/root4install/SuInstallImpl$OnInstallListenner;)I

    .line 340
    return-void
.end method

.method public static c()Z
    .registers 4

    .prologue
    .line 275
    const/4 v0, 0x0

    .line 277
    invoke-static {}, Lcom/cleanmaster/hpsharelib/base/util/system/ConflictCommons;->isCNVersion()Z

    move-result v1

    if-eqz v1, :cond_1e

    .line 278
    invoke-static {}, Lcom/cm/root/k;->a()Lcom/cm/root/k;

    move-result-object v1

    invoke-virtual {v1}, Lcom/cm/root/k;->checkRoot()Z

    move-result v1

    if-eqz v1, :cond_1e

    sget-object v1, Lcom/cleanmaster/ui/app/provider/download/l;->a:Ljava/lang/String;

    sget-object v2, Lcom/cleanmaster/ui/app/provider/download/l;->b:Ljava/lang/String;

    sget-boolean v3, Lcom/cleanmaster/ui/app/provider/download/l;->c:Z

    .line 279
    invoke-static {v1, v2, v3}, Lcom/cleanmaster/hpsharelib/cloudconfig/CloudCfgDataWrapper;->getCloudCfgBooleanValue(Ljava/lang/String;Ljava/lang/String;Z)Z

    move-result v1

    if-eqz v1, :cond_1e

    .line 280
    const/4 v0, 0x1

    .line 284
    :cond_1e
    return v0
.end method