OEMFeatureManager.smali

.class public Lcom/cleanmaster/hpsharelib/oeam/OEMFeatureManager;
.super Ljava/lang/Object;
.source "OEMFeatureManager.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/cleanmaster/hpsharelib/oeam/OEMFeatureManager$CloudConstants;
    }
.end annotation


# static fields
.field private static final UNIT_DAY:J = 0x5265c00L


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

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

    return-void
.end method

.method private static enabledByCloud(Ljava/lang/String;)Z
    .registers 11

    .prologue
    const/4 v1, 0x0

    const/4 v0, 0x1

    .line 73
    invoke-static {}, Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;->getInstance()Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;

    move-result-object v2

    invoke-virtual {v2}, Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;->isOemCloudSwitchAlreadyOpen()Z

    move-result v2

    if-eqz v2, :cond_d

    .line 90
    :goto_c
    return v0

    .line 77
    :cond_d
    invoke-static {p0, v0}, Lcom/cleanmaster/hpsharelib/oeam/OEMFeatureManager;->getBooleanCloudConfig(Ljava/lang/String;Z)Z

    move-result v2

    .line 78
    const-string v3, "cm_app_distribution_days"

    const/4 v4, -0x1

    invoke-static {v3, v4}, Lcom/cleanmaster/hpsharelib/oeam/OEMFeatureManager;->getIntCloudConfig(Ljava/lang/String;I)I

    move-result v3

    int-to-long v4, v3

    .line 79
    const-wide/16 v6, -0x1

    cmp-long v3, v4, v6

    if-nez v3, :cond_21

    move v0, v1

    .line 80
    goto :goto_c

    .line 83
    :cond_21
    invoke-static {}, Lcom/cleanmaster/hpsharelib/base/util/system/VersionReplaceUtils;->getFirstInstallVersionStartTime()J

    move-result-wide v6

    .line 84
    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v8

    .line 85
    if-eqz v2, :cond_3d

    sub-long v2, v8, v6

    const-wide/32 v6, 0x5265c00

    mul-long/2addr v4, v6

    cmp-long v2, v2, v4

    if-lez v2, :cond_3d

    .line 86
    invoke-static {}, Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;->getInstance()Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;

    move-result-object v1

    invoke-virtual {v1, v0}, Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;->setOemCloudSwitchAlreadyOpen(Z)V

    goto :goto_c

    :cond_3d
    move v0, v1

    .line 90
    goto :goto_c
.end method

.method private static getBooleanCloudConfig(Ljava/lang/String;Z)Z
    .registers 4

    .prologue
    .line 94
    const/16 v0, 0x9

    const-string v1, "cm_app_distribution"

    invoke-static {v0, v1, p0, p1}, Lcom/cleanmaster/hpsharelib/cloudconfig/CloudConfigDataGetterProxy;->getBooleanValue(ILjava/lang/String;Ljava/lang/String;Z)Z

    move-result v0

    return v0
.end method

.method private static getIntCloudConfig(Ljava/lang/String;I)I
    .registers 4

    .prologue
    .line 98
    const/16 v0, 0x9

    const-string v1, "cm_app_distribution"

    invoke-static {v0, v1, p0, p1}, Lcom/cleanmaster/hpsharelib/cloudconfig/CloudConfigDataGetterProxy;->getIntValue(ILjava/lang/String;Ljava/lang/String;I)I

    move-result v0

    return v0
.end method

.method public static isAppUpdateEnable()Z
    .registers 1

    .prologue
    .line 53
    invoke-static {}, Lcom/cleanmaster/hpsharelib/oeam/OEMDistributeControl;->isAppUpdateEnable()Z

    move-result v0

    if-nez v0, :cond_e

    const-string v0, "cm_app_distribution_app_update"

    invoke-static {v0}, Lcom/cleanmaster/hpsharelib/oeam/OEMFeatureManager;->enabledByCloud(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_10

    :cond_e
    const/4 v0, 0x1

    :goto_f
    return v0

    :cond_10
    const/4 v0, 0x0

    goto :goto_f
.end method

.method public static isCMFamilyEntryEnable()Z
    .registers 1

    .prologue
    .line 57
    invoke-static {}, Lcom/cleanmaster/hpsharelib/oeam/OEMDistributeControl;->isCMFamilyEntryEnable()Z

    move-result v0

    if-nez v0, :cond_e

    const-string v0, "cm_app_distribution_cmfamily"

    invoke-static {v0}, Lcom/cleanmaster/hpsharelib/oeam/OEMFeatureManager;->enabledByCloud(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_10

    :cond_e
    const/4 v0, 0x1

    :goto_f
    return v0

    :cond_10
    const/4 v0, 0x0

    goto :goto_f
.end method

.method public static isDesktopShortcutEnable()Z
    .registers 1

    .prologue
    .line 41
    invoke-static {}, Lcom/cleanmaster/hpsharelib/oeam/OEMDistributeControl;->isDesktopShortcutEnable()Z

    move-result v0

    if-nez v0, :cond_e

    const-string v0, "cm_app_distribution_shortcut"

    invoke-static {v0}, Lcom/cleanmaster/hpsharelib/oeam/OEMFeatureManager;->enabledByCloud(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_10

    :cond_e
    const/4 v0, 0x1

    :goto_f
    return v0

    :cond_10
    const/4 v0, 0x0

    goto :goto_f
.end method

.method public static isDownloadEntryEnable()Z
    .registers 1

    .prologue
    .line 21
    invoke-static {}, Lcom/cleanmaster/hpsharelib/oeam/OEMDistributeControl;->isDownloadEntryEnable()Z

    move-result v0

    if-nez v0, :cond_e

    const-string v0, "cm_app_distribution_download"

    invoke-static {v0}, Lcom/cleanmaster/hpsharelib/oeam/OEMFeatureManager;->enabledByCloud(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_10

    :cond_e
    const/4 v0, 0x1

    :goto_f
    return v0

    :cond_10
    const/4 v0, 0x0

    goto :goto_f
.end method

.method public static isFinanceEnable()Z
    .registers 1

    .prologue
    .line 65
    invoke-static {}, Lcom/cleanmaster/hpsharelib/oeam/OEMDistributeControl;->isFinanceEnable()Z

    move-result v0

    if-nez v0, :cond_e

    const-string v0, "cm_app_distribution_finance"

    invoke-static {v0}, Lcom/cleanmaster/hpsharelib/oeam/OEMFeatureManager;->enabledByCloud(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_10

    :cond_e
    const/4 v0, 0x1

    :goto_f
    return v0

    :cond_10
    const/4 v0, 0x0

    goto :goto_f
.end method

.method public static isGameEntryEnable()Z
    .registers 1

    .prologue
    .line 17
    invoke-static {}, Lcom/cleanmaster/hpsharelib/oeam/OEMDistributeControl;->isGameEntryEnable()Z

    move-result v0

    if-nez v0, :cond_e

    const-string v0, "cm_app_distribution_game"

    invoke-static {v0}, Lcom/cleanmaster/hpsharelib/oeam/OEMFeatureManager;->enabledByCloud(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_10

    :cond_e
    const/4 v0, 0x1

    :goto_f
    return v0

    :cond_10
    const/4 v0, 0x0

    goto :goto_f
.end method

.method public static isNewsAdEnable()Z
    .registers 1

    .prologue
    .line 29
    invoke-static {}, Lcom/cleanmaster/hpsharelib/oeam/OEMDistributeControl;->isNewsAdEnable()Z

    move-result v0

    if-nez v0, :cond_e

    const-string v0, "cm_app_distribution_newsad"

    invoke-static {v0}, Lcom/cleanmaster/hpsharelib/oeam/OEMFeatureManager;->enabledByCloud(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_10

    :cond_e
    const/4 v0, 0x1

    :goto_f
    return v0

    :cond_10
    const/4 v0, 0x0

    goto :goto_f
.end method

.method public static isNormalAdEnable()Z
    .registers 1

    .prologue
    .line 49
    invoke-static {}, Lcom/cleanmaster/hpsharelib/oeam/OEMDistributeControl;->isAdEntryEnable()Z

    move-result v0

    if-nez v0, :cond_e

    const-string v0, "cm_app_distribution_ad"

    invoke-static {v0}, Lcom/cleanmaster/hpsharelib/oeam/OEMFeatureManager;->enabledByCloud(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_10

    :cond_e
    const/4 v0, 0x1

    :goto_f
    return v0

    :cond_10
    const/4 v0, 0x0

    goto :goto_f
.end method

.method public static isOcpaEnable()Z
    .registers 1

    .prologue
    .line 69
    invoke-static {}, Lcom/cleanmaster/hpsharelib/oeam/OEMDistributeControl;->isOcpaEnable()Z

    move-result v0

    return v0
.end method

.method public static isScreenSaverAdEnable()Z
    .registers 1

    .prologue
    .line 25
    invoke-static {}, Lcom/cleanmaster/hpsharelib/oeam/OEMDistributeControl;->isScreenSaverAdEnable()Z

    move-result v0

    if-nez v0, :cond_e

    const-string v0, "cm_app_distribution_screensaverad"

    invoke-static {v0}, Lcom/cleanmaster/hpsharelib/oeam/OEMFeatureManager;->enabledByCloud(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_10

    :cond_e
    const/4 v0, 0x1

    :goto_f
    return v0

    :cond_10
    const/4 v0, 0x0

    goto :goto_f
.end method

.method public static isScreenSaverFunctionEnable()Z
    .registers 1

    .prologue
    .line 37
    invoke-static {}, Lcom/cleanmaster/hpsharelib/oeam/OEMDistributeControl;->isScreenSaverFunctionEnable()Z

    move-result v0

    if-nez v0, :cond_e

    const-string v0, "cm_app_distribution_screensaver"

    invoke-static {v0}, Lcom/cleanmaster/hpsharelib/oeam/OEMFeatureManager;->enabledByCloud(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_10

    :cond_e
    const/4 v0, 0x1

    :goto_f
    return v0

    :cond_10
    const/4 v0, 0x0

    goto :goto_f
.end method

.method public static isTTGEnable()Z
    .registers 1

    .prologue
    .line 61
    invoke-static {}, Lcom/cleanmaster/hpsharelib/oeam/OEMDistributeControl;->isTTGEnable()Z

    move-result v0

    if-nez v0, :cond_e

    const-string v0, "cm_app_distribution_ttg"

    invoke-static {v0}, Lcom/cleanmaster/hpsharelib/oeam/OEMFeatureManager;->enabledByCloud(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_10

    :cond_e
    const/4 v0, 0x1

    :goto_f
    return v0

    :cond_10
    const/4 v0, 0x0

    goto :goto_f
.end method

.method public static isUninstallEnable()Z
    .registers 1

    .prologue
    .line 33
    invoke-static {}, Lcom/cleanmaster/hpsharelib/oeam/OEMDistributeControl;->isUninstallEntryEnable()Z

    move-result v0

    if-nez v0, :cond_e

    const-string v0, "cm_app_distribution_uninstall"

    invoke-static {v0}, Lcom/cleanmaster/hpsharelib/oeam/OEMFeatureManager;->enabledByCloud(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_10

    :cond_e
    const/4 v0, 0x1

    :goto_f
    return v0

    :cond_10
    const/4 v0, 0x0

    goto :goto_f
.end method