CoolerNotificationEmptyService.smali

.class public Lcom/cleanmaster/getui/CoolerNotificationEmptyService;
.super Landroid/app/IntentService;
.source "CoolerNotificationEmptyService.java"


# static fields
.field private static a:Ljava/lang/String;

.field private static b:Ljava/lang/String;

.field private static c:Ljava/lang/String;

.field private static d:Ljava/lang/String;

.field private static e:Ljava/lang/String;

.field private static f:Ljava/lang/String;


# direct methods
.method static constructor <clinit>()V
    .registers 1

    .prologue
    .line 35
    const-string v0, "com.xiaomi.market"

    sput-object v0, Lcom/cleanmaster/getui/CoolerNotificationEmptyService;->a:Ljava/lang/String;

    .line 36
    const-string v0, "com.huawei.appmarket"

    sput-object v0, Lcom/cleanmaster/getui/CoolerNotificationEmptyService;->b:Ljava/lang/String;

    .line 37
    const-string v0, "com.bbk.appstore"

    sput-object v0, Lcom/cleanmaster/getui/CoolerNotificationEmptyService;->c:Ljava/lang/String;

    .line 38
    const-string v0, "com.oppo.market"

    sput-object v0, Lcom/cleanmaster/getui/CoolerNotificationEmptyService;->d:Ljava/lang/String;

    .line 39
    const-string v0, "com.meizu.mstore"

    sput-object v0, Lcom/cleanmaster/getui/CoolerNotificationEmptyService;->e:Ljava/lang/String;

    .line 40
    const-string v0, "com.sec.android.app.samsungapps"

    sput-object v0, Lcom/cleanmaster/getui/CoolerNotificationEmptyService;->f:Ljava/lang/String;

    return-void
.end method

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

    .prologue
    .line 52
    const-string v0, "CoolerNotificationEmptyService"

    invoke-direct {p0, v0}, Landroid/app/IntentService;-><init>(Ljava/lang/String;)V

    .line 53
    return-void
.end method

.method public constructor <init>(Ljava/lang/String;)V
    .registers 2

    .prologue
    .line 48
    invoke-direct {p0, p1}, Landroid/app/IntentService;-><init>(Ljava/lang/String;)V

    .line 49
    return-void
.end method

.method private static a(Landroid/content/Context;ZI)Landroid/content/Intent;
    .registers 5

    .prologue
    .line 57
    .line 58
    invoke-virtual {p0}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;

    move-result-object v0

    .line 59
    if-nez v0, :cond_c

    .line 60
    new-instance v0, Landroid/content/Intent;

    invoke-direct {v0}, Landroid/content/Intent;-><init>()V

    .line 68
    :goto_b
    return-object v0

    .line 62
    :cond_c
    if-eqz p1, :cond_1a

    .line 63
    const-string v1, "com.cheetah.cmcooler"

    invoke-virtual {v0, v1}, Landroid/content/pm/PackageManager;->getLaunchIntentForPackage(Ljava/lang/String;)Landroid/content/Intent;

    move-result-object v0

    .line 67
    :goto_14
    const-string v1, "notify_id_temp"

    invoke-virtual {v0, v1, p2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;I)Landroid/content/Intent;

    goto :goto_b

    .line 65
    :cond_1a
    invoke-static {v0}, Lcom/cleanmaster/getui/CoolerNotificationEmptyService;->a(Landroid/content/pm/PackageManager;)Landroid/content/Intent;

    move-result-object v0

    goto :goto_14
.end method

.method private static a(Landroid/content/pm/PackageManager;)Landroid/content/Intent;
    .registers 6

    .prologue
    .line 72
    new-instance v0, Landroid/content/Intent;

    const-string v1, "android.intent.action.VIEW"

    invoke-direct {v0, v1}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    .line 73
    const-string v1, "com.cheetah.cmcooler"

    invoke-static {v1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v1

    if-eqz v1, :cond_10

    .line 84
    :goto_f
    return-object v0

    .line 76
    :cond_10
    const-string v1, "market://details?id=com.cheetah.cmcooler"

    invoke-static {v1}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v1

    .line 77
    invoke-virtual {v0, v1}, Landroid/content/Intent;->setData(Landroid/net/Uri;)Landroid/content/Intent;

    .line 78
    invoke-static {p0}, Lcom/cleanmaster/getui/CoolerNotificationEmptyService;->b(Landroid/content/pm/PackageManager;)Ljava/lang/String;

    move-result-object v1

    .line 79
    const-string v2, "CoolerNotification"

    new-instance v3, Ljava/lang/StringBuilder;

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

    const-string v4, "marketPkg = "

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

    move-result-object v3

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

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-static {v2, v3}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

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

    move-result v2

    if-nez v2, :cond_3e

    .line 81
    invoke-virtual {v0, v1}, Landroid/content/Intent;->setPackage(Ljava/lang/String;)Landroid/content/Intent;

    .line 83
    :cond_3e
    const/high16 v1, 0x10000000

    invoke-virtual {v0, v1}, Landroid/content/Intent;->addFlags(I)Landroid/content/Intent;

    goto :goto_f
.end method

.method private static b(Landroid/content/pm/PackageManager;)Ljava/lang/String;
    .registers 6

    .prologue
    const/4 v4, 0x0

    .line 88
    invoke-static {}, Lcom/cleanmaster/hpsharelib/base/util/system/DeviceUtils;->isOppo()Z

    move-result v0

    if-eqz v0, :cond_a

    .line 89
    sget-object v0, Lcom/cleanmaster/getui/CoolerNotificationEmptyService;->d:Ljava/lang/String;

    .line 131
    :goto_9
    return-object v0

    .line 91
    :cond_a
    invoke-static {}, Lcom/cleanmaster/hpsharelib/base/util/system/DeviceUtils;->isMiui()Z

    move-result v0

    if-eqz v0, :cond_13

    .line 92
    sget-object v0, Lcom/cleanmaster/getui/CoolerNotificationEmptyService;->a:Ljava/lang/String;

    goto :goto_9

    .line 94
    :cond_13
    invoke-static {}, Lcom/cleanmaster/hpsharelib/base/util/system/DeviceUtils;->isHuaWeiDevice()Z

    move-result v0

    if-eqz v0, :cond_1c

    .line 95
    sget-object v0, Lcom/cleanmaster/getui/CoolerNotificationEmptyService;->b:Ljava/lang/String;

    goto :goto_9

    .line 97
    :cond_1c
    invoke-static {}, Lcom/cleanmaster/pluginscommonlib/j;->a()Z

    move-result v0

    if-eqz v0, :cond_25

    .line 98
    sget-object v0, Lcom/cleanmaster/getui/CoolerNotificationEmptyService;->c:Ljava/lang/String;

    goto :goto_9

    .line 100
    :cond_25
    invoke-static {}, Lcom/cleanmaster/hpsharelib/base/util/system/DeviceUtils;->isMeizu()Z

    move-result v0

    if-eqz v0, :cond_2e

    .line 101
    sget-object v0, Lcom/cleanmaster/getui/CoolerNotificationEmptyService;->e:Ljava/lang/String;

    goto :goto_9

    .line 103
    :cond_2e
    invoke-static {}, Lcom/cleanmaster/hpsharelib/base/util/system/DeviceUtils;->isSamsung()Z

    move-result v0

    if-eqz v0, :cond_37

    .line 104
    sget-object v0, Lcom/cleanmaster/getui/CoolerNotificationEmptyService;->f:Ljava/lang/String;

    goto :goto_9

    .line 106
    :cond_37
    new-instance v0, Landroid/content/Intent;

    invoke-direct {v0}, Landroid/content/Intent;-><init>()V

    .line 107
    const-string v1, "android.intent.action.MAIN"

    invoke-virtual {v0, v1}, Landroid/content/Intent;->setAction(Ljava/lang/String;)Landroid/content/Intent;

    .line 108
    const-string v1, "android.intent.category.APP_MARKET"

    invoke-virtual {v0, v1}, Landroid/content/Intent;->addCategory(Ljava/lang/String;)Landroid/content/Intent;

    .line 109
    invoke-virtual {p0, v0, v4}, Landroid/content/pm/PackageManager;->queryIntentActivities(Landroid/content/Intent;I)Ljava/util/List;

    move-result-object v0

    .line 110
    if-eqz v0, :cond_52

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

    move-result v1

    if-nez v1, :cond_55

    .line 111
    :cond_52
    const-string v0, ""

    goto :goto_9

    .line 113
    :cond_55
    new-instance v1, Ljava/util/ArrayList;

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

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

    move-result-object v2

    :cond_5e
    :goto_5e
    invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z

    move-result v0

    if-eqz v0, :cond_86

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

    move-result-object v0

    check-cast v0, Landroid/content/pm/ResolveInfo;

    .line 115
    if-eqz v0, :cond_5e

    .line 118
    const-string v3, ""

    .line 119
    iget-object v0, v0, Landroid/content/pm/ResolveInfo;->activityInfo:Landroid/content/pm/ActivityInfo;

    .line 120
    if-eqz v0, :cond_5e

    .line 123
    iget-object v0, v0, Landroid/content/pm/ActivityInfo;->packageName:Ljava/lang/String;

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

    move-result v3

    if-nez v3, :cond_5e

    const-string v3, "com.android.vending"

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

    move-result v3

    if-nez v3, :cond_5e

    .line 125
    invoke-interface {v1, v0}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    goto :goto_5e

    .line 128
    :cond_86
    invoke-interface {v1}, Ljava/util/List;->size()I

    move-result v0

    if-nez v0, :cond_90

    .line 129
    const-string v0, ""

    goto/16 :goto_9

    .line 131
    :cond_90
    invoke-interface {v1, v4}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/lang/String;

    goto/16 :goto_9
.end method


# virtual methods
.method protected onHandleIntent(Landroid/content/Intent;)V
    .registers 5
    .param p1    # Landroid/content/Intent;
        .annotation build Landroid/support/annotation/Nullable;
        .end annotation
    .end param

    .prologue
    .line 137
    if-nez p1, :cond_3

    .line 147
    :goto_2
    return-void

    .line 140
    :cond_3
    const-string v0, "noti_id"

    invoke-virtual {p1, v0}, Landroid/content/Intent;->getStringExtra(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    .line 141
    const/4 v1, 0x1

    const/16 v2, 0x64

    invoke-static {p1, v1, v2}, Lcom/keniu/security/update/push/c/a;->a(Landroid/content/Intent;ZB)V

    .line 142
    const-string v1, "is_install_cooler"

    const/4 v2, 0x0

    invoke-virtual {p1, v1, v2}, Landroid/content/Intent;->getBooleanExtra(Ljava/lang/String;Z)Z

    move-result v1

    .line 143
    invoke-static {v0}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I

    move-result v0

    invoke-static {p0, v1, v0}, Lcom/cleanmaster/getui/CoolerNotificationEmptyService;->a(Landroid/content/Context;ZI)Landroid/content/Intent;

    move-result-object v0

    .line 144
    invoke-static {p0, v0}, Lcom/cleanmaster/base/a;->a(Landroid/content/Context;Landroid/content/Intent;)Z

    .line 146
    invoke-virtual {p0}, Lcom/cleanmaster/getui/CoolerNotificationEmptyService;->stopSelf()V

    goto :goto_2
.end method