KeepLiveManagerImpl.smali
.class public Lcom/cleanmaster/daemon/KeepLiveManagerImpl;
.super Ljava/lang/Object;
.source "KeepLiveManagerImpl.java"
# static fields
.field public static final ACCOUNT_TYPE:Ljava/lang/String; = "com.cleanmaster.mguard_cn.account.type"
.field public static final DAEMONE_PROSS_NAME:Ljava/lang/String; = ":daemon"
.field public static final IS_RESIDENT:Ljava/lang/String; = "isResident"
.field public static final NON_RESIDENT_ID:Ljava/lang/String; = "nonResidentId"
.field public static final SERVICE_PROSS_NAME:Ljava/lang/String; = ":service"
.field public static final WORKER_PROSS_NAME:Ljava/lang/String; = ":worker"
# direct methods
.method public constructor <init>()V
.registers 1
.prologue
.line 32
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method public static StopLiveOfAccountManager(Lcom/cleanmaster/daemon/KeepLiveParamBuilder;)V
.registers 3
.prologue
.line 122
const-string v0, "Daemon"
const-string/jumbo v1, "\u4fdd\u6d3b\u65b9\u5f0f:\u8d26\u53f7\u4fdd\u6d3b\u5173\u95ed"
invoke-static {v0, v1}, Lcom/cm/plugincluster/common/proxy/CMLogUtilsProxy;->w(Ljava/lang/String;Ljava/lang/String;)V
.line 123
iget-object v0, p0, Lcom/cleanmaster/daemon/KeepLiveParamBuilder;->context:Landroid/content/Context;
invoke-static {v0}, Lcom/cleanmaster/daemon/KeepLiveManagerImpl;->removeAccount(Landroid/content/Context;)V
.line 124
return-void
.end method
.method public static StopLiveOfJobScheduler(Lcom/cleanmaster/daemon/KeepLiveParamBuilder;)V
.registers 3
.prologue
.line 141
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
const/16 v1, 0x15
if-lt v0, v1, :cond_13
.line 142
const-string v0, "Daemon"
const-string/jumbo v1, "\u4fdd\u6d3b\u65b9\u5f0f:jobScheduler\u4fdd\u6d3b\u5173\u95ed"
invoke-static {v0, v1}, Lcom/cm/plugincluster/common/proxy/CMLogUtilsProxy;->w(Ljava/lang/String;Ljava/lang/String;)V
.line 143
iget-object v0, p0, Lcom/cleanmaster/daemon/KeepLiveParamBuilder;->context:Landroid/content/Context;
invoke-static {v0}, Lcom/cleanmaster/daemon/KeepLiveManagerImpl;->jobSchedulerForStop(Landroid/content/Context;)V
.line 145
:cond_13
return-void
.end method
.method public static StopLiveOfNotificationListenerService(Lcom/cleanmaster/daemon/KeepLiveParamBuilder;)V
.registers 5
.prologue
.line 241
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
const/16 v1, 0x12
if-lt v0, v1, :cond_1c
.line 242
const-string v0, "Daemon"
const-string/jumbo v1, "\u4fdd\u6d3b\u65b9\u5f0f:NotificationListenerService\u4fdd\u6d3b\u5173\u95ed"
invoke-static {v0, v1}, Lcom/cm/plugincluster/common/proxy/CMLogUtilsProxy;->w(Ljava/lang/String;Ljava/lang/String;)V
.line 243
iget-object v0, p0, Lcom/cleanmaster/daemon/KeepLiveParamBuilder;->context:Landroid/content/Context;
new-instance v1, Landroid/content/Intent;
iget-object v2, p0, Lcom/cleanmaster/daemon/KeepLiveParamBuilder;->context:Landroid/content/Context;
const-class v3, Lcom/cleanmaster/daemon/systemService/CMNotificationListenerService;
invoke-direct {v1, v2, v3}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V
invoke-virtual {v0, v1}, Landroid/content/Context;->stopService(Landroid/content/Intent;)Z
.line 245
:cond_1c
return-void
.end method
.method public static StopLiveOfOnePx(Lcom/cleanmaster/daemon/KeepLiveParamBuilder;)V
.registers 3
.prologue
.line 219
const-string v0, "Daemon"
const-string/jumbo v1, "\u4fdd\u6d3b\u65b9\u5f0f:\u4e00\u50cf\u7d20\u4fdd\u6d3b\u5173\u95ed"
invoke-static {v0, v1}, Lcom/cm/plugincluster/common/proxy/CMLogUtilsProxy;->w(Ljava/lang/String;Ljava/lang/String;)V
.line 220
invoke-static {p0}, Lcom/cleanmaster/daemon/onePxForLive/OnepxReceiver;->unregister1pxReceiver(Lcom/cleanmaster/daemon/KeepLiveParamBuilder;)V
.line 221
return-void
.end method
.method private static addAccount(Landroid/content/Context;ILjava/lang/String;)V
.registers 9
.prologue
const/4 v5, 0x0
const/4 v4, 0x1
.line 279
invoke-static {}, Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;->getInstance()Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;
move-result-object v0
invoke-virtual {v0}, Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;->isManualAdditionAccount()Z
move-result v2
.line 280
const-string v0, "account"
invoke-virtual {p0, v0}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/accounts/AccountManager;
.line 282
if-nez v0, :cond_15
.line 312
:cond_14
:goto_14
return-void
.line 286
:cond_15
const-string v1, "com.cleanmaster.mguard_cn.account.type"
invoke-virtual {v0, v1}, Landroid/accounts/AccountManager;->getAccountsByType(Ljava/lang/String;)[Landroid/accounts/Account;
move-result-object v1
.line 287
array-length v3, v1
if-lez v3, :cond_53
.line 288
aget-object v1, v1, v5
.line 289
invoke-static {}, Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;->getInstance()Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;
move-result-object v2
invoke-virtual {v2, v5}, Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;->setNewAdditionAccount(Z)V
.line 297
:cond_27
:goto_27
invoke-static {}, Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;->getInstance()Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;
move-result-object v2
invoke-virtual {v2, v5}, Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;->setManualAdditionAccount(Z)V
.line 302
const/4 v2, 0x0
const/4 v3, 0x0
:try_start_30
invoke-virtual {v0, v1, v2, v3}, Landroid/accounts/AccountManager;->addAccountExplicitly(Landroid/accounts/Account;Ljava/lang/String;Landroid/os/Bundle;)Z
move-result v0
if-eqz v0, :cond_14
.line 304
new-instance v0, Landroid/os/Bundle;
invoke-direct {v0}, Landroid/os/Bundle;-><init>()V
.line 305
const-string v2, "com.cleanmaster.mguard_cn.account.provide"
const/4 v3, 0x1
invoke-static {v1, v2, v3}, Landroid/content/ContentResolver;->setIsSyncable(Landroid/accounts/Account;Ljava/lang/String;I)V
.line 306
const-string v2, "com.cleanmaster.mguard_cn.account.provide"
const/4 v3, 0x1
invoke-static {v1, v2, v3}, Landroid/content/ContentResolver;->setSyncAutomatically(Landroid/accounts/Account;Ljava/lang/String;Z)V
.line 307
const-string v2, "com.cleanmaster.mguard_cn.account.provide"
int-to-long v4, p1
invoke-static {v1, v2, v0, v4, v5}, Landroid/content/ContentResolver;->addPeriodicSync(Landroid/accounts/Account;Ljava/lang/String;Landroid/os/Bundle;J)V
:try_end_4d
.catch Ljava/lang/Exception; {:try_start_30 .. :try_end_4d} :catch_4e
goto :goto_14
.line 309
:catch_4e
move-exception v0
.line 310
invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V
goto :goto_14
.line 291
:cond_53
new-instance v1, Landroid/accounts/Account;
const-string v3, "com.cleanmaster.mguard_cn.account.type"
invoke-direct {v1, p2, v3}, Landroid/accounts/Account;-><init>(Ljava/lang/String;Ljava/lang/String;)V
.line 292
invoke-static {}, Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;->getInstance()Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;
move-result-object v3
invoke-virtual {v3, v4}, Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;->setNewAdditionAccount(Z)V
.line 293
if-eqz v2, :cond_27
.line 294
invoke-static {}, Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;->getInstance()Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;
move-result-object v2
invoke-virtual {v2, v4}, Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;->setManualAdditionAccountSuccess(Z)V
goto :goto_27
.end method
.method public static checkNotificationPermission(Landroid/content/Context;)Z
.registers 2
.prologue
.line 353
invoke-static {p0}, Lcom/cleanmaster/hpsharelib/utils/NotificationServiceUtil;->CheckNotifiServiceValid(Landroid/content/Context;)Z
move-result v0
return v0
.end method
.method private static getGrayServiceIntent(Lcom/cleanmaster/daemon/KeepLiveParamBuilder;)Landroid/content/Intent;
.registers 4
.prologue
.line 175
iget-boolean v0, p0, Lcom/cleanmaster/daemon/KeepLiveParamBuilder;->isResident:Z
if-eqz v0, :cond_15
.line 176
new-instance v0, Landroid/content/Intent;
iget-object v1, p0, Lcom/cleanmaster/daemon/KeepLiveParamBuilder;->context:Landroid/content/Context;
const-class v2, Lcom/cleanmaster/daemon/foreServiceforlive/service/GrayService;
invoke-direct {v0, v1, v2}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V
.line 186
:goto_d
const-string v1, "isResident"
iget-boolean v2, p0, Lcom/cleanmaster/daemon/KeepLiveParamBuilder;->isResident:Z
invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Z)Landroid/content/Intent;
.line 187
:goto_14
return-object v0
.line 178
:cond_15
const-class v0, Lcom/cleanmaster/daemon/foreServiceforlive/service/GrayService;
invoke-virtual {v0}, Ljava/lang/Class;->getName()Ljava/lang/String;
move-result-object v0
.line 179
iget v1, p0, Lcom/cleanmaster/daemon/KeepLiveParamBuilder;->nonResidentId:I
invoke-static {v0, v1}, Lcom/cleanmaster/daemon/KeepLiveManagerImpl;->getNonResidentComName(Ljava/lang/String;I)Ljava/lang/Class;
move-result-object v1
.line 180
if-nez v1, :cond_25
.line 181
const/4 v0, 0x0
goto :goto_14
.line 183
:cond_25
new-instance v0, Landroid/content/Intent;
iget-object v2, p0, Lcom/cleanmaster/daemon/KeepLiveParamBuilder;->context:Landroid/content/Context;
invoke-direct {v0, v2, v1}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V
.line 184
const-string v1, "nonResidentId"
iget v2, p0, Lcom/cleanmaster/daemon/KeepLiveParamBuilder;->nonResidentId:I
invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;I)Landroid/content/Intent;
goto :goto_d
.end method
.method public static getNonResidentComName(Ljava/lang/String;I)Ljava/lang/Class;
.registers 5
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/lang/String;",
"I)",
"Ljava/lang/Class",
"<*>;"
}
.end annotation
.prologue
const/4 v0, 0x0
.line 191
invoke-static {p0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v1
if-eqz v1, :cond_8
.line 203
:goto_7
return-object v0
.line 196
:cond_8
if-gtz p1, :cond_f
.line 197
:try_start_a
invoke-static {p0}, Ljava/lang/Class;->forName(Ljava/lang/String;)Ljava/lang/Class;
move-result-object v0
goto :goto_7
.line 199
:cond_f
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-static {p1}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;
move-result-object v2
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-static {v1}, Ljava/lang/Class;->forName(Ljava/lang/String;)Ljava/lang/Class;
:try_end_27
.catch Ljava/lang/Exception; {:try_start_a .. :try_end_27} :catch_29
move-result-object v0
goto :goto_7
.line 201
:catch_29
move-exception v1
goto :goto_7
.end method
.method public static goNLPermission(Landroid/content/Context;)V
.registers 3
.prologue
.line 343
:try_start_0
new-instance v0, Landroid/content/Intent;
const-string v1, "android.settings.ACTION_NOTIFICATION_LISTENER_SETTINGS"
invoke-direct {v0, v1}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V
.line 344
invoke-virtual {p0, v0}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V
:try_end_a
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_a} :catch_b
.line 348
:goto_a
return-void
.line 345
:catch_b
move-exception v0
.line 346
invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V
goto :goto_a
.end method
.method public static isAvoidRom()Z
.registers 5
.prologue
const/4 v2, 0x0
.line 357
invoke-static {}, Lcom/cleanmaster/daemon/KeepLiveCloudCfgKey;->getAvoidRom()Ljava/lang/String;
move-result-object v0
invoke-static {v0}, Lcom/cleanmaster/daemon/utils/AvoidRomUtils;->parseAvoidRomList(Ljava/lang/String;)Ljava/util/ArrayList;
move-result-object v3
move v1, v2
.line 358
:goto_a
invoke-virtual {v3}, Ljava/util/ArrayList;->size()I
move-result v0
if-ge v1, v0, :cond_33
.line 359
invoke-virtual {v3, v1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
move-result-object v0
check-cast v0, Lcom/cleanmaster/daemon/bean/Rom;
.line 360
invoke-virtual {v0}, Lcom/cleanmaster/daemon/bean/Rom;->getName()Ljava/lang/String;
move-result-object v4
invoke-static {v4}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v4
if-nez v4, :cond_34
.line 361
invoke-virtual {v0}, Lcom/cleanmaster/daemon/bean/Rom;->getName()Ljava/lang/String;
move-result-object v4
invoke-static {v4}, Lcom/cleanmaster/hpsharelib/base/util/system/SystemUtils;->getSystemProperty(Ljava/lang/String;)Ljava/lang/String;
move-result-object v4
.line 362
invoke-virtual {v0}, Lcom/cleanmaster/daemon/bean/Rom;->getValue()Ljava/lang/String;
move-result-object v0
invoke-virtual {v4, v0}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z
move-result v0
if-eqz v0, :cond_34
.line 363
const/4 v2, 0x1
.line 367
:cond_33
return v2
.line 358
:cond_34
add-int/lit8 v0, v1, 0x1
move v1, v0
goto :goto_a
.end method
.method public static isCanOpenMediaPlayer()Z
.registers 3
.prologue
const/4 v0, 0x0
.line 371
invoke-static {}, Lcom/cleanmaster/daemon/KeepLiveCloudCfgKey;->getDaemonValue()I
move-result v1
and-int/lit16 v1, v1, 0x80
const/16 v2, 0x80
if-eq v1, v2, :cond_c
.line 381
:cond_b
:goto_b
return v0
.line 374
:cond_c
invoke-static {}, Lcom/cleanmaster/daemon/KeepLiveCloudCfgKey;->getChargeStatu()Z
move-result v1
if-eqz v1, :cond_b
.line 378
invoke-static {}, Lcom/cleanmaster/daemon/KeepLiveManagerImpl;->isAvoidRom()Z
move-result v1
if-nez v1, :cond_b
.line 381
const/4 v0, 0x1
goto :goto_b
.end method
.method private static jobSchedulerForLive(Landroid/content/Context;I)V
.registers 4
.prologue
.line 331
invoke-static {p0, p1}, Lcom/cleanmaster/daemon/jobScheduler/CMJobService;->scheduleService(Landroid/content/Context;I)V
.line 332
new-instance v0, Landroid/content/Intent;
const-class v1, Lcom/cleanmaster/daemon/jobScheduler/CMJobService;
invoke-direct {v0, p0, v1}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V
invoke-virtual {p0, v0}, Landroid/content/Context;->startService(Landroid/content/Intent;)Landroid/content/ComponentName;
.line 333
return-void
.end method
.method private static jobSchedulerForStop(Landroid/content/Context;)V
.registers 3
.prologue
.line 336
invoke-static {p0}, Lcom/cleanmaster/daemon/jobScheduler/CMJobService;->stopScheduleService(Landroid/content/Context;)V
.line 337
new-instance v0, Landroid/content/Intent;
const-class v1, Lcom/cleanmaster/daemon/jobScheduler/CMJobService;
invoke-direct {v0, p0, v1}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V
invoke-virtual {p0, v0}, Landroid/content/Context;->stopService(Landroid/content/Intent;)Z
.line 338
return-void
.end method
.method public static keepLive(Lcom/cleanmaster/daemon/KeepLiveParamBuilder;)I
.registers 5
.prologue
const/16 v3, 0x20
const/16 v2, 0x10
.line 41
if-eqz p0, :cond_e
const-string v0, "brand_avoid_all"
invoke-static {v0}, Lcom/cleanmaster/daemon/utils/AvoidBrandUtils;->isAvoidBrand(Ljava/lang/String;)Z
move-result v0
if-eqz v0, :cond_18
.line 42
:cond_e
const-string v0, "Daemon"
const-string/jumbo v1, "\u6240\u6709\u4fdd\u6d3b\u65b9\u5f0f\u5728\u5f53\u524d\u624b\u673a\u90fd\u88ab\u5382\u5546\u89c4\u907f\u4e86"
invoke-static {v0, v1}, Lcom/cm/plugincluster/common/proxy/CMLogUtilsProxy;->w(Ljava/lang/String;Ljava/lang/String;)V
.line 43
const/4 v0, 0x0
.line 93
:goto_17
return v0
.line 45
:cond_18
iget-object v0, p0, Lcom/cleanmaster/daemon/KeepLiveParamBuilder;->processName:Ljava/lang/String;
const-string v1, ":service"
invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_46
.line 60
iget v0, p0, Lcom/cleanmaster/daemon/KeepLiveParamBuilder;->keepLiveType:I
and-int/lit8 v0, v0, 0x20
if-ne v0, v3, :cond_3e
.line 61
invoke-static {p0}, Lcom/cleanmaster/daemon/KeepLiveManagerImpl;->keepLiveByGray(Lcom/cleanmaster/daemon/KeepLiveParamBuilder;)V
.line 66
:goto_2b
iget v0, p0, Lcom/cleanmaster/daemon/KeepLiveParamBuilder;->keepLiveType:I
and-int/lit8 v0, v0, 0x10
if-ne v0, v2, :cond_42
.line 67
invoke-static {p0}, Lcom/cleanmaster/daemon/KeepLiveManagerImpl;->keepLiveByOnePx(Lcom/cleanmaster/daemon/KeepLiveParamBuilder;)V
.line 72
:goto_34
iget v0, p0, Lcom/cleanmaster/daemon/KeepLiveParamBuilder;->keepLiveType:I
and-int/lit8 v0, v0, 0x40
const/16 v1, 0x40
if-ne v0, v1, :cond_3c
.line 93
:cond_3c
:goto_3c
const/4 v0, 0x1
goto :goto_17
.line 63
:cond_3e
invoke-static {p0}, Lcom/cleanmaster/daemon/KeepLiveManagerImpl;->stopLiveOfGray(Lcom/cleanmaster/daemon/KeepLiveParamBuilder;)V
goto :goto_2b
.line 69
:cond_42
invoke-static {p0}, Lcom/cleanmaster/daemon/KeepLiveManagerImpl;->StopLiveOfOnePx(Lcom/cleanmaster/daemon/KeepLiveParamBuilder;)V
goto :goto_34
.line 83
:cond_46
iget-boolean v0, p0, Lcom/cleanmaster/daemon/KeepLiveParamBuilder;->isResident:Z
if-nez v0, :cond_3c
.line 84
iget v0, p0, Lcom/cleanmaster/daemon/KeepLiveParamBuilder;->keepLiveType:I
and-int/lit8 v0, v0, 0x20
if-ne v0, v3, :cond_53
.line 85
invoke-static {p0}, Lcom/cleanmaster/daemon/KeepLiveManagerImpl;->keepLiveByGray(Lcom/cleanmaster/daemon/KeepLiveParamBuilder;)V
.line 87
:cond_53
iget v0, p0, Lcom/cleanmaster/daemon/KeepLiveParamBuilder;->keepLiveType:I
and-int/lit8 v0, v0, 0x10
if-ne v0, v2, :cond_3c
.line 88
invoke-static {p0}, Lcom/cleanmaster/daemon/KeepLiveManagerImpl;->keepLiveByOnePx(Lcom/cleanmaster/daemon/KeepLiveParamBuilder;)V
goto :goto_3c
.end method
.method public static keepLiveByAccountManager(Lcom/cleanmaster/daemon/KeepLiveParamBuilder;)V
.registers 4
.prologue
.line 113
const-string v0, "brand_avoid_am"
invoke-static {v0}, Lcom/cleanmaster/daemon/utils/AvoidBrandUtils;->isAvoidBrand(Ljava/lang/String;)Z
move-result v0
if-eqz v0, :cond_11
.line 114
const-string v0, "Daemon"
const-string/jumbo v1, "\u4fdd\u6d3b\u65b9\u5f0f:\u8d26\u53f7\u4fdd\u6d3b\u3010\u5f00\u3011\u88ab\u5382\u5546\u89c4\u907f\u4e86"
invoke-static {v0, v1}, Lcom/cm/plugincluster/common/proxy/CMLogUtilsProxy;->w(Ljava/lang/String;Ljava/lang/String;)V
.line 119
:goto_10
return-void
.line 117
:cond_11
const-string v0, "Daemon"
const-string/jumbo v1, "\u4fdd\u6d3b\u65b9\u5f0f:\u8d26\u53f7\u4fdd\u6d3b\u5f00\u542f"
invoke-static {v0, v1}, Lcom/cm/plugincluster/common/proxy/CMLogUtilsProxy;->w(Ljava/lang/String;Ljava/lang/String;)V
.line 118
iget-object v0, p0, Lcom/cleanmaster/daemon/KeepLiveParamBuilder;->context:Landroid/content/Context;
iget v1, p0, Lcom/cleanmaster/daemon/KeepLiveParamBuilder;->interval:I
iget-object v2, p0, Lcom/cleanmaster/daemon/KeepLiveParamBuilder;->appName:Ljava/lang/String;
invoke-static {v0, v1, v2}, Lcom/cleanmaster/daemon/KeepLiveManagerImpl;->addAccount(Landroid/content/Context;ILjava/lang/String;)V
goto :goto_10
.end method
.method public static keepLiveByGray(Lcom/cleanmaster/daemon/KeepLiveParamBuilder;)V
.registers 4
.prologue
.line 151
invoke-static {p0}, Lcom/cleanmaster/daemon/KeepLiveManagerImpl;->getGrayServiceIntent(Lcom/cleanmaster/daemon/KeepLiveParamBuilder;)Landroid/content/Intent;
move-result-object v0
.line 152
const-string v1, "brand_avoid_gray"
invoke-static {v1}, Lcom/cleanmaster/daemon/utils/AvoidBrandUtils;->isAvoidBrand(Ljava/lang/String;)Z
move-result v1
if-eqz v1, :cond_15
.line 153
const-string v0, "Daemon"
const-string/jumbo v1, "\u4fdd\u6d3b\u65b9\u5f0f:\u7070\u8272\u4fdd\u6d3b\u3010\u5f00\u3011\u88ab\u5382\u5546\u89c4\u907f\u4e86"
invoke-static {v0, v1}, Lcom/cm/plugincluster/common/proxy/CMLogUtilsProxy;->w(Ljava/lang/String;Ljava/lang/String;)V
.line 162
:cond_14
:goto_14
return-void
.line 156
:cond_15
if-eqz v0, :cond_14
.line 159
const-string v1, "Daemon"
const-string/jumbo v2, "\u4fdd\u6d3b\u65b9\u5f0f:\u7070\u8272\u4fdd\u6d3b\u5f00\u542f"
invoke-static {v1, v2}, Lcom/cm/plugincluster/common/proxy/CMLogUtilsProxy;->w(Ljava/lang/String;Ljava/lang/String;)V
.line 160
const-string v1, "Internal"
iget v2, p0, Lcom/cleanmaster/daemon/KeepLiveParamBuilder;->interval:I
invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;I)Landroid/content/Intent;
.line 161
iget-object v1, p0, Lcom/cleanmaster/daemon/KeepLiveParamBuilder;->context:Landroid/content/Context;
invoke-virtual {v1, v0}, Landroid/content/Context;->startService(Landroid/content/Intent;)Landroid/content/ComponentName;
goto :goto_14
.end method
.method public static keepLiveByJobScheduler(Lcom/cleanmaster/daemon/KeepLiveParamBuilder;)V
.registers 3
.prologue
.line 130
const-string v0, "brand_avoid_js"
invoke-static {v0}, Lcom/cleanmaster/daemon/utils/AvoidBrandUtils;->isAvoidBrand(Ljava/lang/String;)Z
move-result v0
if-eqz v0, :cond_11
.line 131
const-string v0, "Daemon"
const-string/jumbo v1, "\u4fdd\u6d3b\u65b9\u5f0f:JobScheduler\u4fdd\u6d3b\u3010\u5f00\u3011\u88ab\u5382\u5546\u89c4\u907f\u4e86"
invoke-static {v0, v1}, Lcom/cm/plugincluster/common/proxy/CMLogUtilsProxy;->w(Ljava/lang/String;Ljava/lang/String;)V
.line 138
:cond_10
:goto_10
return-void
.line 134
:cond_11
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
const/16 v1, 0x15
if-lt v0, v1, :cond_10
.line 135
const-string v0, "Daemon"
const-string/jumbo v1, "\u4fdd\u6d3b\u65b9\u5f0f:jobScheduler\u4fdd\u6d3b\u5f00\u542f"
invoke-static {v0, v1}, Lcom/cm/plugincluster/common/proxy/CMLogUtilsProxy;->w(Ljava/lang/String;Ljava/lang/String;)V
.line 136
iget-object v0, p0, Lcom/cleanmaster/daemon/KeepLiveParamBuilder;->context:Landroid/content/Context;
iget v1, p0, Lcom/cleanmaster/daemon/KeepLiveParamBuilder;->interval:I
invoke-static {v0, v1}, Lcom/cleanmaster/daemon/KeepLiveManagerImpl;->jobSchedulerForLive(Landroid/content/Context;I)V
goto :goto_10
.end method
.method public static keepLiveByMediaPlayer(Lcom/cleanmaster/daemon/KeepLiveParamBuilder;)V
.registers 4
.prologue
.line 251
const-string v0, "brand_avoid_all"
invoke-static {v0}, Lcom/cleanmaster/daemon/utils/AvoidBrandUtils;->isAvoidBrand(Ljava/lang/String;)Z
move-result v0
if-eqz v0, :cond_10
.line 252
const-string v0, "Daemon"
const-string v1, " [MediaPlayer]\u6240\u6709\u4fdd\u6d3b\u65b9\u5f0f\u5728\u5f53\u524d\u624b\u673a\u90fd\u88ab\u5382\u5546\u89c4\u907f\u4e86"
invoke-static {v0, v1}, Lcom/cm/plugincluster/common/proxy/CMLogUtilsProxy;->w(Ljava/lang/String;Ljava/lang/String;)V
.line 265
:cond_f
:goto_f
return-void
.line 255
:cond_10
const-string v0, "brand_avoid_mp"
invoke-static {v0}, Lcom/cleanmaster/daemon/utils/AvoidBrandUtils;->isAvoidBrand(Ljava/lang/String;)Z
move-result v0
if-eqz v0, :cond_21
.line 256
const-string v0, "Daemon"
const-string/jumbo v1, "\u4fdd\u6d3b\u65b9\u5f0f:\u97f3\u4e50\u64ad\u653e\u5668\u4fdd\u6d3b\u3010\u5f00\u3011\u88ab\u5382\u5546\u89c4\u907f\u4e86"
invoke-static {v0, v1}, Lcom/cm/plugincluster/common/proxy/CMLogUtilsProxy;->w(Ljava/lang/String;Ljava/lang/String;)V
goto :goto_f
.line 259
:cond_21
new-instance v0, Landroid/content/Intent;
iget-object v1, p0, Lcom/cleanmaster/daemon/KeepLiveParamBuilder;->context:Landroid/content/Context;
const-class v2, Lcom/cleanmaster/daemon/mediaPlayerForLive/GameResidentService;
invoke-direct {v0, v1, v2}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V
.line 260
if-eqz v0, :cond_f
.line 263
const-string v1, "Daemon"
const-string/jumbo v2, "\u4fdd\u6d3b\u65b9\u5f0f:\u97f3\u4e50\u64ad\u653e\u5668\u4fdd\u6d3b\u5f00\u542f"
invoke-static {v1, v2}, Lcom/cm/plugincluster/common/proxy/CMLogUtilsProxy;->w(Ljava/lang/String;Ljava/lang/String;)V
.line 264
iget-object v1, p0, Lcom/cleanmaster/daemon/KeepLiveParamBuilder;->context:Landroid/content/Context;
invoke-virtual {v1, v0}, Landroid/content/Context;->startService(Landroid/content/Intent;)Landroid/content/ComponentName;
goto :goto_f
.end method
.method public static keepLiveByNotificationListenerService(Lcom/cleanmaster/daemon/KeepLiveParamBuilder;)V
.registers 5
.prologue
.line 227
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
const/16 v1, 0x12
if-lt v0, v1, :cond_16
.line 228
const-string v0, "brand_avoid_notification"
invoke-static {v0}, Lcom/cleanmaster/daemon/utils/AvoidBrandUtils;->isAvoidBrand(Ljava/lang/String;)Z
move-result v0
if-eqz v0, :cond_17
.line 229
const-string v0, "Daemon"
const-string/jumbo v1, "\u4fdd\u6d3b\u65b9\u5f0f:NotificationListenerService\u4fdd\u6d3b\u3010\u5f00\u3011\u88ab\u5382\u5546\u89c4\u907f\u4e86"
invoke-static {v0, v1}, Lcom/cm/plugincluster/common/proxy/CMLogUtilsProxy;->w(Ljava/lang/String;Ljava/lang/String;)V
.line 238
:cond_16
:goto_16
return-void
.line 232
:cond_17
iget-object v0, p0, Lcom/cleanmaster/daemon/KeepLiveParamBuilder;->context:Landroid/content/Context;
invoke-static {v0}, Lcom/cleanmaster/daemon/KeepLiveManagerImpl;->checkNotificationPermission(Landroid/content/Context;)Z
move-result v0
if-nez v0, :cond_24
.line 233
iget-object v0, p0, Lcom/cleanmaster/daemon/KeepLiveParamBuilder;->context:Landroid/content/Context;
invoke-static {v0}, Lcom/cleanmaster/daemon/KeepLiveManagerImpl;->goNLPermission(Landroid/content/Context;)V
.line 235
:cond_24
const-string v0, "Daemon"
const-string/jumbo v1, "\u4fdd\u6d3b\u65b9\u5f0f:NotificationListenerService\u4fdd\u6d3b\u5f00\u542f"
invoke-static {v0, v1}, Lcom/cm/plugincluster/common/proxy/CMLogUtilsProxy;->w(Ljava/lang/String;Ljava/lang/String;)V
.line 236
iget-object v0, p0, Lcom/cleanmaster/daemon/KeepLiveParamBuilder;->context:Landroid/content/Context;
new-instance v1, Landroid/content/Intent;
iget-object v2, p0, Lcom/cleanmaster/daemon/KeepLiveParamBuilder;->context:Landroid/content/Context;
const-class v3, Lcom/cleanmaster/daemon/systemService/CMNotificationListenerService;
invoke-direct {v1, v2, v3}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V
invoke-virtual {v0, v1}, Landroid/content/Context;->startService(Landroid/content/Intent;)Landroid/content/ComponentName;
goto :goto_16
.end method
.method public static keepLiveByOnePx(Lcom/cleanmaster/daemon/KeepLiveParamBuilder;)V
.registers 3
.prologue
.line 210
const-string v0, "brand_avoid_activity"
invoke-static {v0}, Lcom/cleanmaster/daemon/utils/AvoidBrandUtils;->isAvoidBrand(Ljava/lang/String;)Z
move-result v0
if-eqz v0, :cond_11
.line 211
const-string v0, "Daemon"
const-string/jumbo v1, "\u4fdd\u6d3b\u65b9\u5f0f:\u4e00\u50cf\u7d20\u4fdd\u6d3b\u3010\u5f00\u3011\u88ab\u5382\u5546\u89c4\u907f\u4e86"
invoke-static {v0, v1}, Lcom/cm/plugincluster/common/proxy/CMLogUtilsProxy;->w(Ljava/lang/String;Ljava/lang/String;)V
.line 216
:goto_10
return-void
.line 214
:cond_11
const-string v0, "Daemon"
const-string/jumbo v1, "\u4fdd\u6d3b\u65b9\u5f0f:\u4e00\u50cf\u7d20\u4fdd\u6d3b\u5f00\u542f"
invoke-static {v0, v1}, Lcom/cm/plugincluster/common/proxy/CMLogUtilsProxy;->w(Ljava/lang/String;Ljava/lang/String;)V
.line 215
invoke-static {p0}, Lcom/cleanmaster/daemon/onePxForLive/OnepxReceiver;->register1pxReceiver(Lcom/cleanmaster/daemon/KeepLiveParamBuilder;)V
goto :goto_10
.end method
.method private static removeAccount(Landroid/content/Context;)V
.registers 7
.prologue
.line 315
const-string v0, "account"
invoke-virtual {p0, v0}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/accounts/AccountManager;
.line 316
if-nez v0, :cond_b
.line 328
:cond_a
:goto_a
return-void
.line 320
:cond_b
:try_start_b
invoke-virtual {v0}, Landroid/accounts/AccountManager;->getAccounts()[Landroid/accounts/Account;
move-result-object v2
.line 321
const/4 v1, 0x0
:goto_10
array-length v3, v2
if-ge v1, v3, :cond_a
.line 322
aget-object v3, v2, v1
iget-object v3, v3, Landroid/accounts/Account;->type:Ljava/lang/String;
invoke-virtual {v3}, Ljava/lang/String;->intern()Ljava/lang/String;
move-result-object v3
const-string v4, "com.cleanmaster.mguard_cn.account.type"
if-ne v3, v4, :cond_26
.line 323
aget-object v3, v2, v1
const/4 v4, 0x0
const/4 v5, 0x0
invoke-virtual {v0, v3, v4, v5}, Landroid/accounts/AccountManager;->removeAccount(Landroid/accounts/Account;Landroid/accounts/AccountManagerCallback;Landroid/os/Handler;)Landroid/accounts/AccountManagerFuture;
:try_end_26
.catch Ljava/lang/Exception; {:try_start_b .. :try_end_26} :catch_29
.line 321
:cond_26
add-int/lit8 v1, v1, 0x1
goto :goto_10
.line 325
:catch_29
move-exception v0
.line 326
invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V
goto :goto_a
.end method
.method public static stopKeepLive(Lcom/cleanmaster/daemon/KeepLiveParamBuilder;)I
.registers 3
.prologue
.line 97
iget-boolean v0, p0, Lcom/cleanmaster/daemon/KeepLiveParamBuilder;->isResident:Z
if-eqz v0, :cond_6
.line 98
const/4 v0, 0x0
.line 106
:goto_5
return v0
.line 100
:cond_6
iget v0, p0, Lcom/cleanmaster/daemon/KeepLiveParamBuilder;->keepLiveType:I
and-int/lit8 v0, v0, 0x20
const/16 v1, 0x20
if-ne v0, v1, :cond_11
.line 101
invoke-static {p0}, Lcom/cleanmaster/daemon/KeepLiveManagerImpl;->stopLiveOfGray(Lcom/cleanmaster/daemon/KeepLiveParamBuilder;)V
.line 103
:cond_11
iget v0, p0, Lcom/cleanmaster/daemon/KeepLiveParamBuilder;->keepLiveType:I
and-int/lit8 v0, v0, 0x10
const/16 v1, 0x10
if-ne v0, v1, :cond_1c
.line 104
invoke-static {p0}, Lcom/cleanmaster/daemon/KeepLiveManagerImpl;->StopLiveOfOnePx(Lcom/cleanmaster/daemon/KeepLiveParamBuilder;)V
.line 106
:cond_1c
const/4 v0, 0x1
goto :goto_5
.end method
.method public static stopLiveOfGray(Lcom/cleanmaster/daemon/KeepLiveParamBuilder;)V
.registers 4
.prologue
.line 165
invoke-static {p0}, Lcom/cleanmaster/daemon/KeepLiveManagerImpl;->getGrayServiceIntent(Lcom/cleanmaster/daemon/KeepLiveParamBuilder;)Landroid/content/Intent;
move-result-object v0
.line 166
if-nez v0, :cond_7
.line 171
:goto_6
return-void
.line 169
:cond_7
const-string v1, "Daemon"
const-string/jumbo v2, "\u4fdd\u6d3b\u65b9\u5f0f:\u7070\u8272\u4fdd\u6d3b\u5173\u95ed"
invoke-static {v1, v2}, Lcom/cm/plugincluster/common/proxy/CMLogUtilsProxy;->w(Ljava/lang/String;Ljava/lang/String;)V
.line 170
iget-object v1, p0, Lcom/cleanmaster/daemon/KeepLiveParamBuilder;->context:Landroid/content/Context;
invoke-virtual {v1, v0}, Landroid/content/Context;->stopService(Landroid/content/Intent;)Z
goto :goto_6
.end method
.method public static stopLiveOfMediaPlayer(Lcom/cleanmaster/daemon/KeepLiveParamBuilder;)V
.registers 4
.prologue
.line 268
new-instance v0, Landroid/content/Intent;
iget-object v1, p0, Lcom/cleanmaster/daemon/KeepLiveParamBuilder;->context:Landroid/content/Context;
const-class v2, Lcom/cleanmaster/daemon/mediaPlayerForLive/GameResidentService;
invoke-direct {v0, v1, v2}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V
.line 269
if-nez v0, :cond_c
.line 274
:goto_b
return-void
.line 272
:cond_c
const-string v1, "Daemon"
const-string/jumbo v2, "\u4fdd\u6d3b\u65b9\u5f0f:\u97f3\u4e50\u64ad\u653e\u5668\u4fdd\u6d3b\u5173\u95ed"
invoke-static {v1, v2}, Lcom/cm/plugincluster/common/proxy/CMLogUtilsProxy;->w(Ljava/lang/String;Ljava/lang/String;)V
.line 273
iget-object v1, p0, Lcom/cleanmaster/daemon/KeepLiveParamBuilder;->context:Landroid/content/Context;
invoke-virtual {v1, v0}, Landroid/content/Context;->stopService(Landroid/content/Intent;)Z
goto :goto_b
.end method