a.smali

.class public Lks/cm/antivirus/module/locker/a;
.super Ljava/lang/Object;
.source "KeyguardUtils.java"


# static fields
.field private static a:Landroid/app/KeyguardManager;

.field private static b:Landroid/app/KeyguardManager$KeyguardLock;


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

    .prologue
    const/4 v0, 0x0

    .line 23
    sput-object v0, Lks/cm/antivirus/module/locker/a;->a:Landroid/app/KeyguardManager;

    .line 24
    sput-object v0, Lks/cm/antivirus/module/locker/a;->b:Landroid/app/KeyguardManager$KeyguardLock;

    return-void
.end method

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

    .prologue
    const/4 v1, 0x2

    const/4 v0, 0x0

    const/4 v2, 0x5

    .line 180
    .line 183
    :try_start_3
    invoke-static {p0}, Lks/cm/antivirus/module/locker/a;->d(Landroid/content/Context;)I

    move-result v3

    .line 184
    if-nez v3, :cond_12

    .line 185
    invoke-static {p0}, Lks/cm/antivirus/module/locker/a;->g(Landroid/content/Context;)Z
    :try_end_c
    .catch Ljava/lang/Exception; {:try_start_3 .. :try_end_c} :catch_27

    move-result v1

    if-eqz v1, :cond_10

    .line 225
    :goto_f
    return v0

    .line 188
    :cond_10
    const/4 v0, 0x1

    goto :goto_f

    .line 192
    :cond_12
    sparse-switch v3, :sswitch_data_2c

    move v0, v2

    .line 218
    goto :goto_f

    :sswitch_17
    move v0, v1

    .line 195
    goto :goto_f

    .line 197
    :sswitch_19
    const/4 v0, 0x4

    .line 198
    goto :goto_f

    .line 200
    :sswitch_1b
    const/4 v0, 0x3

    .line 201
    goto :goto_f

    :sswitch_1d
    move v0, v2

    .line 204
    goto :goto_f

    :sswitch_1f
    move v0, v2

    .line 207
    goto :goto_f

    :sswitch_21
    move v0, v2

    .line 210
    goto :goto_f

    :sswitch_23
    move v0, v1

    .line 213
    goto :goto_f

    .line 215
    :sswitch_25
    const/4 v0, 0x6

    .line 216
    goto :goto_f

    .line 221
    :catch_27
    move-exception v1

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

    goto :goto_f

    .line 192
    :sswitch_data_2c
    .sparse-switch
        0x8000 -> :sswitch_19
        0x9000 -> :sswitch_23
        0x10000 -> :sswitch_17
        0x20000 -> :sswitch_1b
        0x40000 -> :sswitch_1d
        0x50000 -> :sswitch_1f
        0x60000 -> :sswitch_21
        0x61000 -> :sswitch_25
    .end sparse-switch
.end method

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

    .prologue
    const/4 v0, 0x1

    .line 441
    invoke-static {p0}, Lks/cm/antivirus/module/locker/a;->a(Landroid/content/Context;)I

    move-result v1

    .line 442
    if-eqz v1, :cond_a

    if-eq v1, v0, :cond_a

    .line 450
    :cond_9
    :goto_9
    return v0

    .line 446
    :cond_a
    invoke-static {p0}, Lks/cm/antivirus/module/locker/a;->c(Landroid/content/Context;)Z

    move-result v1

    if-nez v1, :cond_9

    .line 450
    const/4 v0, 0x0

    goto :goto_9
.end method

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

    .prologue
    const/4 v1, 0x0

    .line 245
    .line 246
    sget v0, Landroid/os/Build$VERSION;->SDK_INT:I

    const/16 v2, 0x12

    if-lt v0, v2, :cond_22

    .line 248
    :try_start_7
    sget-object v0, Lks/cm/antivirus/module/locker/a;->a:Landroid/app/KeyguardManager;

    if-nez v0, :cond_15

    .line 249
    const-string v0, "keyguard"

    .line 250
    invoke-virtual {p0, v0}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/app/KeyguardManager;

    sput-object v0, Lks/cm/antivirus/module/locker/a;->a:Landroid/app/KeyguardManager;

    .line 252
    :cond_15
    sget-object v0, Lks/cm/antivirus/module/locker/a;->a:Landroid/app/KeyguardManager;

    invoke-virtual {v0}, Landroid/app/KeyguardManager;->isKeyguardSecure()Z
    :try_end_1a
    .catch Ljava/lang/Throwable; {:try_start_7 .. :try_end_1a} :catch_1c

    move-result v0

    .line 258
    :goto_1b
    return v0

    .line 253
    :catch_1c
    move-exception v0

    .line 254
    invoke-virtual {v0}, Ljava/lang/Throwable;->printStackTrace()V

    move v0, v1

    .line 255
    goto :goto_1b

    :cond_22
    move v0, v1

    goto :goto_1b
.end method

.method private static d(Landroid/content/Context;)I
    .registers 3

    .prologue
    .line 262
    sget v0, Landroid/os/Build$VERSION;->SDK_INT:I

    const/16 v1, 0x17

    if-lt v0, v1, :cond_10

    .line 263
    invoke-static {p0}, Lks/cm/antivirus/module/locker/a;->c(Landroid/content/Context;)Z

    move-result v0

    if-eqz v0, :cond_e

    const/4 v0, 0x1

    .line 265
    :goto_d
    return v0

    .line 263
    :cond_e
    const/4 v0, 0x0

    goto :goto_d

    .line 265
    :cond_10
    invoke-static {p0}, Lks/cm/antivirus/module/locker/a;->e(Landroid/content/Context;)I

    move-result v0

    goto :goto_d
.end method

.method private static e(Landroid/content/Context;)I
    .registers 6

    .prologue
    const/4 v1, 0x0

    .line 270
    const-string v0, "com.android.internal.widget.LockPatternUtils"

    .line 272
    :try_start_3
    invoke-static {v0}, Ljava/lang/Class;->forName(Ljava/lang/String;)Ljava/lang/Class;

    move-result-object v0

    .line 274
    const/4 v2, 0x1

    new-array v2, v2, [Ljava/lang/Class;

    const/4 v3, 0x0

    const-class v4, Landroid/content/Context;

    aput-object v4, v2, v3

    invoke-virtual {v0, v2}, Ljava/lang/Class;->getConstructor([Ljava/lang/Class;)Ljava/lang/reflect/Constructor;

    move-result-object v2

    const/4 v3, 0x1

    new-array v3, v3, [Ljava/lang/Object;

    const/4 v4, 0x0

    aput-object p0, v3, v4

    invoke-virtual {v2, v3}, Ljava/lang/reflect/Constructor;->newInstance([Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v2

    .line 276
    const-string v3, "getActivePasswordQuality"

    const/4 v4, 0x0

    new-array v4, v4, [Ljava/lang/Class;

    invoke-virtual {v0, v3, v4}, Ljava/lang/Class;->getMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;

    move-result-object v0

    .line 278
    const/4 v3, 0x0

    new-array v3, v3, [Ljava/lang/Object;

    invoke-virtual {v0, v2, v3}, 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_32
    .catch Ljava/lang/Exception; {:try_start_3 .. :try_end_32} :catch_34

    move-result v0

    .line 284
    :goto_33
    return v0

    .line 281
    :catch_34
    move-exception v0

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

    move v0, v1

    .line 284
    goto :goto_33
.end method

.method private static f(Landroid/content/Context;)I
    .registers 5

    .prologue
    const/4 v0, 0x0

    .line 289
    :try_start_1
    invoke-virtual {p0}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;

    move-result-object v1

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

    move-result-object v2

    const/4 v3, 0x0

    invoke-virtual {v1, v2, v3}, Landroid/content/pm/PackageManager;->getApplicationInfo(Ljava/lang/String;I)Landroid/content/pm/ApplicationInfo;

    move-result-object v1

    iget v0, v1, Landroid/content/pm/ApplicationInfo;->uid:I
    :try_end_10
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_10} :catch_11

    .line 293
    :goto_10
    return v0

    .line 290
    :catch_11
    move-exception v1

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

    goto :goto_10
.end method

.method private static g(Landroid/content/Context;)Z
    .registers 3

    .prologue
    .line 297
    sget v0, Landroid/os/Build$VERSION;->SDK_INT:I

    const/16 v1, 0x16

    if-le v0, v1, :cond_b

    .line 298
    invoke-static {p0}, Lks/cm/antivirus/module/locker/a;->h(Landroid/content/Context;)Z

    move-result v0

    .line 300
    :goto_a
    return v0

    :cond_b
    invoke-static {p0}, Lks/cm/antivirus/module/locker/a;->i(Landroid/content/Context;)Z

    move-result v0

    goto :goto_a
.end method

.method private static h(Landroid/content/Context;)Z
    .registers 3

    .prologue
    .line 305
    new-instance v0, Lcom/android/internal/widget/LockPatternUtils;

    invoke-direct {v0, p0}, Lcom/android/internal/widget/LockPatternUtils;-><init>(Landroid/content/Context;)V

    .line 306
    invoke-static {p0}, Lks/cm/antivirus/module/locker/a;->f(Landroid/content/Context;)I

    move-result v1

    invoke-virtual {v0, v1}, Lcom/android/internal/widget/LockPatternUtils;->getActivePasswordQuality(I)I

    move-result v1

    .line 307
    if-nez v1, :cond_1b

    .line 308
    invoke-static {p0}, Lks/cm/antivirus/module/locker/a;->f(Landroid/content/Context;)I

    move-result v1

    invoke-virtual {v0, v1}, Lcom/android/internal/widget/LockPatternUtils;->isLockScreenDisabled(I)Z

    move-result v0

    if-eqz v0, :cond_1b

    .line 309
    const/4 v0, 0x1

    .line 312
    :goto_1a
    return v0

    :cond_1b
    const/4 v0, 0x0

    goto :goto_1a
.end method

.method private static i(Landroid/content/Context;)Z
    .registers 6

    .prologue
    const/4 v0, 0x1

    .line 316
    const-string v1, "com.android.internal.widget.LockPatternUtils"

    .line 318
    :try_start_3
    invoke-static {v1}, Ljava/lang/Class;->forName(Ljava/lang/String;)Ljava/lang/Class;

    move-result-object v1

    .line 320
    const/4 v2, 0x1

    new-array v2, v2, [Ljava/lang/Class;

    const/4 v3, 0x0

    const-class v4, Landroid/content/Context;

    aput-object v4, v2, v3

    invoke-virtual {v1, v2}, Ljava/lang/Class;->getConstructor([Ljava/lang/Class;)Ljava/lang/reflect/Constructor;

    move-result-object v2

    const/4 v3, 0x1

    new-array v3, v3, [Ljava/lang/Object;

    const/4 v4, 0x0

    aput-object p0, v3, v4

    invoke-virtual {v2, v3}, Ljava/lang/reflect/Constructor;->newInstance([Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v2

    .line 322
    const-string v3, "isLockScreenDisabled"

    const/4 v4, 0x0

    new-array v4, v4, [Ljava/lang/Class;

    invoke-virtual {v1, v3, v4}, Ljava/lang/Class;->getMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;

    move-result-object v1

    .line 324
    const/4 v3, 0x0

    new-array v3, v3, [Ljava/lang/Object;

    invoke-virtual {v1, v2, v3}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v1

    invoke-static {v1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v1

    invoke-static {v1}, Ljava/lang/Boolean;->valueOf(Ljava/lang/String;)Ljava/lang/Boolean;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/Boolean;->booleanValue()Z
    :try_end_38
    .catch Ljava/lang/Exception; {:try_start_3 .. :try_end_38} :catch_3a

    move-result v0

    .line 331
    :goto_39
    return v0

    .line 327
    :catch_3a
    move-exception v1

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

    goto :goto_39
.end method