f$a.smali

.class Lcom/cm/root/f$a;
.super Ljava/lang/Object;
.source "RootManager_Internal.java"

# interfaces
.implements Ljava/lang/Runnable;


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/cm/root/f;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x2
    name = "a"
.end annotation


# instance fields
.field final synthetic a:Lcom/cm/root/f;

.field private b:Landroid/app/ActivityManager;


# direct methods
.method private constructor <init>(Lcom/cm/root/f;)V
    .registers 2

    .prologue
    .line 76
    iput-object p1, p0, Lcom/cm/root/f$a;->a:Lcom/cm/root/f;

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

    return-void
.end method

.method synthetic constructor <init>(Lcom/cm/root/f;Lcom/cm/root/g;)V
    .registers 3

    .prologue
    .line 76
    invoke-direct {p0, p1}, Lcom/cm/root/f$a;-><init>(Lcom/cm/root/f;)V

    return-void
.end method

.method private a()V
    .registers 3

    .prologue
    .line 173
    const-wide/16 v0, 0x1f4

    :try_start_2
    invoke-static {v0, v1}, Ljava/lang/Thread;->sleep(J)V
    :try_end_5
    .catch Ljava/lang/InterruptedException; {:try_start_2 .. :try_end_5} :catch_6

    .line 178
    :goto_5
    return-void

    .line 174
    :catch_6
    move-exception v0

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

    goto :goto_5
.end method


# virtual methods
.method public run()V
    .registers 13

    .prologue
    const/4 v6, 0x1

    const/4 v2, 0x0

    .line 87
    const-wide/16 v0, 0x1f4

    :try_start_4
    invoke-static {v0, v1}, Ljava/lang/Thread;->sleep(J)V
    :try_end_7
    .catch Ljava/lang/InterruptedException; {:try_start_4 .. :try_end_7} :catch_5b

    .line 93
    :goto_7
    invoke-static {}, Lcom/keniu/security/m;->d()Landroid/content/Context;

    move-result-object v8

    .line 94
    const-string v0, "activity"

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

    move-result-object v0

    check-cast v0, Landroid/app/ActivityManager;

    iput-object v0, p0, Lcom/cm/root/f$a;->b:Landroid/app/ActivityManager;

    .line 97
    invoke-virtual {v8}, Landroid/content/Context;->getPackageName()Ljava/lang/String;

    move-result-object v4

    .line 100
    invoke-static {}, Lcom/cleanmaster/hpsharelib/base/util/system/LauncherUtil;->getInst()Lcom/cleanmaster/hpsharelib/base/util/system/LauncherUtil;

    move-result-object v0

    invoke-virtual {v0, v2}, Lcom/cleanmaster/hpsharelib/base/util/system/LauncherUtil;->getCurrentLauncherName(Z)Ljava/lang/String;

    move-result-object v9

    .line 101
    invoke-static {}, Lcom/keniu/security/m;->d()Landroid/content/Context;

    move-result-object v0

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

    move-result-object v0

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

    move-result-object v10

    .line 108
    const/16 v0, 0x28

    .line 109
    new-instance v1, Lcom/cleanmaster/hpsharelib/base/util/system/TopAppQuery;

    invoke-direct {v1}, Lcom/cleanmaster/hpsharelib/base/util/system/TopAppQuery;-><init>()V

    .line 110
    invoke-virtual {v1, v6}, Lcom/cleanmaster/hpsharelib/base/util/system/TopAppQuery;->setRootProgress(Z)V

    move v5, v0

    move v1, v2

    move v3, v2

    move v0, v2

    .line 111
    :goto_3b
    if-lez v5, :cond_5a

    .line 113
    iget-object v7, p0, Lcom/cm/root/f$a;->a:Lcom/cm/root/f;

    invoke-static {v7}, Lcom/cm/root/f;->a(Lcom/cm/root/f;)Ljava/lang/Boolean;

    move-result-object v7

    invoke-virtual {v7}, Ljava/lang/Boolean;->booleanValue()Z

    move-result v7

    if-eqz v7, :cond_60

    .line 114
    iget-object v0, p0, Lcom/cm/root/f$a;->a:Lcom/cm/root/f;

    invoke-static {v0}, Lcom/cm/root/f;->b(Lcom/cm/root/f;)Lcom/cm/root/f$c;

    move-result-object v0

    if-eqz v0, :cond_5a

    .line 115
    iget-object v0, p0, Lcom/cm/root/f$a;->a:Lcom/cm/root/f;

    invoke-static {v0}, Lcom/cm/root/f;->b(Lcom/cm/root/f;)Lcom/cm/root/f$c;

    move-result-object v0

    invoke-interface {v0}, Lcom/cm/root/f$c;->a()V

    .line 170
    :cond_5a
    :goto_5a
    return-void

    .line 88
    :catch_5b
    move-exception v0

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

    goto :goto_7

    .line 121
    :cond_60
    invoke-direct {p0}, Lcom/cm/root/f$a;->a()V

    .line 123
    invoke-static {v8}, Lcom/cleanmaster/hpsharelib/base/util/system/TopAppQuery;->getTopAppPkgName(Landroid/content/Context;)Ljava/lang/String;

    move-result-object v7

    .line 124
    invoke-static {v7}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v11

    if-nez v11, :cond_5a

    .line 132
    if-nez v3, :cond_7e

    invoke-virtual {v7, v10}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v11

    if-nez v11, :cond_7b

    invoke-virtual {v7, v9}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v11

    if-eqz v11, :cond_7e

    .line 111
    :cond_7b
    :goto_7b
    add-int/lit8 v5, v5, -0x1

    goto :goto_3b

    .line 136
    :cond_7e
    invoke-virtual {v7, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v11

    if-nez v11, :cond_94

    .line 139
    add-int/lit8 v3, v3, 0x1

    .line 141
    if-ne v3, v6, :cond_a9

    .line 142
    iget-object v4, p0, Lcom/cm/root/f$a;->a:Lcom/cm/root/f;

    invoke-static {v4}, Lcom/cm/root/f;->b(Lcom/cm/root/f;)Lcom/cm/root/f$c;

    move-result-object v4

    if-eqz v4, :cond_bb

    if-eqz v7, :cond_bb

    move v1, v6

    move-object v4, v7

    .line 158
    :cond_94
    :goto_94
    if-eqz v1, :cond_7b

    .line 159
    add-int/lit8 v0, v0, 0x1

    .line 161
    const/4 v11, 0x3

    if-gt v11, v0, :cond_7b

    .line 162
    invoke-static {v7}, Lcom/cm/b/c;->b(Ljava/lang/String;)V

    .line 163
    iget-object v1, p0, Lcom/cm/root/f$a;->a:Lcom/cm/root/f;

    invoke-static {v1}, Lcom/cm/root/f;->b(Lcom/cm/root/f;)Lcom/cm/root/f$c;

    move-result-object v1

    invoke-interface {v1, v7}, Lcom/cm/root/f$c;->a(Ljava/lang/String;)V

    move v1, v2

    .line 164
    goto :goto_7b

    .line 149
    :cond_a9
    iget-object v0, p0, Lcom/cm/root/f$a;->a:Lcom/cm/root/f;

    invoke-static {v0}, Lcom/cm/root/f;->b(Lcom/cm/root/f;)Lcom/cm/root/f$c;

    move-result-object v0

    if-eqz v0, :cond_5a

    .line 150
    iget-object v0, p0, Lcom/cm/root/f$a;->a:Lcom/cm/root/f;

    invoke-static {v0}, Lcom/cm/root/f;->b(Lcom/cm/root/f;)Lcom/cm/root/f$c;

    move-result-object v0

    invoke-interface {v0}, Lcom/cm/root/f$c;->a()V

    goto :goto_5a

    :cond_bb
    move-object v4, v7

    goto :goto_94
.end method