.class public Lcom/moji/appupdate/UpgradeBetaInSettingCenter;
.super Lcom/moji/appupdate/UpgradeBaseCenter;
.source "UpgradeBetaInSettingCenter.java"


# direct methods
.method public constructor <init>(Lcom/moji/http/upt/bean/UpdateInfoResp;)V
    .locals 0

    .line 23
    invoke-direct {p0, p1}, Lcom/moji/appupdate/UpgradeBaseCenter;-><init>(Lcom/moji/http/upt/bean/UpdateInfoResp;)V

    return-void
.end method


# virtual methods
.method public a(Landroid/app/Activity;)V
    .locals 10

    .line 67
    invoke-virtual {p0}, Lcom/moji/appupdate/UpgradeBetaInSettingCenter;->d()Ljava/io/File;

    move-result-object v0

    .line 68
    iget-object v1, p0, Lcom/moji/appupdate/UpgradeBetaInSettingCenter;->a:Lcom/moji/http/upt/bean/UpdateInfoResp;

    iget-object v1, v1, Lcom/moji/http/upt/bean/UpdateInfoResp;->file_sign:Ljava/lang/String;

    invoke-virtual {p0, v1, v0}, Lcom/moji/appupdate/UpgradeBetaInSettingCenter;->a(Ljava/lang/String;Ljava/io/File;)Z

    move-result v4

    if-eqz v4, :cond_0

    .line 71
    iget-object v1, p0, Lcom/moji/appupdate/UpgradeBetaInSettingCenter;->a:Lcom/moji/http/upt/bean/UpdateInfoResp;

    iget-object v1, v1, Lcom/moji/http/upt/bean/UpdateInfoResp;->install_desc:Ljava/lang/String;

    :goto_0
    move-object v7, v1

    goto :goto_1

    .line 73
    :cond_0
    invoke-virtual {p0}, Lcom/moji/appupdate/UpgradeBetaInSettingCenter;->c()Ljava/lang/String;

    move-result-object v1

    goto :goto_0

    .line 75
    :goto_1
    iget-object v1, p0, Lcom/moji/appupdate/UpgradeBetaInSettingCenter;->a:Lcom/moji/http/upt/bean/UpdateInfoResp;

    iget-object v5, v1, Lcom/moji/http/upt/bean/UpdateInfoResp;->title:Ljava/lang/String;

    iget-object v1, p0, Lcom/moji/appupdate/UpgradeBetaInSettingCenter;->a:Lcom/moji/http/upt/bean/UpdateInfoResp;

    iget-object v6, v1, Lcom/moji/http/upt/bean/UpdateInfoResp;->description:Ljava/lang/String;

    new-instance v8, Lcom/moji/appupdate/UpgradeBetaInSettingCenter$1;

    invoke-direct {v8, p0, v4, v0}, Lcom/moji/appupdate/UpgradeBetaInSettingCenter$1;-><init>(Lcom/moji/appupdate/UpgradeBetaInSettingCenter;ZLjava/io/File;)V

    new-instance v9, Lcom/moji/appupdate/UpgradeBetaInSettingCenter$2;

    invoke-direct {v9, p0}, Lcom/moji/appupdate/UpgradeBetaInSettingCenter$2;-><init>(Lcom/moji/appupdate/UpgradeBetaInSettingCenter;)V

    move-object v2, p0

    move-object v3, p1

    invoke-virtual/range {v2 .. v9}, Lcom/moji/appupdate/UpgradeBetaInSettingCenter;->a(Landroid/app/Activity;ZLjava/lang/String;Ljava/lang/String;Ljava/lang/String;Landroid/content/DialogInterface$OnClickListener;Landroid/content/DialogInterface$OnClickListener;)Z

    return-void
.end method

.method public a(Z)V
    .locals 2

    .line 28
    invoke-static {}, Lcom/moji/statistics/EventManager;->a()Lcom/moji/statistics/EventManager;

    move-result-object v0

    sget-object v1, Lcom/moji/statistics/EVENT_TAG;->UPDATE_BETA_DOWNLOAD_STATE:Lcom/moji/statistics/EVENT_TAG;

    if-eqz p1, :cond_0

    const-string p1, "1"

    goto :goto_0

    :cond_0
    const-string p1, "0"

    :goto_0
    invoke-virtual {v0, v1, p1}, Lcom/moji/statistics/EventManager;->a(Lcom/moji/statistics/EVENT_TAG;Ljava/lang/String;)Lcom/moji/statistics/EventManager;

    return-void
.end method

.method public a(ZLjava/io/File;)V
    .locals 0

    if-eqz p1, :cond_0

    .line 100
    invoke-virtual {p0, p2}, Lcom/moji/appupdate/UpgradeBetaInSettingCenter;->b(Ljava/io/File;)V

    goto :goto_0

    .line 102
    :cond_0
    iget-object p1, p0, Lcom/moji/appupdate/UpgradeBetaInSettingCenter;->a:Lcom/moji/http/upt/bean/UpdateInfoResp;

    iget-object p1, p1, Lcom/moji/http/upt/bean/UpdateInfoResp;->url:Ljava/lang/String;

    invoke-virtual {p0, p2, p1}, Lcom/moji/appupdate/UpgradeBetaInSettingCenter;->a(Ljava/io/File;Ljava/lang/String;)Ljava/io/File;

    :goto_0
    return-void
.end method

.method public a(ZLjava/lang/String;Ljava/lang/String;Lcom/moji/appupdate/CheckFailedType;)V
    .locals 2

    const/4 v0, 0x4

    .line 33
    new-array v0, v0, [Ljava/lang/Object;

    invoke-virtual {p4}, Lcom/moji/appupdate/CheckFailedType;->name()Ljava/lang/String;

    move-result-object p4

    const/4 v1, 0x0

    aput-object p4, v0, v1

    const/4 p4, 0x1

    aput-object p2, v0, p4

    const/4 p2, 0x2

    aput-object p3, v0, p2

    iget-object p2, p0, Lcom/moji/appupdate/UpgradeBetaInSettingCenter;->a:Lcom/moji/http/upt/bean/UpdateInfoResp;

    iget-object p2, p2, Lcom/moji/http/upt/bean/UpdateInfoResp;->url:Ljava/lang/String;

    const/4 p3, 0x3

    aput-object p2, v0, p3

    invoke-static {v0}, Lcom/moji/statistics/EventParams;->getProperty([Ljava/lang/Object;)Lorg/json/JSONObject;

    move-result-object p2

    .line 34
    invoke-static {}, Lcom/moji/statistics/EventManager;->a()Lcom/moji/statistics/EventManager;

    move-result-object p3

    sget-object p4, Lcom/moji/statistics/EVENT_TAG;->UPDATE_BETA_APK_VERIFY:Lcom/moji/statistics/EVENT_TAG;

    if-eqz p1, :cond_0

    const-string p1, "1"

    goto :goto_0

    :cond_0
    const-string p1, "0"

    :goto_0
    invoke-virtual {p3, p4, p1, p2}, Lcom/moji/statistics/EventManager;->a(Lcom/moji/statistics/EVENT_TAG;Ljava/lang/String;Lorg/json/JSONObject;)Lcom/moji/statistics/EventManager;

    return-void
.end method

.method public b()V
    .locals 2

    .line 57
    invoke-virtual {p0}, Lcom/moji/appupdate/UpgradeBetaInSettingCenter;->g()Z

    move-result v0

    if-eqz v0, :cond_0

    .line 59
    invoke-static {}, Lcom/moji/bus/Bus;->a()Lcom/moji/bus/Bus;

    move-result-object v0

    new-instance v1, Lcom/moji/appupdate/SettingUpdateDialogEvent;

    invoke-direct {v1, p0}, Lcom/moji/appupdate/SettingUpdateDialogEvent;-><init>(Lcom/moji/appupdate/UpgradeBaseCenter;)V

    invoke-virtual {v0, v1}, Lcom/moji/bus/Bus;->c(Ljava/lang/Object;)V

    goto :goto_0

    .line 61
    :cond_0
    invoke-static {}, Lcom/moji/bus/Bus;->a()Lcom/moji/bus/Bus;

    move-result-object v0

    new-instance v1, Lcom/moji/appupdate/SettingNoUpgradeEvent;

    invoke-direct {v1}, Lcom/moji/appupdate/SettingNoUpgradeEvent;-><init>()V

    invoke-virtual {v0, v1}, Lcom/moji/bus/Bus;->c(Ljava/lang/Object;)V

    :goto_0
    return-void
.end method

.method public b(Z)V
    .locals 2

    .line 52
    invoke-static {}, Lcom/moji/statistics/EventManager;->a()Lcom/moji/statistics/EventManager;

    move-result-object v0

    sget-object v1, Lcom/moji/statistics/EVENT_TAG;->UPDATE_BETA_INSTALL_STATE:Lcom/moji/statistics/EVENT_TAG;

    if-eqz p1, :cond_0

    const-string p1, "1"

    goto :goto_0

    :cond_0
    const-string p1, "0"

    :goto_0
    invoke-virtual {v0, v1, p1}, Lcom/moji/statistics/EventManager;->a(Lcom/moji/statistics/EVENT_TAG;Ljava/lang/String;)Lcom/moji/statistics/EventManager;

    return-void
.end method

.method public c(Z)V
    .locals 2

    .line 91
    invoke-static {}, Lcom/moji/statistics/EventManager;->a()Lcom/moji/statistics/EventManager;

    move-result-object v0

    sget-object v1, Lcom/moji/statistics/EVENT_TAG;->UPDATE_SET_ALERT_BETA_SHOW:Lcom/moji/statistics/EVENT_TAG;

    if-eqz p1, :cond_0

    const-string p1, "1"

    goto :goto_0

    :cond_0
    const-string p1, "0"

    :goto_0
    invoke-virtual {v0, v1, p1}, Lcom/moji/statistics/EventManager;->a(Lcom/moji/statistics/EVENT_TAG;Ljava/lang/String;)Lcom/moji/statistics/EventManager;

    return-void
.end method

.method public d(Z)V
    .locals 2

    .line 95
    invoke-static {}, Lcom/moji/statistics/EventManager;->a()Lcom/moji/statistics/EventManager;

    move-result-object v0

    sget-object v1, Lcom/moji/statistics/EVENT_TAG;->UPDATE_SET_ALERT_BETA_CLICK:Lcom/moji/statistics/EVENT_TAG;

    if-eqz p1, :cond_0

    const-string p1, "1"

    goto :goto_0

    :cond_0
    const-string p1, "0"

    :goto_0
    invoke-virtual {v0, v1, p1}, Lcom/moji/statistics/EventManager;->a(Lcom/moji/statistics/EVENT_TAG;Ljava/lang/String;)Lcom/moji/statistics/EventManager;

    return-void
.end method

.method public g()Z
    .locals 8

    .line 40
    invoke-static {}, Lcom/moji/tool/DeviceTool;->F()I

    move-result v0

    int-to-long v0, v0

    .line 41
    iget-object v2, p0, Lcom/moji/appupdate/UpgradeBetaInSettingCenter;->a:Lcom/moji/http/upt/bean/UpdateInfoResp;

    iget-wide v2, v2, Lcom/moji/http/upt/bean/UpdateInfoResp;->code:J

    const/4 v4, 0x1

    const/4 v5, 0x0

    cmp-long v6, v2, v0

    if-ltz v6, :cond_0

    const/4 v6, 0x1

    goto :goto_0

    :cond_0
    const/4 v6, 0x0

    :goto_0
    const/4 v7, 0x2

    .line 45
    new-array v7, v7, [Ljava/lang/Object;

    invoke-static {v0, v1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v0

    aput-object v0, v7, v5

    invoke-static {v2, v3}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v0

    aput-object v0, v7, v4

    invoke-static {v7}, Lcom/moji/statistics/EventParams;->getProperty([Ljava/lang/Object;)Lorg/json/JSONObject;

    move-result-object v0

    .line 46
    invoke-static {}, Lcom/moji/statistics/EventManager;->a()Lcom/moji/statistics/EventManager;

    move-result-object v1

    sget-object v2, Lcom/moji/statistics/EVENT_TAG;->UPDATE_BETA_VERSION_CHECK:Lcom/moji/statistics/EVENT_TAG;

    if-eqz v6, :cond_1

    const-string v3, "1"

    goto :goto_1

    :cond_1
    const-string v3, "0"

    :goto_1
    invoke-virtual {v1, v2, v3, v0}, Lcom/moji/statistics/EventManager;->a(Lcom/moji/statistics/EVENT_TAG;Ljava/lang/String;Lorg/json/JSONObject;)Lcom/moji/statistics/EventManager;

    return v6
.end method
