.class public abstract Lcom/moji/appupdate/UpgradeBaseCenter;
.super Ljava/lang/Object;
.source "UpgradeBaseCenter.java"


# instance fields
.field protected a:Lcom/moji/http/upt/bean/UpdateInfoResp;


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

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

    .line 43
    iput-object p1, p0, Lcom/moji/appupdate/UpgradeBaseCenter;->a:Lcom/moji/http/upt/bean/UpdateInfoResp;

    return-void
.end method


# virtual methods
.method public a(Ljava/io/File;Ljava/lang/String;)Ljava/io/File;
    .locals 2

    .line 47
    new-instance v0, Lcom/moji/appupdate/notification/DownloadNotification;

    invoke-direct {v0}, Lcom/moji/appupdate/notification/DownloadNotification;-><init>()V

    new-instance v1, Lcom/moji/appupdate/UpgradeBaseCenter$1;

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

    invoke-virtual {v0, p2, p1, v1}, Lcom/moji/appupdate/notification/DownloadNotification;->a(Ljava/lang/String;Ljava/io/File;Lcom/moji/appupdate/callback/DownLoadState;)V

    return-object p1
.end method

.method protected a(Landroid/content/Context;)Ljava/lang/String;
    .locals 4

    .line 166
    new-instance v0, Lcom/moji/appupdate/UpdatePreferce;

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

    .line 167
    invoke-virtual {v0}, Lcom/moji/appupdate/UpdatePreferce;->g()Ljava/lang/String;

    move-result-object v1

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

    move-result v2

    if-eqz v2, :cond_0

    .line 169
    invoke-virtual {p1}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;

    move-result-object v2

    .line 171
    :try_start_0
    invoke-virtual {p1}, Landroid/content/Context;->getPackageName()Ljava/lang/String;

    move-result-object p1

    const/16 v3, 0x40

    invoke-virtual {v2, p1, v3}, Landroid/content/pm/PackageManager;->getPackageInfo(Ljava/lang/String;I)Landroid/content/pm/PackageInfo;

    move-result-object p1

    if-eqz p1, :cond_0

    .line 173
    iget-object p1, p1, Landroid/content/pm/PackageInfo;->signatures:[Landroid/content/pm/Signature;

    const/4 v2, 0x0

    aget-object p1, p1, v2

    invoke-virtual {p1}, Landroid/content/pm/Signature;->toCharsString()Ljava/lang/String;

    move-result-object p1

    .line 174
    invoke-static {p1}, Lcom/moji/tool/MD5Util;->b(Ljava/lang/String;)Ljava/lang/String;

    move-result-object p1
    :try_end_0
    .catch Landroid/content/pm/PackageManager$NameNotFoundException; {:try_start_0 .. :try_end_0} :catch_1

    .line 175
    :try_start_1
    invoke-virtual {v0, p1}, Lcom/moji/appupdate/UpdatePreferce;->c(Ljava/lang/String;)V

    const-string v0, "AppUpdateBuilder"

    .line 176
    new-instance v1, Ljava/lang/StringBuilder;

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

    const-string v2, "App:"

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

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

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

    move-result-object v1

    invoke-static {v0, v1}, Lcom/moji/tool/log/MJLogger;->c(Ljava/lang/String;Ljava/lang/String;)V
    :try_end_1
    .catch Landroid/content/pm/PackageManager$NameNotFoundException; {:try_start_1 .. :try_end_1} :catch_0

    return-object p1

    :catch_0
    move-exception v0

    move-object v1, p1

    goto :goto_0

    :catch_1
    move-exception v0

    :goto_0
    const-string p1, "UpgradeBaseCenter"

    .line 180
    invoke-static {p1, v0}, Lcom/moji/tool/log/MJLogger;->a(Ljava/lang/String;Ljava/lang/Throwable;)V

    :cond_0
    return-object v1
.end method

.method public abstract a(Landroid/app/Activity;)V
.end method

.method public abstract a(Z)V
.end method

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

.method public a()Z
    .locals 5

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

    move-result-object v0

    .line 87
    invoke-static {}, Lcom/moji/tool/AppDelegate;->a()Landroid/content/Context;

    move-result-object v1

    .line 88
    invoke-virtual {v0}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;

    move-result-object v2

    .line 89
    invoke-virtual {p0, v0}, Lcom/moji/appupdate/UpgradeBaseCenter;->a(Ljava/io/File;)Z

    move-result v0

    const/4 v3, 0x1

    if-eqz v0, :cond_0

    invoke-virtual {p0, v2}, Lcom/moji/appupdate/UpgradeBaseCenter;->a(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_0

    invoke-virtual {p0, v1, v2}, Lcom/moji/appupdate/UpgradeBaseCenter;->a(Landroid/content/Context;Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_0

    invoke-virtual {p0, v1, v2}, Lcom/moji/appupdate/UpgradeBaseCenter;->b(Landroid/content/Context;Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_0

    const/4 v0, 0x1

    goto :goto_0

    :cond_0
    const/4 v0, 0x0

    :goto_0
    if-eqz v0, :cond_1

    const-string v1, ""

    const-string v2, ""

    .line 91
    sget-object v4, Lcom/moji/appupdate/CheckFailedType;->SUCCESS:Lcom/moji/appupdate/CheckFailedType;

    invoke-virtual {p0, v3, v1, v2, v4}, Lcom/moji/appupdate/UpgradeBaseCenter;->a(ZLjava/lang/String;Ljava/lang/String;Lcom/moji/appupdate/CheckFailedType;)V

    :cond_1
    return v0
.end method

.method public a(Landroid/app/Activity;ZLjava/lang/String;Ljava/lang/String;Ljava/lang/String;Landroid/content/DialogInterface$OnClickListener;Landroid/content/DialogInterface$OnClickListener;)Z
    .locals 1

    if-eqz p1, :cond_1

    .line 255
    invoke-virtual {p1}, Landroid/app/Activity;->isFinishing()Z

    move-result v0

    if-eqz v0, :cond_0

    goto :goto_0

    .line 259
    :cond_0
    new-instance v0, Lcom/moji/appupdate/view/AppUpdateDialog$Builder;

    invoke-direct {v0, p1}, Lcom/moji/appupdate/view/AppUpdateDialog$Builder;-><init>(Landroid/content/Context;)V

    .line 260
    invoke-virtual {v0, p4}, Lcom/moji/appupdate/view/AppUpdateDialog$Builder;->c(Ljava/lang/String;)Lcom/moji/appupdate/view/AppUpdateDialog$Builder;

    move-result-object p1

    .line 261
    invoke-virtual {p1, p2}, Lcom/moji/appupdate/view/AppUpdateDialog$Builder;->a(Z)Lcom/moji/appupdate/view/AppUpdateDialog$Builder;

    move-result-object p1

    .line 262
    invoke-virtual {p1, p3}, Lcom/moji/appupdate/view/AppUpdateDialog$Builder;->a(Ljava/lang/String;)Lcom/moji/appupdate/view/AppUpdateDialog$Builder;

    move-result-object p1

    .line 263
    invoke-virtual {p1, p5}, Lcom/moji/appupdate/view/AppUpdateDialog$Builder;->b(Ljava/lang/String;)Lcom/moji/appupdate/view/AppUpdateDialog$Builder;

    move-result-object p1

    .line 264
    invoke-virtual {p1, p6}, Lcom/moji/appupdate/view/AppUpdateDialog$Builder;->a(Landroid/content/DialogInterface$OnClickListener;)Lcom/moji/appupdate/view/AppUpdateDialog$Builder;

    move-result-object p1

    .line 265
    invoke-virtual {p1, p7}, Lcom/moji/appupdate/view/AppUpdateDialog$Builder;->b(Landroid/content/DialogInterface$OnClickListener;)Lcom/moji/appupdate/view/AppUpdateDialog$Builder;

    move-result-object p1

    invoke-virtual {p1}, Lcom/moji/appupdate/view/AppUpdateDialog$Builder;->a()Lcom/moji/appupdate/view/AppUpdateDialog;

    move-result-object p1

    invoke-virtual {p1}, Lcom/moji/appupdate/view/AppUpdateDialog;->show()V

    const/4 p1, 0x1

    .line 266
    invoke-virtual {p0, p1}, Lcom/moji/appupdate/UpgradeBaseCenter;->c(Z)V

    return p1

    :cond_1
    :goto_0
    const/4 p1, 0x0

    .line 256
    invoke-virtual {p0, p1}, Lcom/moji/appupdate/UpgradeBaseCenter;->c(Z)V

    return p1
.end method

.method public a(Landroid/content/Context;Ljava/lang/String;)Z
    .locals 2

    .line 121
    invoke-virtual {p0, p2}, Lcom/moji/appupdate/UpgradeBaseCenter;->c(Ljava/lang/String;)Ljava/lang/String;

    move-result-object p2

    .line 122
    invoke-virtual {p1}, Landroid/content/Context;->getPackageName()Ljava/lang/String;

    move-result-object p1

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

    move-result v0

    if-nez v0, :cond_0

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

    move-result v0

    if-eqz v0, :cond_0

    const/4 p1, 0x1

    return p1

    .line 126
    :cond_0
    sget-object v0, Lcom/moji/appupdate/CheckFailedType;->PACKAGENAME:Lcom/moji/appupdate/CheckFailedType;

    const/4 v1, 0x0

    invoke-virtual {p0, v1, p1, p2, v0}, Lcom/moji/appupdate/UpgradeBaseCenter;->a(ZLjava/lang/String;Ljava/lang/String;Lcom/moji/appupdate/CheckFailedType;)V

    return v1
.end method

.method public a(Ljava/io/File;)Z
    .locals 3

    .line 102
    invoke-virtual {p0, p1}, Lcom/moji/appupdate/UpgradeBaseCenter;->c(Ljava/io/File;)Ljava/lang/String;

    move-result-object p1

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

    move-result v0

    if-nez v0, :cond_0

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

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

    invoke-virtual {p1, v0}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_0

    const/4 p1, 0x1

    return p1

    .line 106
    :cond_0
    iget-object v0, p0, Lcom/moji/appupdate/UpgradeBaseCenter;->a:Lcom/moji/http/upt/bean/UpdateInfoResp;

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

    sget-object v1, Lcom/moji/appupdate/CheckFailedType;->APKMD5:Lcom/moji/appupdate/CheckFailedType;

    const/4 v2, 0x0

    invoke-virtual {p0, v2, v0, p1, v1}, Lcom/moji/appupdate/UpgradeBaseCenter;->a(ZLjava/lang/String;Ljava/lang/String;Lcom/moji/appupdate/CheckFailedType;)V

    return v2
.end method

.method public a(Ljava/lang/String;)Z
    .locals 3

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

    move-result v0

    .line 112
    invoke-virtual {p0, p1}, Lcom/moji/appupdate/UpgradeBaseCenter;->d(Ljava/lang/String;)I

    move-result p1

    if-lt p1, v0, :cond_0

    const/4 p1, 0x1

    return p1

    .line 116
    :cond_0
    invoke-static {p1}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v0

    invoke-static {p1}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object p1

    sget-object v1, Lcom/moji/appupdate/CheckFailedType;->VERSIONCODE:Lcom/moji/appupdate/CheckFailedType;

    const/4 v2, 0x0

    invoke-virtual {p0, v2, v0, p1, v1}, Lcom/moji/appupdate/UpgradeBaseCenter;->a(ZLjava/lang/String;Ljava/lang/String;Lcom/moji/appupdate/CheckFailedType;)V

    return v2
.end method

.method protected a(Ljava/lang/String;Ljava/io/File;)Z
    .locals 2

    .line 292
    invoke-virtual {p2}, Ljava/io/File;->exists()Z

    move-result v0

    if-eqz v0, :cond_1

    .line 293
    invoke-static {p2}, Lcom/moji/tool/MD5Util;->a(Ljava/io/File;)Ljava/lang/String;

    move-result-object v0

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

    move-result v1

    if-nez v1, :cond_0

    invoke-virtual {v0, p1}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result p1

    if-eqz p1, :cond_0

    const/4 p1, 0x1

    return p1

    .line 297
    :cond_0
    invoke-virtual {p2}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;

    move-result-object p1

    invoke-static {p1}, Lcom/moji/tool/FileTool;->d(Ljava/lang/String;)Z

    :cond_1
    const/4 p1, 0x0

    return p1
.end method

.method protected b(Ljava/lang/String;)Ljava/lang/String;
    .locals 3

    .line 193
    invoke-static {}, Lcom/moji/tool/AppDelegate;->a()Landroid/content/Context;

    move-result-object v0

    invoke-virtual {v0}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;

    move-result-object v0

    const/16 v1, 0x40

    .line 194
    invoke-virtual {v0, p1, v1}, Landroid/content/pm/PackageManager;->getPackageArchiveInfo(Ljava/lang/String;I)Landroid/content/pm/PackageInfo;

    move-result-object p1

    if-eqz p1, :cond_0

    .line 196
    iget-object p1, p1, Landroid/content/pm/PackageInfo;->signatures:[Landroid/content/pm/Signature;

    const/4 v0, 0x0

    aget-object p1, p1, v0

    invoke-virtual {p1}, Landroid/content/pm/Signature;->toCharsString()Ljava/lang/String;

    move-result-object p1

    .line 197
    invoke-static {p1}, Lcom/moji/tool/MD5Util;->b(Ljava/lang/String;)Ljava/lang/String;

    move-result-object p1

    const-string v0, "AppUpdateBuilder"

    .line 198
    new-instance v1, Ljava/lang/StringBuilder;

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

    const-string v2, "Apk:"

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

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

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

    move-result-object v1

    invoke-static {v0, v1}, Lcom/moji/tool/log/MJLogger;->c(Ljava/lang/String;Ljava/lang/String;)V

    return-object p1

    :cond_0
    const-string p1, ""

    return-object p1
.end method

.method public abstract b()V
.end method

.method public b(Ljava/io/File;)V
    .locals 5

    .line 142
    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

    const/high16 v1, 0x14000000

    .line 143
    invoke-virtual {v0, v1}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;

    .line 144
    new-instance v1, Ljava/lang/StringBuilder;

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

    const-string v2, "file://"

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

    invoke-virtual {p1}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;

    move-result-object v2

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

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

    move-result-object v1

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

    move-result-object v1

    const-string v2, "application/vnd.android.package-archive"

    invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->setDataAndType(Landroid/net/Uri;Ljava/lang/String;)Landroid/content/Intent;

    .line 145
    sget v1, Landroid/os/Build$VERSION;->SDK_INT:I

    const/4 v2, 0x1

    const/16 v3, 0x18

    if-gt v3, v1, :cond_0

    .line 146
    invoke-static {}, Lcom/moji/tool/AppDelegate;->a()Landroid/content/Context;

    move-result-object v1

    .line 147
    new-instance v3, Ljava/lang/StringBuilder;

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

    invoke-virtual {v1}, Landroid/content/Context;->getPackageName()Ljava/lang/String;

    move-result-object v4

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

    const-string v4, ".storage.fileprovider"

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

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

    move-result-object v3

    invoke-static {v1, v3, p1}, Landroid/support/v4/content/FileProvider;->getUriForFile(Landroid/content/Context;Ljava/lang/String;Ljava/io/File;)Landroid/net/Uri;

    move-result-object p1

    const-string v1, "application/vnd.android.package-archive"

    .line 148
    invoke-virtual {v0, p1, v1}, Landroid/content/Intent;->setDataAndType(Landroid/net/Uri;Ljava/lang/String;)Landroid/content/Intent;

    .line 149
    invoke-virtual {v0, v2}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;

    .line 151
    :cond_0
    invoke-static {}, Lcom/moji/tool/AppDelegate;->a()Landroid/content/Context;

    move-result-object p1

    invoke-virtual {p1, v0}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V

    .line 152
    invoke-virtual {p0, v2}, Lcom/moji/appupdate/UpgradeBaseCenter;->b(Z)V

    return-void
.end method

.method public abstract b(Z)V
.end method

.method public b(Landroid/content/Context;Ljava/lang/String;)Z
    .locals 2

    .line 131
    invoke-virtual {p0, p1}, Lcom/moji/appupdate/UpgradeBaseCenter;->a(Landroid/content/Context;)Ljava/lang/String;

    move-result-object p1

    .line 132
    invoke-virtual {p0, p2}, Lcom/moji/appupdate/UpgradeBaseCenter;->b(Ljava/lang/String;)Ljava/lang/String;

    move-result-object p2

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

    move-result v0

    if-nez v0, :cond_0

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

    move-result v0

    if-nez v0, :cond_0

    invoke-virtual {p1, p2}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_0

    const/4 p1, 0x1

    return p1

    .line 136
    :cond_0
    sget-object v0, Lcom/moji/appupdate/CheckFailedType;->SIGNDAILED:Lcom/moji/appupdate/CheckFailedType;

    const/4 v1, 0x0

    invoke-virtual {p0, v1, p1, p2, v0}, Lcom/moji/appupdate/UpgradeBaseCenter;->a(ZLjava/lang/String;Ljava/lang/String;Lcom/moji/appupdate/CheckFailedType;)V

    return v1
.end method

.method protected c()Ljava/lang/String;
    .locals 2

    .line 278
    invoke-static {}, Lcom/moji/tool/DeviceTool;->o()Z

    move-result v0

    if-nez v0, :cond_0

    .line 279
    invoke-static {}, Lcom/moji/tool/AppDelegate;->a()Landroid/content/Context;

    move-result-object v0

    sget v1, Lcom/moji/appupdate/R$string;->apk_update_no_network:I

    invoke-virtual {v0, v1}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object v0

    return-object v0

    :cond_0
    const/4 v0, 0x0

    return-object v0
.end method

.method protected c(Ljava/io/File;)Ljava/lang/String;
    .locals 1

    .line 243
    invoke-virtual {p1}, Ljava/io/File;->exists()Z

    move-result v0

    if-eqz v0, :cond_0

    .line 244
    invoke-static {p1}, Lcom/moji/tool/MD5Util;->a(Ljava/io/File;)Ljava/lang/String;

    move-result-object p1

    return-object p1

    :cond_0
    const-string p1, "ApkType"

    const-string v0, "apkFile is not exists"

    .line 246
    invoke-static {p1, v0}, Lcom/moji/tool/log/MJLogger;->c(Ljava/lang/String;Ljava/lang/String;)V

    const-string p1, ""

    return-object p1
.end method

.method protected c(Ljava/lang/String;)Ljava/lang/String;
    .locals 2

    .line 211
    invoke-static {}, Lcom/moji/tool/AppDelegate;->a()Landroid/content/Context;

    move-result-object v0

    invoke-virtual {v0}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;

    move-result-object v0

    const/16 v1, 0x40

    .line 212
    invoke-virtual {v0, p1, v1}, Landroid/content/pm/PackageManager;->getPackageArchiveInfo(Ljava/lang/String;I)Landroid/content/pm/PackageInfo;

    move-result-object p1

    if-eqz p1, :cond_0

    .line 214
    iget-object p1, p1, Landroid/content/pm/PackageInfo;->packageName:Ljava/lang/String;

    return-object p1

    :cond_0
    const-string p1, ""

    return-object p1
.end method

.method public abstract c(Z)V
.end method

.method protected d(Ljava/lang/String;)I
    .locals 2

    .line 227
    invoke-static {}, Lcom/moji/tool/AppDelegate;->a()Landroid/content/Context;

    move-result-object v0

    invoke-virtual {v0}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;

    move-result-object v0

    const/16 v1, 0x40

    .line 228
    invoke-virtual {v0, p1, v1}, Landroid/content/pm/PackageManager;->getPackageArchiveInfo(Ljava/lang/String;I)Landroid/content/pm/PackageInfo;

    move-result-object p1

    if-eqz p1, :cond_0

    .line 230
    iget p1, p1, Landroid/content/pm/PackageInfo;->versionCode:I

    return p1

    :cond_0
    const/4 p1, 0x0

    return p1
.end method

.method protected d()Ljava/io/File;
    .locals 3

    .line 304
    invoke-static {}, Lcom/moji/tool/FilePathUtil;->f()Ljava/lang/String;

    move-result-object v0

    .line 305
    new-instance v1, Ljava/io/File;

    invoke-direct {v1, v0}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    .line 306
    invoke-virtual {v1}, Ljava/io/File;->exists()Z

    move-result v2

    if-nez v2, :cond_0

    .line 307
    invoke-virtual {v1}, Ljava/io/File;->mkdirs()Z

    .line 309
    :cond_0
    new-instance v1, Ljava/io/File;

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

    invoke-virtual {v2}, Lcom/moji/http/upt/bean/UpdateInfoResp;->getAPKName()Ljava/lang/String;

    move-result-object v2

    invoke-direct {v1, v0, v2}, Ljava/io/File;-><init>(Ljava/lang/String;Ljava/lang/String;)V

    return-object v1
.end method

.method protected e()V
    .locals 3

    .line 350
    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 351
    new-instance v1, Ljava/lang/StringBuilder;

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

    const-string v2, "market://details?id="

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

    invoke-static {}, Lcom/moji/common/MJProperty;->r()Ljava/lang/String;

    move-result-object v2

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

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

    move-result-object v1

    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;

    const-string v1, ""

    .line 352
    invoke-static {v0, v1}, Landroid/content/Intent;->createChooser(Landroid/content/Intent;Ljava/lang/CharSequence;)Landroid/content/Intent;

    move-result-object v0

    const/high16 v1, 0x10000000

    .line 353
    invoke-virtual {v0, v1}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;

    .line 354
    invoke-static {}, Lcom/moji/tool/AppDelegate;->a()Landroid/content/Context;

    move-result-object v1

    invoke-virtual {v1, v0}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V

    return-void
.end method

.method protected e(Ljava/lang/String;)Z
    .locals 6

    .line 314
    new-instance v0, Lcom/moji/appupdate/UpdatePreferce;

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

    .line 315
    invoke-virtual {v0}, Lcom/moji/appupdate/UpdatePreferce;->c()Ljava/lang/String;

    move-result-object v1

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

    move-result p1

    const/4 v1, 0x1

    if-eqz p1, :cond_1

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

    move-result-wide v2

    invoke-virtual {v0}, Lcom/moji/appupdate/UpdatePreferce;->e()J

    move-result-wide v4

    sub-long/2addr v2, v4

    const-wide/32 v4, 0x19bfcc00

    cmp-long p1, v2, v4

    if-lez p1, :cond_0

    goto :goto_0

    :cond_0
    const/4 v1, 0x0

    :goto_0
    return v1

    :cond_1
    return v1
.end method

.method protected f()Z
    .locals 3

    .line 358
    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 359
    new-instance v1, Ljava/lang/StringBuilder;

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

    const-string v2, "market://details?id="

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

    invoke-static {}, Lcom/moji/common/MJProperty;->r()Ljava/lang/String;

    move-result-object v2

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

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

    move-result-object v1

    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;

    .line 360
    invoke-static {}, Lcom/moji/tool/AppDelegate;->a()Landroid/content/Context;

    move-result-object v1

    invoke-virtual {v1}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;

    move-result-object v1

    const/4 v2, 0x0

    invoke-virtual {v1, v0, v2}, Landroid/content/pm/PackageManager;->queryIntentActivities(Landroid/content/Intent;I)Ljava/util/List;

    move-result-object v0

    if-eqz v0, :cond_0

    .line 361
    invoke-interface {v0}, Ljava/util/List;->isEmpty()Z

    move-result v0

    if-nez v0, :cond_0

    const/4 v2, 0x1

    :cond_0
    return v2
.end method

.method protected f(Ljava/lang/String;)Z
    .locals 6

    .line 325
    new-instance v0, Lcom/moji/appupdate/UpdatePreferce;

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

    .line 326
    invoke-virtual {v0}, Lcom/moji/appupdate/UpdatePreferce;->d()Ljava/lang/String;

    move-result-object v1

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

    move-result p1

    const/4 v1, 0x1

    if-eqz p1, :cond_1

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

    move-result-wide v2

    invoke-virtual {v0}, Lcom/moji/appupdate/UpdatePreferce;->f()J

    move-result-wide v4

    sub-long/2addr v2, v4

    const-wide/32 v4, 0x19bfcc00

    cmp-long p1, v2, v4

    if-lez p1, :cond_0

    goto :goto_0

    :cond_0
    const/4 v1, 0x0

    :goto_0
    return v1

    :cond_1
    return v1
.end method

.method protected g(Ljava/lang/String;)V
    .locals 3

    .line 335
    new-instance v0, Lcom/moji/appupdate/UpdatePreferce;

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

    .line 336
    invoke-virtual {v0, p1}, Lcom/moji/appupdate/UpdatePreferce;->b(Ljava/lang/String;)V

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

    move-result-wide v1

    invoke-virtual {v0, v1, v2}, Lcom/moji/appupdate/UpdatePreferce;->b(J)V

    return-void
.end method

.method protected h(Ljava/lang/String;)V
    .locals 3

    .line 341
    new-instance v0, Lcom/moji/appupdate/UpdatePreferce;

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

    .line 342
    invoke-virtual {v0, p1}, Lcom/moji/appupdate/UpdatePreferce;->a(Ljava/lang/String;)V

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

    move-result-wide v1

    invoke-virtual {v0, v1, v2}, Lcom/moji/appupdate/UpdatePreferce;->a(J)V

    return-void
.end method
