ProcessHelper.smali
.class public Lcom/cleanmaster/hpsharelib/boost/boostengine/process/ProcessHelper;
.super Ljava/lang/Object;
.source "ProcessHelper.java"
# static fields
.field private static final CLEAN_PROTECT_DURATION:I = 0x13880
.field private static final RESCAN_DURATION:I = 0x13880
# direct methods
.method public constructor <init>()V
.registers 1
.prologue
.line 21
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method private static getLastCleanPkgNameList(Lcom/cleanmaster/hpsharelib/boost/boostengine/process/ProcessResult;)Ljava/util/List;
.registers 5
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lcom/cleanmaster/hpsharelib/boost/boostengine/process/ProcessResult;",
")",
"Ljava/util/List",
"<",
"Ljava/lang/String;",
">;"
}
.end annotation
.prologue
.line 62
if-nez p0, :cond_4
.line 63
const/4 v0, 0x0
.line 81
:goto_3
return-object v0
.line 66
:cond_4
new-instance v1, Ljava/util/ArrayList;
invoke-direct {v1}, Ljava/util/ArrayList;-><init>()V
.line 68
invoke-virtual {p0}, Lcom/cleanmaster/hpsharelib/boost/boostengine/process/ProcessResult;->getData()Ljava/util/List;
move-result-object v0
.line 69
if-eqz v0, :cond_3f
.line 70
invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;
move-result-object v2
:cond_13
:goto_13
invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z
move-result v0
if-eqz v0, :cond_3f
invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v0
check-cast v0, Lcom/cleanmaster/hpsharelib/boost/process/IProcessModel;
.line 71
if-eqz v0, :cond_13
.line 72
invoke-interface {v0}, Lcom/cleanmaster/hpsharelib/boost/process/IProcessModel;->getIsHide()Z
move-result v3
if-nez v3, :cond_13
.line 73
invoke-interface {v0}, Lcom/cleanmaster/hpsharelib/boost/process/IProcessModel;->isChecked()Z
move-result v3
if-eqz v3, :cond_13
.line 74
invoke-interface {v0}, Lcom/cleanmaster/hpsharelib/boost/process/IProcessModel;->getPkgName()Ljava/lang/String;
move-result-object v3
invoke-static {v3}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v3
if-nez v3, :cond_13
.line 76
invoke-interface {v0}, Lcom/cleanmaster/hpsharelib/boost/process/IProcessModel;->getPkgName()Ljava/lang/String;
move-result-object v0
invoke-interface {v1, v0}, Ljava/util/List;->add(Ljava/lang/Object;)Z
goto :goto_13
:cond_3f
move-object v0, v1
.line 81
goto :goto_3
.end method
.method public static isCleanProtect(I)Z
.registers 8
.prologue
const-wide/16 v0, 0x0
.line 103
invoke-static {}, Lcom/cleanmaster/hpsharelib/base/util/HostHelper;->getAppContext()Landroid/content/Context;
.line 105
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
move-result-wide v4
.line 107
sget v2, Lcom/cleanmaster/hpsharelib/boost/boostengine/BoostEngine;->BOOST_TASK_MEM:I
if-ne p0, v2, :cond_23
.line 108
invoke-static {}, Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManagerExt;->getBoostLastCleanTime()J
move-result-wide v2
.line 114
:goto_11
cmp-long v6, v4, v2
if-gez v6, :cond_2e
.line 115
invoke-static {p0}, Lcom/cleanmaster/hpsharelib/boost/boostengine/process/ProcessHelper;->resetLastScanCleanTime(I)V
.line 126
:goto_18
sub-long v0, v4, v0
const-wide/32 v2, 0x13880
cmp-long v0, v0, v2
if-gez v0, :cond_2c
const/4 v0, 0x1
:goto_22
return v0
.line 109
:cond_23
sget v2, Lcom/cleanmaster/hpsharelib/boost/boostengine/BoostEngine;->BOOST_TASK_POWER_SAVE:I
if-ne p0, v2, :cond_30
.line 110
invoke-static {}, Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManagerExt;->getPowerLastCleanTime()J
move-result-wide v2
goto :goto_11
.line 126
:cond_2c
const/4 v0, 0x0
goto :goto_22
:cond_2e
move-wide v0, v2
goto :goto_18
:cond_30
move-wide v2, v0
goto :goto_11
.end method
.method public static isHasProcessToClean()Z
.registers 3
.prologue
const/4 v1, 0x1
.line 228
sget v0, Lcom/cleanmaster/hpsharelib/boost/boostengine/BoostEngine;->BOOST_TASK_MEM:I
invoke-static {v0}, Lcom/cleanmaster/hpsharelib/boost/boostengine/process/ProcessHelper;->isScanDataVaild(I)Z
move-result v0
if-eqz v0, :cond_41
.line 230
invoke-static {}, Lcom/cleanmaster/hpsharelib/boost/boostengine/data/BoostDataManager;->getInstance()Lcom/cleanmaster/hpsharelib/boost/boostengine/data/BoostDataManager;
move-result-object v0
sget v2, Lcom/cleanmaster/hpsharelib/boost/boostengine/BoostEngine;->BOOST_TASK_MEM:I
invoke-virtual {v0, v2}, Lcom/cleanmaster/hpsharelib/boost/boostengine/data/BoostDataManager;->getResult(I)Lcom/cleanmaster/hpsharelib/boost/boostengine/data/BoostResult;
move-result-object v0
.line 231
if-eqz v0, :cond_43
instance-of v2, v0, Lcom/cleanmaster/hpsharelib/boost/boostengine/process/ProcessResult;
if-eqz v2, :cond_43
.line 232
check-cast v0, Lcom/cleanmaster/hpsharelib/boost/boostengine/process/ProcessResult;
.line 233
invoke-virtual {v0}, Lcom/cleanmaster/hpsharelib/boost/boostengine/process/ProcessResult;->getData()Ljava/util/List;
move-result-object v0
.line 234
if-eqz v0, :cond_43
invoke-interface {v0}, Ljava/util/List;->size()I
move-result v2
if-lez v2, :cond_43
.line 235
invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;
move-result-object v2
:cond_2b
invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z
move-result v0
if-eqz v0, :cond_43
invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v0
check-cast v0, Lcom/cleanmaster/hpsharelib/boost/process/IProcessModel;
.line 236
if-eqz v0, :cond_2b
invoke-interface {v0}, Lcom/cleanmaster/hpsharelib/boost/process/IProcessModel;->isChecked()Z
move-result v0
if-eqz v0, :cond_2b
move v0, v1
.line 247
:goto_40
return v0
:cond_41
move v0, v1
.line 245
goto :goto_40
.line 247
:cond_43
const/4 v0, 0x0
goto :goto_40
.end method
.method public static isProcessInCache(I)Z
.registers 13
.prologue
const-wide/32 v8, 0x13880
const-wide/16 v2, 0x0
const/4 v1, 0x1
const/4 v0, 0x0
.line 203
invoke-static {}, Lcom/cleanmaster/hpsharelib/base/util/HostHelper;->getAppContext()Landroid/content/Context;
.line 204
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
move-result-wide v6
.line 208
sget v4, Lcom/cleanmaster/hpsharelib/boost/boostengine/BoostEngine;->BOOST_TASK_MEM:I
if-ne p0, v4, :cond_31
.line 209
invoke-static {}, Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManagerExt;->getBoostLastScanTime()J
move-result-wide v4
.line 210
invoke-static {}, Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManagerExt;->getBoostLastCleanTime()J
move-result-wide v2
move-wide v10, v2
move-wide v2, v4
move-wide v4, v10
.line 216
:goto_1d
sub-long v2, v6, v2
cmp-long v2, v2, v8
if-gez v2, :cond_41
move v3, v1
.line 217
:goto_24
sub-long v4, v6, v4
cmp-long v2, v4, v8
if-gez v2, :cond_43
move v2, v1
.line 219
:goto_2b
if-nez v3, :cond_2f
if-eqz v2, :cond_30
:cond_2f
move v0, v1
:cond_30
return v0
.line 211
:cond_31
sget v4, Lcom/cleanmaster/hpsharelib/boost/boostengine/BoostEngine;->BOOST_TASK_POWER_SAVE:I
if-ne p0, v4, :cond_45
.line 213
invoke-static {}, Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManagerExt;->getPowerLastScanTime()J
move-result-wide v4
.line 214
invoke-static {}, Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManagerExt;->getBoostLastCleanTime()J
move-result-wide v2
move-wide v10, v2
move-wide v2, v4
move-wide v4, v10
goto :goto_1d
:cond_41
move v3, v0
.line 216
goto :goto_24
:cond_43
move v2, v0
.line 217
goto :goto_2b
:cond_45
move-wide v4, v2
goto :goto_1d
.end method
.method public static isScanDataVaild(I)Z
.registers 13
.prologue
const-wide/32 v10, 0x13880
const/4 v1, 0x1
const-wide/16 v4, 0x0
const/4 v0, 0x0
.line 149
invoke-static {}, Lcom/cleanmaster/hpsharelib/base/util/HostHelper;->getAppContext()Landroid/content/Context;
.line 152
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
move-result-wide v6
.line 153
sget v2, Lcom/cleanmaster/hpsharelib/boost/boostengine/BoostEngine;->BOOST_TASK_MEM:I
if-ne p0, v2, :cond_34
.line 154
invoke-static {}, Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManagerExt;->getBoostLastScanTime()J
move-result-wide v2
.line 157
cmp-long v8, v6, v2
if-gez v8, :cond_1e
.line 158
invoke-static {p0}, Lcom/cleanmaster/hpsharelib/boost/boostengine/process/ProcessHelper;->resetLastScanCleanTime(I)V
move-wide v2, v4
.line 165
:cond_1e
sub-long/2addr v6, v2
cmp-long v6, v6, v10
if-gez v6, :cond_32
.line 166
:goto_23
if-eqz v1, :cond_57
.line 168
invoke-static {}, Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManagerExt;->getBoostLastCleanTime()J
move-result-wide v6
.line 169
cmp-long v4, v6, v4
if-eqz v4, :cond_57
cmp-long v2, v6, v2
if-lez v2, :cond_57
.line 199
:cond_31
:goto_31
return v0
:cond_32
move v1, v0
.line 165
goto :goto_23
.line 174
:cond_34
sget v2, Lcom/cleanmaster/hpsharelib/boost/boostengine/BoostEngine;->BOOST_TASK_POWER_SAVE:I
if-ne p0, v2, :cond_31
.line 175
invoke-static {}, Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManagerExt;->getPowerLastScanTime()J
move-result-wide v2
.line 178
cmp-long v8, v6, v2
if-gez v8, :cond_44
.line 179
invoke-static {p0}, Lcom/cleanmaster/hpsharelib/boost/boostengine/process/ProcessHelper;->resetLastScanCleanTime(I)V
move-wide v2, v4
.line 186
:cond_44
sub-long/2addr v6, v2
cmp-long v6, v6, v10
if-gez v6, :cond_59
.line 187
:goto_49
if-eqz v1, :cond_57
.line 189
invoke-static {}, Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManagerExt;->getPowerLastCleanTime()J
move-result-wide v6
.line 190
cmp-long v4, v6, v4
if-eqz v4, :cond_57
cmp-long v2, v6, v2
if-gtz v2, :cond_31
:cond_57
move v0, v1
goto :goto_31
:cond_59
move v1, v0
.line 186
goto :goto_49
.end method
.method public static postCleanHandler(Lcom/cleanmaster/hpsharelib/boost/boostengine/process/ProcessResult;)V
.registers 7
.prologue
.line 26
invoke-static {}, Lcom/cleanmaster/hpsharelib/base/util/HostHelper;->getAppContext()Landroid/content/Context;
.line 28
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
move-result-wide v0
.line 30
if-eqz p0, :cond_11
invoke-virtual {p0}, Lcom/cleanmaster/hpsharelib/boost/boostengine/process/ProcessResult;->getScanTaskType()I
move-result v2
sget v3, Lcom/cleanmaster/hpsharelib/boost/boostengine/BoostEngine;->BOOST_TASK_MEM:I
if-ne v2, v3, :cond_46
.line 32
:cond_11
invoke-static {v0, v1}, Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManagerExt;->setBoostLastCleanTime(J)V
.line 34
if-eqz p0, :cond_2f
.line 35
iget-wide v2, p0, Lcom/cleanmaster/hpsharelib/boost/boostengine/process/ProcessResult;->mTotalAvailMem:J
invoke-static {v2, v3}, Lcom/cleanmaster/hpsharelib/base/util/system/MemoryInfo;->newInstance(J)Lcom/cleanmaster/hpsharelib/base/util/system/MemoryInfo;
move-result-object v2
.line 37
const-wide/32 v4, 0x13880
add-long/2addr v0, v4
.line 38
iget-wide v4, v2, Lcom/cleanmaster/hpsharelib/base/util/system/MemoryInfo;->usedSize:J
invoke-static {v4, v5, v0, v1}, Lcom/cleanmaster/hpsharelib/boost/process/util/ProcessNotifierUtil;->notifyWidgetFlush(JJ)V
.line 39
invoke-virtual {v2}, Lcom/cleanmaster/hpsharelib/base/util/system/MemoryInfo;->getPercent()I
move-result v2
invoke-static {v2, v0, v1}, Lcom/cleanmaster/hpsharelib/boost/process/util/ProcessNotifierUtil;->notifyFloatFlush(IJ)V
.line 40
invoke-static {}, Lcom/cleanmaster/hpsharelib/boost/process/util/ProcessNotifierUtil;->notifyNotificationMemoryFlush()V
.line 43
:cond_2f
if-eqz p0, :cond_45
invoke-virtual {p0}, Lcom/cleanmaster/hpsharelib/boost/boostengine/process/ProcessResult;->getScanTaskType()I
move-result v0
sget v1, Lcom/cleanmaster/hpsharelib/boost/boostengine/BoostEngine;->BOOST_TASK_MEM:I
if-ne v0, v1, :cond_45
.line 44
invoke-static {}, Lcom/cleanmaster/hpsharelib/boost/process/util/MemoryLastCleanHelper;->getInst()Lcom/cleanmaster/hpsharelib/boost/process/util/MemoryLastCleanHelper;
move-result-object v0
.line 45
invoke-static {p0}, Lcom/cleanmaster/hpsharelib/boost/boostengine/process/ProcessHelper;->getLastCleanPkgNameList(Lcom/cleanmaster/hpsharelib/boost/boostengine/process/ProcessResult;)Ljava/util/List;
move-result-object v1
const/4 v2, 0x0
.line 44
invoke-virtual {v0, v1, v2}, Lcom/cleanmaster/hpsharelib/boost/process/util/MemoryLastCleanHelper;->updateLastCleanList(Ljava/util/List;Z)V
.line 59
:cond_45
:goto_45
return-void
.line 48
:cond_46
if-eqz p0, :cond_45
invoke-virtual {p0}, Lcom/cleanmaster/hpsharelib/boost/boostengine/process/ProcessResult;->getScanTaskType()I
move-result v2
sget v3, Lcom/cleanmaster/hpsharelib/boost/boostengine/BoostEngine;->BOOST_TASK_POWER_SAVE:I
if-ne v2, v3, :cond_45
.line 50
invoke-static {v0, v1}, Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManagerExt;->setPowertLastCleanTime(J)V
.line 52
invoke-static {}, Lcom/cleanmaster/hpsharelib/boost/process/util/MemoryLastCleanHelper;->getInst()Lcom/cleanmaster/hpsharelib/boost/process/util/MemoryLastCleanHelper;
move-result-object v0
.line 53
invoke-static {p0}, Lcom/cleanmaster/hpsharelib/boost/boostengine/process/ProcessHelper;->getLastCleanPkgNameList(Lcom/cleanmaster/hpsharelib/boost/boostengine/process/ProcessResult;)Ljava/util/List;
move-result-object v1
const/4 v2, 0x1
.line 52
invoke-virtual {v0, v1, v2}, Lcom/cleanmaster/hpsharelib/boost/process/util/MemoryLastCleanHelper;->updateLastCleanList(Ljava/util/List;Z)V
goto :goto_45
.end method
.method public static resetLastScanCleanTime(I)V
.registers 5
.prologue
const-wide/16 v2, 0x0
.line 85
invoke-static {}, Lcom/cleanmaster/hpsharelib/base/util/HostHelper;->getAppContext()Landroid/content/Context;
.line 87
sget v0, Lcom/cleanmaster/hpsharelib/boost/boostengine/BoostEngine;->BOOST_TASK_MEM:I
if-ne p0, v0, :cond_10
.line 89
invoke-static {v2, v3}, Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManagerExt;->setBoostLastCleanTime(J)V
.line 90
invoke-static {v2, v3}, Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManagerExt;->setBoostLastScanTime(J)V
.line 100
:cond_f
:goto_f
return-void
.line 92
:cond_10
sget v0, Lcom/cleanmaster/hpsharelib/boost/boostengine/BoostEngine;->BOOST_TASK_POWER_SAVE:I
if-ne p0, v0, :cond_f
.line 94
invoke-static {v2, v3}, Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManagerExt;->setPowertLastCleanTime(J)V
.line 95
invoke-static {v2, v3}, Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManagerExt;->setPowertLastScanTime(J)V
goto :goto_f
.end method
.method public static updateLastScanTime(I)V
.registers 4
.prologue
.line 130
invoke-static {}, Lcom/cleanmaster/hpsharelib/base/util/HostHelper;->getAppContext()Landroid/content/Context;
.line 132
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
move-result-wide v0
.line 134
sget v2, Lcom/cleanmaster/hpsharelib/boost/boostengine/BoostEngine;->BOOST_TASK_MEM:I
if-ne p0, v2, :cond_f
.line 136
invoke-static {v0, v1}, Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManagerExt;->setBoostLastScanTime(J)V
.line 146
:cond_e
:goto_e
return-void
.line 138
:cond_f
sget v2, Lcom/cleanmaster/hpsharelib/boost/boostengine/BoostEngine;->BOOST_TASK_POWER_SAVE:I
if-ne p0, v2, :cond_e
.line 140
invoke-static {v0, v1}, Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManagerExt;->setPowertLastScanTime(J)V
goto :goto_e
.end method