g.smali
.class public Lcom/cleanmaster/kuaishou/ad/util/g;
.super Ljava/lang/Object;
.source "KsShortcutUtil.java"
# direct methods
.method public static a(Landroid/content/Context;I)V
.registers 10
.prologue
.line 25
invoke-static {p0}, Lcom/cleanmaster/kuaishou/ad/util/g;->a(Landroid/content/Context;)Z
move-result v0
if-eqz v0, :cond_7
.line 48
:cond_6
:goto_6
return-void
.line 28
:cond_7
invoke-static {}, Lcom/cleanmaster/hpsharelib/kuaishou/cloud/KsCloudUtils;->getShortCutDialogSwitch()Z
move-result v0
if-eqz v0, :cond_6
.line 31
invoke-static {}, Lcom/cleanmaster/hpsharelib/utils/VipHelper;->isShieldksVideo()Z
move-result v0
if-eqz v0, :cond_19
invoke-static {}, Lcom/cleanmaster/hpsharelib/utils/VipHelper;->isVip()Z
move-result v0
if-nez v0, :cond_6
.line 34
:cond_19
invoke-static {}, Lcom/cleanmaster/hpsharelib/kuaishou/cloud/KsCloudUtils;->getShortcutDialogTime()I
move-result v0
.line 35
invoke-static {}, Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;->getInstance()Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;
move-result-object v1
const-string v2, "ks_shoutcut_dialog_time"
const/4 v3, 0x0
invoke-virtual {v1, v2, v3}, Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;->getIntValue(Ljava/lang/String;I)I
move-result v1
.line 36
if-ge v1, v0, :cond_6
.line 39
invoke-static {}, Lcom/cleanmaster/hpsharelib/kuaishou/cloud/KsCloudUtils;->getShortCutDialogInterval()I
move-result v0
.line 40
invoke-static {}, Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;->getInstance()Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;
move-result-object v2
const-string v3, "ks_shortcut_dialog_last_show"
const-wide/16 v4, 0x0
invoke-virtual {v2, v3, v4, v5}, Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;->getLongValue(Ljava/lang/String;J)J
move-result-wide v2
.line 41
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
move-result-wide v4
.line 42
sub-long v2, v4, v2
const v6, 0x36ee80
mul-int/2addr v0, v6
int-to-long v6, v0
cmp-long v0, v2, v6
if-ltz v0, :cond_6
.line 45
invoke-static {p0, p1}, Lcom/cleanmaster/kuaishou/ad/widget/KsShortCutActivity;->a(Landroid/content/Context;I)V
.line 46
invoke-static {}, Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;->getInstance()Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;
move-result-object v0
const-string v2, "ks_shoutcut_dialog_time"
add-int/lit8 v1, v1, 0x1
invoke-virtual {v0, v2, v1}, Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;->setIntValue(Ljava/lang/String;I)V
.line 47
invoke-static {}, Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;->getInstance()Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;
move-result-object v0
const-string v1, "ks_shortcut_dialog_last_show"
invoke-virtual {v0, v1, v4, v5}, Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;->setLongValue(Ljava/lang/String;J)V
goto :goto_6
.end method
.method private static a()Z
.registers 3
.prologue
.line 67
invoke-static {}, Lcom/cleanmaster/hpsharelib/base/util/system/LauncherUtil;->getInst()Lcom/cleanmaster/hpsharelib/base/util/system/LauncherUtil;
move-result-object v0
const/4 v1, 0x0
invoke-virtual {v0, v1}, Lcom/cleanmaster/hpsharelib/base/util/system/LauncherUtil;->getCurrentLauncherName(Z)Ljava/lang/String;
move-result-object v0
.line 68
invoke-static {}, Lcom/cleanmaster/hpsharelib/base/util/system/LauncherUtil;->getInst()Lcom/cleanmaster/hpsharelib/base/util/system/LauncherUtil;
move-result-object v1
const-class v2, Lcom/cleanmaster/kuaishou/ad/KSTranslateActivity;
.line 69
invoke-virtual {v2}, Ljava/lang/Class;->getName()Ljava/lang/String;
move-result-object v2
.line 68
invoke-virtual {v1, v0, v2}, Lcom/cleanmaster/hpsharelib/base/util/system/LauncherUtil;->checkShortcutIsExists(Ljava/lang/String;Ljava/lang/String;)Z
move-result v0
.line 70
return v0
.end method
.method public static a(Landroid/content/Context;)Z
.registers 3
.prologue
.line 74
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
const/16 v1, 0x1a
if-lt v0, v1, :cond_11
.line 75
const-class v0, Lcom/cleanmaster/kuaishou/ad/KSTranslateActivity;
invoke-virtual {v0}, Ljava/lang/Class;->getName()Ljava/lang/String;
move-result-object v0
invoke-static {p0, v0}, Lcom/cleanmaster/loststars/d/i;->a(Landroid/content/Context;Ljava/lang/String;)Z
move-result v0
.line 77
:goto_10
return v0
:cond_11
invoke-static {}, Lcom/cleanmaster/kuaishou/ad/util/g;->a()Z
move-result v0
goto :goto_10
.end method
.method public static b(Landroid/content/Context;I)V
.registers 4
.prologue
.line 51
invoke-static {p0}, Lcom/cleanmaster/kuaishou/ad/util/g;->a(Landroid/content/Context;)Z
move-result v0
if-eqz v0, :cond_7
.line 64
:cond_6
:goto_6
return-void
.line 54
:cond_7
invoke-static {}, Lcom/cleanmaster/hpsharelib/kuaishou/cloud/KsCloudUtils;->getShortCutDialogSwitch()Z
move-result v0
if-eqz v0, :cond_6
.line 57
invoke-static {}, Lcom/cleanmaster/hpsharelib/utils/VipHelper;->isShieldksVideo()Z
move-result v0
if-eqz v0, :cond_19
invoke-static {}, Lcom/cleanmaster/hpsharelib/utils/VipHelper;->isVip()Z
move-result v0
if-nez v0, :cond_6
.line 60
:cond_19
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
const/16 v1, 0x1a
if-ge v0, v1, :cond_6
const/16 v0, 0x40
invoke-static {v0}, Lcom/cleanmaster/hpcommonlib/accessibility/AccessibilitySdkUtils;->needOpenPermissionRequest(I)Z
move-result v0
if-nez v0, :cond_6
.line 63
invoke-static {p0, p1}, Lcom/cleanmaster/kuaishou/ad/widget/KsShortCutActivity;->a(Landroid/content/Context;I)V
goto :goto_6
.end method