b.smali
.class public Lcom/cmcm/ad/ui/util/miui/b;
.super Ljava/lang/Object;
.source "MiuiShopManager.java"
# direct methods
.method private static a(Lcom/cm/plugincluster/ad/IAd;)Landroid/content/Intent;
.registers 4
.prologue
.line 29
:try_start_0
invoke-interface {p0}, Lcom/cm/plugincluster/ad/IAd;->getExtension()Ljava/lang/String;
move-result-object v0
.line 30
new-instance v1, Lorg/json/JSONObject;
invoke-interface {p0}, Lcom/cm/plugincluster/ad/IAd;->getExtension()Ljava/lang/String;
move-result-object v2
invoke-direct {v1, v2}, Lorg/json/JSONObject;-><init>(Ljava/lang/String;)V
.line 31
const-string v2, "miui_download_url"
invoke-virtual {v1, v2}, Lorg/json/JSONObject;->isNull(Ljava/lang/String;)Z
move-result v2
if-nez v2, :cond_39
invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_39
.line 32
const-string v0, "miui_download_url"
invoke-virtual {v1, v0}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;
move-result-object v1
.line 33
new-instance v0, Landroid/content/Intent;
const-string v2, "android.intent.action.VIEW"
invoke-direct {v0, v2}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V
.line 34
const-string v2, "com.xiaomi.market"
invoke-virtual {v0, v2}, Landroid/content/Intent;->setPackage(Ljava/lang/String;)Landroid/content/Intent;
.line 35
invoke-static {v1}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;
move-result-object v1
invoke-virtual {v0, v1}, Landroid/content/Intent;->setData(Landroid/net/Uri;)Landroid/content/Intent;
:try_end_34
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_34} :catch_35
.line 44
:goto_34
return-object v0
.line 38
:catch_35
move-exception v0
.line 42
invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V
.line 44
:cond_39
const/4 v0, 0x0
goto :goto_34
.end method
.method public static a()Ljava/lang/String;
.registers 4
.prologue
.line 101
const/4 v0, 0x1
const-string v1, "miui_shop_section"
const-string v2, "show_miui_shop_posid"
const-string v3, "108287,108288"
invoke-static {v0, v1, v2, v3}, Lcom/cleanmaster/pluginscommonlib/g;->a(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
move-result-object v0
.line 102
if-nez v0, :cond_f
.line 103
const-string v0, "108287,108288"
.line 105
:cond_f
return-object v0
.end method
.method public static a(Landroid/content/Context;Landroid/content/Intent;)Z
.registers 5
.prologue
const/4 v0, 0x0
.line 79
if-eqz p0, :cond_5
if-nez p1, :cond_6
.line 90
:cond_5
:goto_5
return v0
.line 83
:cond_6
:try_start_6
invoke-virtual {p0}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;
move-result-object v1
const/high16 v2, 0x10000
invoke-virtual {v1, p1, v2}, Landroid/content/pm/PackageManager;->resolveActivity(Landroid/content/Intent;I)Landroid/content/pm/ResolveInfo;
:try_end_f
.catch Ljava/lang/Exception; {:try_start_6 .. :try_end_f} :catch_16
.catch Ljava/lang/Error; {:try_start_6 .. :try_end_f} :catch_14
move-result-object v1
if-eqz v1, :cond_5
.line 84
const/4 v0, 0x1
goto :goto_5
.line 89
:catch_14
move-exception v1
goto :goto_5
.line 87
:catch_16
move-exception v1
goto :goto_5
.end method
.method private static a(Landroid/content/Intent;)Z
.registers 4
.prologue
const/4 v0, 0x0
.line 61
invoke-static {}, Lcom/cleanmaster/pluginscommonlib/n;->b()Landroid/content/Context;
move-result-object v1
invoke-static {v1, p0}, Lcom/cmcm/ad/ui/util/miui/b;->a(Landroid/content/Context;Landroid/content/Intent;)Z
move-result v1
if-nez v1, :cond_c
.line 75
:goto_b
return v0
.line 65
:cond_c
:try_start_c
invoke-static {}, Lcom/cmcm/ad/ui/util/miui/a;->a()Lcom/cmcm/ad/ui/util/miui/a;
move-result-object v1
invoke-virtual {v1}, Lcom/cmcm/ad/ui/util/miui/a;->c()Landroid/app/Activity;
move-result-object v1
.line 66
if-eqz v1, :cond_1f
instance-of v2, v1, Landroid/app/Activity;
if-eqz v2, :cond_1f
.line 67
invoke-virtual {v1, p0}, Landroid/app/Activity;->startActivity(Landroid/content/Intent;)V
.line 75
:goto_1d
const/4 v0, 0x1
goto :goto_b
.line 69
:cond_1f
const v1, 0x10008000
invoke-virtual {p0, v1}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;
.line 70
invoke-static {}, Lcom/cleanmaster/pluginscommonlib/n;->b()Landroid/content/Context;
move-result-object v1
invoke-virtual {v1, p0}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V
:try_end_2c
.catch Ljava/lang/Exception; {:try_start_c .. :try_end_2c} :catch_2d
goto :goto_1d
.line 72
:catch_2d
move-exception v1
goto :goto_b
.end method
.method public static a(Lcom/cm/plugincluster/ad/IAd;Lcom/cm/plugincluster/ad/adhandle/IBusinessRptData;)Z
.registers 4
.prologue
.line 49
invoke-static {}, Lcom/cleanmaster/pluginscommonlib/q;->a()Z
move-result v0
if-eqz v0, :cond_3a
invoke-static {}, Lcom/cmcm/ad/ui/util/miui/b;->b()Z
move-result v0
if-eqz v0, :cond_3a
invoke-static {}, Lcom/cmcm/ad/ui/util/miui/b;->a()Ljava/lang/String;
move-result-object v0
invoke-interface {p1}, Lcom/cm/plugincluster/ad/adhandle/IBusinessRptData;->getPosId()Ljava/lang/String;
move-result-object v1
invoke-virtual {v0, v1}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-eqz v0, :cond_3a
.line 50
invoke-static {p0}, Lcom/cmcm/ad/ui/util/miui/b;->a(Lcom/cm/plugincluster/ad/IAd;)Landroid/content/Intent;
move-result-object v0
.line 51
if-eqz v0, :cond_3a
invoke-static {v0}, Lcom/cmcm/ad/ui/util/miui/b;->a(Landroid/content/Intent;)Z
move-result v0
if-eqz v0, :cond_3a
.line 52
invoke-static {}, Lcom/cmcm/ad/ui/util/miui/a;->a()Lcom/cmcm/ad/ui/util/miui/a;
move-result-object v0
invoke-virtual {v0}, Lcom/cmcm/ad/ui/util/miui/a;->b()V
.line 53
invoke-static {}, Lcom/cmcm/ad/ui/util/miui/a;->a()Lcom/cmcm/ad/ui/util/miui/a;
move-result-object v0
invoke-interface {p0}, Lcom/cm/plugincluster/ad/IAd;->getPkg()Ljava/lang/String;
move-result-object v1
invoke-virtual {v0, v1, p1}, Lcom/cmcm/ad/ui/util/miui/a;->a(Ljava/lang/String;Lcom/cm/plugincluster/ad/adhandle/IBusinessRptData;)V
.line 54
const/4 v0, 0x1
.line 57
:goto_39
return v0
:cond_3a
const/4 v0, 0x0
goto :goto_39
.end method
.method public static b()Z
.registers 3
.prologue
const/4 v2, 0x1
.line 110
const-string v0, "miui_shop_section"
const-string v1, "is_use_miui_shop"
invoke-static {v2, v0, v1, v2}, Lcom/cleanmaster/pluginscommonlib/g;->a(ILjava/lang/String;Ljava/lang/String;Z)Z
move-result v0
return v0
.end method