RootCacheScanTask.smali

.class public Lcom/cleanmaster/junk/scan/RootCacheScanTask;
.super Lcom/cleanmaster/junk/scan/IScanTask$BaseStub;
.source "RootCacheScanTask.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/cleanmaster/junk/scan/RootCacheScanTask$RootCacheScanCallback;
    }
.end annotation


# static fields
.field public static final ROOT_CACHE_SCAN_FINISH:I = 0x2

.field public static final ROOT_CACHE_SCAN_FOUND_ITEM:I = 0x4

.field public static final ROOT_CACHE_SCAN_PROGRESS_START:I = 0x5

.field public static final ROOT_CACHE_SCAN_START:I = 0x1


# instance fields
.field private isSdCacheScanFinish:Z

.field private mRootCacheScanCallback:Lcom/cleanmaster/junk/scan/RootCacheScanTask$RootCacheScanCallback;

.field private rootStateBlockingQueue:Ljava/util/concurrent/BlockingQueue;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/concurrent/BlockingQueue",
            "<",
            "Ljava/lang/Integer;",
            ">;"
        }
    .end annotation
.end field

.field rootStateObserver:Lcom/cm/plugincluster/common/interfaces/root/IOverallRootStateObserver;


# direct methods
.method public constructor <init>()V
    .registers 2

    .prologue
    .line 51
    invoke-static {}, Lcom/cleanmaster/junk/util/JunkUtils;->getContext()Landroid/content/Context;

    move-result-object v0

    invoke-direct {p0, v0}, Lcom/cleanmaster/junk/scan/IScanTask$BaseStub;-><init>(Landroid/content/Context;)V

    .line 32
    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/cleanmaster/junk/scan/RootCacheScanTask;->isSdCacheScanFinish:Z

    .line 33
    new-instance v0, Ljava/util/concurrent/LinkedBlockingQueue;

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

    iput-object v0, p0, Lcom/cleanmaster/junk/scan/RootCacheScanTask;->rootStateBlockingQueue:Ljava/util/concurrent/BlockingQueue;

    .line 168
    new-instance v0, Lcom/cleanmaster/junk/scan/RootCacheScanTask$1;

    invoke-direct {v0, p0}, Lcom/cleanmaster/junk/scan/RootCacheScanTask$1;-><init>(Lcom/cleanmaster/junk/scan/RootCacheScanTask;)V

    iput-object v0, p0, Lcom/cleanmaster/junk/scan/RootCacheScanTask;->rootStateObserver:Lcom/cm/plugincluster/common/interfaces/root/IOverallRootStateObserver;

    .line 52
    return-void
.end method

.method static synthetic access$000(Lcom/cleanmaster/junk/scan/RootCacheScanTask;)Ljava/util/concurrent/BlockingQueue;
    .registers 2

    .prologue
    .line 23
    iget-object v0, p0, Lcom/cleanmaster/junk/scan/RootCacheScanTask;->rootStateBlockingQueue:Ljava/util/concurrent/BlockingQueue;

    return-object v0
.end method

.method private doScan(Lcom/cleanmaster/junk/scan/IScanTaskController;)V
    .registers 6

    .prologue
    .line 91
    .line 92
    new-instance v0, Ljava/util/LinkedList;

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

    .line 93
    :cond_5
    :goto_5
    iget-boolean v1, p0, Lcom/cleanmaster/junk/scan/RootCacheScanTask;->isSdCacheScanFinish:Z

    if-eqz v1, :cond_11

    iget-object v1, p0, Lcom/cleanmaster/junk/scan/RootCacheScanTask;->mRootCacheScanCallback:Lcom/cleanmaster/junk/scan/RootCacheScanTask$RootCacheScanCallback;

    invoke-interface {v1}, Lcom/cleanmaster/junk/scan/RootCacheScanTask$RootCacheScanCallback;->isQueueEmpty()Z

    move-result v1

    if-nez v1, :cond_19

    .line 94
    :cond_11
    if-eqz p1, :cond_2b

    invoke-interface {p1}, Lcom/cleanmaster/junk/scan/IScanTaskController;->checkStop()Z

    move-result v1

    if-eqz v1, :cond_2b

    .line 104
    :cond_19
    if-eqz v0, :cond_2a

    invoke-virtual {v0}, Ljava/util/LinkedList;->size()I

    move-result v1

    if-lez v1, :cond_2a

    .line 105
    invoke-static {}, Lcom/cleanmaster/cleancloud/KCleanCloudManager;->createCacheResultReporter()Lcom/cleanmaster/junkengine/cleancloud/IKCleanCloudResultReporter;

    move-result-object v1

    .line 106
    if-eqz v1, :cond_2a

    .line 107
    invoke-interface {v1, v0}, Lcom/cleanmaster/junkengine/cleancloud/IKCleanCloudResultReporter;->report(Ljava/util/Collection;)Z

    .line 110
    :cond_2a
    return-void

    .line 97
    :cond_2b
    iget-object v1, p0, Lcom/cleanmaster/junk/scan/RootCacheScanTask;->mRootCacheScanCallback:Lcom/cleanmaster/junk/scan/RootCacheScanTask$RootCacheScanCallback;

    invoke-interface {v1}, Lcom/cleanmaster/junk/scan/RootCacheScanTask$RootCacheScanCallback;->getRootCacheInfoItem()Lcom/cleanmaster/junk/bean/RootCacheInfo;

    move-result-object v1

    .line 98
    invoke-direct {p0, v1, p1}, Lcom/cleanmaster/junk/scan/RootCacheScanTask;->scanPkgPath(Lcom/cleanmaster/junk/bean/RootCacheInfo;Lcom/cleanmaster/junk/scan/IScanTaskController;)V

    .line 99
    invoke-virtual {v1}, Lcom/cleanmaster/junk/bean/RootCacheInfo;->getSignId()Ljava/lang/String;

    move-result-object v2

    if-eqz v2, :cond_5

    invoke-virtual {v1}, Lcom/cleanmaster/junk/bean/RootCacheInfo;->getScanType()I

    move-result v2

    if-ltz v2, :cond_5

    invoke-virtual {v1}, Lcom/cleanmaster/junk/bean/RootCacheInfo;->getSignId()Ljava/lang/String;

    move-result-object v2

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

    move-result-object v2

    const-string v3, "0"

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

    move-result v2

    if-nez v2, :cond_5

    .line 100
    const/4 v2, 0x3

    invoke-static {v1, v2}, Lcom/cleanmaster/junk/scan/JunkCacheScanHelper;->rootCacheInfoToResultData(Lcom/cleanmaster/junk/bean/RootCacheInfo;B)Lcom/cleanmaster/junkengine/cleancloud/IKCleanCloudResultReporter$ResultData;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/util/LinkedList;->add(Ljava/lang/Object;)Z

    goto :goto_5
.end method

.method private getRootStateMonitor()Lcom/cm/plugincluster/common/interfaces/root/IRootStateMonitor;
    .registers 2

    .prologue
    .line 47
    invoke-static {}, Lcom/cleanmaster/junk/util/JunkUtils;->getRootStateMonitorImpl()Lcom/cm/plugincluster/common/interfaces/root/IRootStateMonitor;

    move-result-object v0

    return-object v0
.end method

.method private scanPkgPath(Lcom/cleanmaster/junk/bean/RootCacheInfo;Lcom/cleanmaster/junk/scan/IScanTaskController;)V
    .registers 13

    .prologue
    const-wide/16 v8, 0x0

    const/4 v3, 0x6

    const/4 v7, 0x4

    const/4 v6, 0x1

    const/4 v5, 0x0

    .line 118
    if-eqz p2, :cond_f

    invoke-interface {p2}, Lcom/cleanmaster/junk/scan/IScanTaskController;->checkStop()Z

    move-result v0

    if-eqz v0, :cond_f

    .line 161
    :cond_e
    :goto_e
    return-void

    .line 121
    :cond_f
    if-eqz p1, :cond_e

    .line 123
    invoke-virtual {p1}, Lcom/cleanmaster/junk/bean/RootCacheInfo;->getPkgName()Ljava/lang/String;

    move-result-object v0

    const-string v1, "end"

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

    move-result v0

    if-nez v0, :cond_e

    .line 125
    invoke-virtual {p1}, Lcom/cleanmaster/junk/bean/RootCacheInfo;->getPath()Ljava/lang/String;

    move-result-object v0

    .line 126
    invoke-virtual {p1, v3}, Lcom/cleanmaster/junk/bean/RootCacheInfo;->setInfoType(I)V

    .line 127
    invoke-virtual {p1}, Lcom/cleanmaster/junk/bean/RootCacheInfo;->getPathType()I

    move-result v1

    const/4 v2, 0x5

    if-ne v1, v2, :cond_78

    .line 128
    invoke-static {}, Lcom/cm/plugincluster/root/SuExecHostProxy;->getInstance()Lcom/cm/plugincluster/root/ISuExec;

    move-result-object v1

    new-instance v2, Ljava/lang/StringBuilder;

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

    invoke-static {}, Landroid/os/Environment;->getDataDirectory()Ljava/io/File;

    move-result-object v3

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

    move-result-object v2

    const-string v3, "/data/"

    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-virtual {p1}, Lcom/cleanmaster/junk/bean/RootCacheInfo;->getPkgName()Ljava/lang/String;

    move-result-object v3

    invoke-interface {v1, v2, v0, v3}, Lcom/cm/plugincluster/root/ISuExec;->convertRootCacheCleanCloudPath(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

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

    move-result v1

    if-nez v1, :cond_e

    .line 130
    invoke-static {}, Lcom/cm/plugincluster/root/SuExecHostProxy;->getInstance()Lcom/cm/plugincluster/root/ISuExec;

    move-result-object v1

    invoke-interface {v1, v0}, Lcom/cm/plugincluster/root/ISuExec;->getPathFileSize(Ljava/lang/String;)J

    move-result-wide v2

    .line 131
    cmp-long v1, v2, v8

    if-lez v1, :cond_e

    .line 132
    invoke-virtual {p1, v0}, Lcom/cleanmaster/junk/bean/RootCacheInfo;->setPath(Ljava/lang/String;)V

    .line 133
    invoke-virtual {p1, v2, v3}, Lcom/cleanmaster/junk/bean/RootCacheInfo;->setSize(J)V

    .line 134
    invoke-virtual {p1, v6}, Lcom/cleanmaster/junk/bean/RootCacheInfo;->setCheck(Z)V

    .line 135
    sget-object v0, Lcom/cm/plugincluster/junkengine/junk/engine/IJunkRequest$EM_JUNK_DATA_TYPE;->ROOTCACHE:Lcom/cm/plugincluster/junkengine/junk/engine/IJunkRequest$EM_JUNK_DATA_TYPE;

    invoke-virtual {p1, v0}, Lcom/cleanmaster/junk/bean/RootCacheInfo;->setJunkInfoType(Lcom/cm/plugincluster/junkengine/junk/engine/IJunkRequest$EM_JUNK_DATA_TYPE;)V

    .line 136
    iget-object v0, p0, Lcom/cleanmaster/junk/scan/RootCacheScanTask;->mCB:Lcom/cm/plugincluster/softmgr/interfaces/junk/IScanTaskCallback;

    if-eqz v0, :cond_e

    .line 137
    iget-object v0, p0, Lcom/cleanmaster/junk/scan/RootCacheScanTask;->mCB:Lcom/cm/plugincluster/softmgr/interfaces/junk/IScanTaskCallback;

    invoke-interface {v0, v7, v5, v5, p1}, Lcom/cm/plugincluster/softmgr/interfaces/junk/IScanTaskCallback;->callbackMessage(IIILjava/lang/Object;)V

    goto :goto_e

    .line 141
    :cond_78
    invoke-virtual {p1}, Lcom/cleanmaster/junk/bean/RootCacheInfo;->getPathType()I

    move-result v1

    if-ne v1, v3, :cond_e

    .line 142
    invoke-static {}, Lcom/cm/plugincluster/root/SuExecHostProxy;->getInstance()Lcom/cm/plugincluster/root/ISuExec;

    move-result-object v1

    new-instance v2, Ljava/lang/StringBuilder;

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

    invoke-static {}, Landroid/os/Environment;->getDataDirectory()Ljava/io/File;

    move-result-object v3

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

    move-result-object v2

    const-string v3, "/data/"

    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-virtual {p1}, Lcom/cleanmaster/junk/bean/RootCacheInfo;->getPkgName()Ljava/lang/String;

    move-result-object v3

    invoke-interface {v1, v2, v0, v3}, Lcom/cm/plugincluster/root/ISuExec;->convertRootCacheCleanCloudPathREG(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/util/List;

    move-result-object v0

    .line 143
    if-eqz v0, :cond_e

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v1

    if-lez v1, :cond_e

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

    move-result-object v1

    :cond_ad
    :goto_ad
    invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z

    move-result v0

    if-eqz v0, :cond_e

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

    move-result-object v0

    check-cast v0, Ljava/lang/String;

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

    move-result v2

    if-nez v2, :cond_ad

    .line 146
    invoke-static {}, Lcom/cm/plugincluster/root/SuExecHostProxy;->getInstance()Lcom/cm/plugincluster/root/ISuExec;

    move-result-object v2

    invoke-interface {v2, v0}, Lcom/cm/plugincluster/root/ISuExec;->getPathFileSize(Ljava/lang/String;)J

    move-result-wide v2

    .line 147
    cmp-long v4, v2, v8

    if-lez v4, :cond_ad

    .line 148
    invoke-virtual {p1, v0}, Lcom/cleanmaster/junk/bean/RootCacheInfo;->setPath(Ljava/lang/String;)V

    .line 149
    invoke-virtual {p1, v2, v3}, Lcom/cleanmaster/junk/bean/RootCacheInfo;->setSize(J)V

    .line 150
    invoke-virtual {p1, v6}, Lcom/cleanmaster/junk/bean/RootCacheInfo;->setCheck(Z)V

    .line 151
    sget-object v0, Lcom/cm/plugincluster/junkengine/junk/engine/IJunkRequest$EM_JUNK_DATA_TYPE;->ROOTCACHE:Lcom/cm/plugincluster/junkengine/junk/engine/IJunkRequest$EM_JUNK_DATA_TYPE;

    invoke-virtual {p1, v0}, Lcom/cleanmaster/junk/bean/RootCacheInfo;->setJunkInfoType(Lcom/cm/plugincluster/junkengine/junk/engine/IJunkRequest$EM_JUNK_DATA_TYPE;)V

    .line 152
    iget-object v0, p0, Lcom/cleanmaster/junk/scan/RootCacheScanTask;->mCB:Lcom/cm/plugincluster/softmgr/interfaces/junk/IScanTaskCallback;

    if-eqz v0, :cond_ad

    .line 153
    iget-object v0, p0, Lcom/cleanmaster/junk/scan/RootCacheScanTask;->mCB:Lcom/cm/plugincluster/softmgr/interfaces/junk/IScanTaskCallback;

    invoke-interface {v0, v7, v5, v5, p1}, Lcom/cm/plugincluster/softmgr/interfaces/junk/IScanTaskCallback;->callbackMessage(IIILjava/lang/Object;)V

    goto :goto_ad
.end method


# virtual methods
.method public bindRootCacheScanCallback(Lcom/cleanmaster/junk/scan/RootCacheScanTask$RootCacheScanCallback;)V
    .registers 2

    .prologue
    .line 43
    iput-object p1, p0, Lcom/cleanmaster/junk/scan/RootCacheScanTask;->mRootCacheScanCallback:Lcom/cleanmaster/junk/scan/RootCacheScanTask$RootCacheScanCallback;

    .line 44
    return-void
.end method

.method public getTaskDesc()Ljava/lang/String;
    .registers 2

    .prologue
    .line 114
    const-string v0, "RootCacheScanTask"

    return-object v0
.end method

.method public notifySdCacheScanFinish(Z)V
    .registers 4

    .prologue
    .line 164
    iget-object v0, p0, Lcom/cleanmaster/junk/scan/RootCacheScanTask;->rootStateBlockingQueue:Ljava/util/concurrent/BlockingQueue;

    const/4 v1, 0x2

    invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v1

    invoke-interface {v0, v1}, Ljava/util/concurrent/BlockingQueue;->offer(Ljava/lang/Object;)Z

    .line 165
    iput-boolean p1, p0, Lcom/cleanmaster/junk/scan/RootCacheScanTask;->isSdCacheScanFinish:Z

    .line 166
    return-void
.end method

.method public scan(Lcom/cleanmaster/junk/scan/IScanTaskController;)Z
    .registers 8

    .prologue
    const/4 v2, 0x1

    const/4 v5, 0x2

    const/4 v4, 0x0

    const/4 v3, 0x0

    .line 57
    iget-object v0, p0, Lcom/cleanmaster/junk/scan/RootCacheScanTask;->mCB:Lcom/cm/plugincluster/softmgr/interfaces/junk/IScanTaskCallback;

    if-eqz v0, :cond_d

    .line 58
    iget-object v0, p0, Lcom/cleanmaster/junk/scan/RootCacheScanTask;->mCB:Lcom/cm/plugincluster/softmgr/interfaces/junk/IScanTaskCallback;

    invoke-interface {v0, v2, v3, v3, v4}, Lcom/cm/plugincluster/softmgr/interfaces/junk/IScanTaskCallback;->callbackMessage(IIILjava/lang/Object;)V

    .line 61
    :cond_d
    invoke-direct {p0}, Lcom/cleanmaster/junk/scan/RootCacheScanTask;->getRootStateMonitor()Lcom/cm/plugincluster/common/interfaces/root/IRootStateMonitor;

    move-result-object v0

    if-eqz v0, :cond_1c

    .line 62
    invoke-direct {p0}, Lcom/cleanmaster/junk/scan/RootCacheScanTask;->getRootStateMonitor()Lcom/cm/plugincluster/common/interfaces/root/IRootStateMonitor;

    move-result-object v0

    iget-object v1, p0, Lcom/cleanmaster/junk/scan/RootCacheScanTask;->rootStateObserver:Lcom/cm/plugincluster/common/interfaces/root/IOverallRootStateObserver;

    invoke-interface {v0, v1}, Lcom/cm/plugincluster/common/interfaces/root/IRootStateMonitor;->register(Lcom/cm/plugincluster/common/interfaces/root/IOverallRootStateObserver;)V

    .line 66
    :cond_1c
    :try_start_1c
    iget-object v0, p0, Lcom/cleanmaster/junk/scan/RootCacheScanTask;->rootStateBlockingQueue:Ljava/util/concurrent/BlockingQueue;

    invoke-interface {v0}, Ljava/util/concurrent/BlockingQueue;->take()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/lang/Integer;

    invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I

    move-result v0

    .line 68
    if-ne v0, v2, :cond_62

    .line 69
    iget-object v0, p0, Lcom/cleanmaster/junk/scan/RootCacheScanTask;->rootStateBlockingQueue:Ljava/util/concurrent/BlockingQueue;

    invoke-interface {v0}, Ljava/util/concurrent/BlockingQueue;->take()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/lang/Integer;

    invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I

    move-result v0

    .line 70
    invoke-direct {p0}, Lcom/cleanmaster/junk/scan/RootCacheScanTask;->getRootStateMonitor()Lcom/cm/plugincluster/common/interfaces/root/IRootStateMonitor;

    move-result-object v1

    if-eqz v1, :cond_49

    invoke-direct {p0}, Lcom/cleanmaster/junk/scan/RootCacheScanTask;->getRootStateMonitor()Lcom/cm/plugincluster/common/interfaces/root/IRootStateMonitor;

    move-result-object v1

    invoke-interface {v1, v0}, Lcom/cm/plugincluster/common/interfaces/root/IRootStateMonitor;->isStateSuccess(I)Z

    move-result v0

    if-eqz v0, :cond_49

    .line 71
    invoke-direct {p0, p1}, Lcom/cleanmaster/junk/scan/RootCacheScanTask;->doScan(Lcom/cleanmaster/junk/scan/IScanTaskController;)V
    :try_end_49
    .catch Ljava/lang/InterruptedException; {:try_start_1c .. :try_end_49} :catch_76
    .catchall {:try_start_1c .. :try_end_49} :catchall_93

    .line 79
    :cond_49
    :goto_49
    invoke-direct {p0}, Lcom/cleanmaster/junk/scan/RootCacheScanTask;->getRootStateMonitor()Lcom/cm/plugincluster/common/interfaces/root/IRootStateMonitor;

    move-result-object v0

    if-eqz v0, :cond_58

    .line 80
    invoke-direct {p0}, Lcom/cleanmaster/junk/scan/RootCacheScanTask;->getRootStateMonitor()Lcom/cm/plugincluster/common/interfaces/root/IRootStateMonitor;

    move-result-object v0

    iget-object v1, p0, Lcom/cleanmaster/junk/scan/RootCacheScanTask;->rootStateObserver:Lcom/cm/plugincluster/common/interfaces/root/IOverallRootStateObserver;

    invoke-interface {v0, v1}, Lcom/cm/plugincluster/common/interfaces/root/IRootStateMonitor;->unregister(Lcom/cm/plugincluster/common/interfaces/root/IOverallRootStateObserver;)V

    .line 82
    :cond_58
    iget-object v0, p0, Lcom/cleanmaster/junk/scan/RootCacheScanTask;->mCB:Lcom/cm/plugincluster/softmgr/interfaces/junk/IScanTaskCallback;

    if-eqz v0, :cond_61

    .line 83
    iget-object v0, p0, Lcom/cleanmaster/junk/scan/RootCacheScanTask;->mCB:Lcom/cm/plugincluster/softmgr/interfaces/junk/IScanTaskCallback;

    invoke-interface {v0, v5, v3, v3, v4}, Lcom/cm/plugincluster/softmgr/interfaces/junk/IScanTaskCallback;->callbackMessage(IIILjava/lang/Object;)V

    .line 87
    :cond_61
    :goto_61
    return v3

    .line 73
    :cond_62
    :try_start_62
    invoke-direct {p0}, Lcom/cleanmaster/junk/scan/RootCacheScanTask;->getRootStateMonitor()Lcom/cm/plugincluster/common/interfaces/root/IRootStateMonitor;

    move-result-object v1

    if-eqz v1, :cond_49

    invoke-direct {p0}, Lcom/cleanmaster/junk/scan/RootCacheScanTask;->getRootStateMonitor()Lcom/cm/plugincluster/common/interfaces/root/IRootStateMonitor;

    move-result-object v1

    invoke-interface {v1, v0}, Lcom/cm/plugincluster/common/interfaces/root/IRootStateMonitor;->isStateSuccess(I)Z

    move-result v0

    if-eqz v0, :cond_49

    .line 74
    invoke-direct {p0, p1}, Lcom/cleanmaster/junk/scan/RootCacheScanTask;->doScan(Lcom/cleanmaster/junk/scan/IScanTaskController;)V
    :try_end_75
    .catch Ljava/lang/InterruptedException; {:try_start_62 .. :try_end_75} :catch_76
    .catchall {:try_start_62 .. :try_end_75} :catchall_93

    goto :goto_49

    .line 76
    :catch_76
    move-exception v0

    .line 77
    :try_start_77
    invoke-virtual {v0}, Ljava/lang/InterruptedException;->printStackTrace()V
    :try_end_7a
    .catchall {:try_start_77 .. :try_end_7a} :catchall_93

    .line 79
    invoke-direct {p0}, Lcom/cleanmaster/junk/scan/RootCacheScanTask;->getRootStateMonitor()Lcom/cm/plugincluster/common/interfaces/root/IRootStateMonitor;

    move-result-object v0

    if-eqz v0, :cond_89

    .line 80
    invoke-direct {p0}, Lcom/cleanmaster/junk/scan/RootCacheScanTask;->getRootStateMonitor()Lcom/cm/plugincluster/common/interfaces/root/IRootStateMonitor;

    move-result-object v0

    iget-object v1, p0, Lcom/cleanmaster/junk/scan/RootCacheScanTask;->rootStateObserver:Lcom/cm/plugincluster/common/interfaces/root/IOverallRootStateObserver;

    invoke-interface {v0, v1}, Lcom/cm/plugincluster/common/interfaces/root/IRootStateMonitor;->unregister(Lcom/cm/plugincluster/common/interfaces/root/IOverallRootStateObserver;)V

    .line 82
    :cond_89
    iget-object v0, p0, Lcom/cleanmaster/junk/scan/RootCacheScanTask;->mCB:Lcom/cm/plugincluster/softmgr/interfaces/junk/IScanTaskCallback;

    if-eqz v0, :cond_61

    .line 83
    iget-object v0, p0, Lcom/cleanmaster/junk/scan/RootCacheScanTask;->mCB:Lcom/cm/plugincluster/softmgr/interfaces/junk/IScanTaskCallback;

    invoke-interface {v0, v5, v3, v3, v4}, Lcom/cm/plugincluster/softmgr/interfaces/junk/IScanTaskCallback;->callbackMessage(IIILjava/lang/Object;)V

    goto :goto_61

    .line 79
    :catchall_93
    move-exception v0

    invoke-direct {p0}, Lcom/cleanmaster/junk/scan/RootCacheScanTask;->getRootStateMonitor()Lcom/cm/plugincluster/common/interfaces/root/IRootStateMonitor;

    move-result-object v1

    if-eqz v1, :cond_a3

    .line 80
    invoke-direct {p0}, Lcom/cleanmaster/junk/scan/RootCacheScanTask;->getRootStateMonitor()Lcom/cm/plugincluster/common/interfaces/root/IRootStateMonitor;

    move-result-object v1

    iget-object v2, p0, Lcom/cleanmaster/junk/scan/RootCacheScanTask;->rootStateObserver:Lcom/cm/plugincluster/common/interfaces/root/IOverallRootStateObserver;

    invoke-interface {v1, v2}, Lcom/cm/plugincluster/common/interfaces/root/IRootStateMonitor;->unregister(Lcom/cm/plugincluster/common/interfaces/root/IOverallRootStateObserver;)V

    .line 82
    :cond_a3
    iget-object v1, p0, Lcom/cleanmaster/junk/scan/RootCacheScanTask;->mCB:Lcom/cm/plugincluster/softmgr/interfaces/junk/IScanTaskCallback;

    if-eqz v1, :cond_ac

    .line 83
    iget-object v1, p0, Lcom/cleanmaster/junk/scan/RootCacheScanTask;->mCB:Lcom/cm/plugincluster/softmgr/interfaces/junk/IScanTaskCallback;

    invoke-interface {v1, v5, v3, v3, v4}, Lcom/cm/plugincluster/softmgr/interfaces/junk/IScanTaskCallback;->callbackMessage(IIILjava/lang/Object;)V

    :cond_ac
    throw v0
.end method