今奥全景相机
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1550 lines
45 KiB

.class public Lcom/viatech/util/OnlineUpgradeManager;
.super Ljava/lang/Object;
.source "OnlineUpgradeManager.java"
# interfaces
.implements Lcom/viatech/util/HttpDownloadManager$OnDownloadListener;
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/viatech/util/OnlineUpgradeManager$UpgradeInfo;
}
.end annotation
# static fields
.field private static final CHECK_INTERVAL:J = 0x5265c00L
.field private static final LAST_CHANGELOG:Ljava/lang/String; = "last_changelog"
.field private static final LAST_CHECK_TIME:Ljava/lang/String; = "last_check_time"
.field private static final LAST_URL:Ljava/lang/String; = "last_url"
.field private static final LAST_VERSION_CODE:Ljava/lang/String; = "last_version_code"
.field private static final LAST_VERSION_NAME:Ljava/lang/String; = "last_version_name"
.field private static final TAG:Ljava/lang/String; = "VPAI_OnlineUpgradeManager"
.field private static final UPGRADE_APK_NAME:Ljava/lang/String; = "VPAI.apk"
.field private static UPGRADE_APK_SAVE_PATH:Ljava/lang/String; = null
.field private static final UPGRADE_INFO_URL:Ljava/lang/String; = "https://api.vpai360.com/upgrade/appcheck?"
.field private static sIns:Lcom/viatech/util/OnlineUpgradeManager;
# instance fields
.field private mContext:Landroid/content/Context;
.field private mCurLanguage:Ljava/lang/String;
.field private mDestroyed:Z
.field private mDownloadBuilder:Lcom/viatech/widget/VPaiDialog$Builder;
.field private mDownloadDialog:Landroid/app/Dialog;
.field private mDownloading:Z
.field private mHandler:Landroid/os/Handler;
.field private mInstallBuilder:Lcom/viatech/widget/VPaiDialog$Builder;
.field private mInstallDialog:Landroid/app/Dialog;
.field private mProgressDialog:Landroid/app/ProgressDialog;
.field private mTipDialog:Landroid/app/Dialog;
.field private mUpgradeInfo:Lcom/viatech/util/OnlineUpgradeManager$UpgradeInfo;
.field private mUpgradeTask:Lcom/viatech/util/DownloadTask;
.field private mVersionCode:I
# direct methods
.method static constructor <clinit>()V
.locals 1
.prologue
.line 43
sget-object v0, Lcom/viatech/Config;->b:Ljava/lang/String;
sput-object v0, Lcom/viatech/util/OnlineUpgradeManager;->UPGRADE_APK_SAVE_PATH:Ljava/lang/String;
return-void
.end method
.method private constructor <init>(Landroid/content/Context;)V
.locals 5
.prologue
const v4, 0x7f0701c2
const v3, 0x7f07012d
const/4 v1, 0x0
.line 85
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 58
new-instance v0, Landroid/os/Handler;
invoke-direct {v0}, Landroid/os/Handler;-><init>()V
iput-object v0, p0, Lcom/viatech/util/OnlineUpgradeManager;->mHandler:Landroid/os/Handler;
.line 59
const/4 v0, 0x0
iput-object v0, p0, Lcom/viatech/util/OnlineUpgradeManager;->mUpgradeTask:Lcom/viatech/util/DownloadTask;
.line 61
iput-boolean v1, p0, Lcom/viatech/util/OnlineUpgradeManager;->mDownloading:Z
.line 64
iput-boolean v1, p0, Lcom/viatech/util/OnlineUpgradeManager;->mDestroyed:Z
.line 65
iput v1, p0, Lcom/viatech/util/OnlineUpgradeManager;->mVersionCode:I
.line 66
const-string v0, ""
iput-object v0, p0, Lcom/viatech/util/OnlineUpgradeManager;->mCurLanguage:Ljava/lang/String;
.line 86
iput-object p1, p0, Lcom/viatech/util/OnlineUpgradeManager;->mContext:Landroid/content/Context;
.line 87
iget-object v0, p0, Lcom/viatech/util/OnlineUpgradeManager;->mContext:Landroid/content/Context;
invoke-virtual {v0}, Landroid/content/Context;->getExternalCacheDir()Ljava/io/File;
move-result-object v0
.line 88
if-nez v0, :cond_0
.line 89
iget-object v0, p0, Lcom/viatech/util/OnlineUpgradeManager;->mContext:Landroid/content/Context;
invoke-virtual {v0}, Landroid/content/Context;->getCacheDir()Ljava/io/File;
move-result-object v0
.line 91
:cond_0
if-eqz v0, :cond_1
.line 92
invoke-virtual {v0}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;
move-result-object v0
sput-object v0, Lcom/viatech/util/OnlineUpgradeManager;->UPGRADE_APK_SAVE_PATH:Ljava/lang/String;
.line 94
:cond_1
invoke-direct {p0}, Lcom/viatech/util/OnlineUpgradeManager;->getVersionCode()I
move-result v0
iput v0, p0, Lcom/viatech/util/OnlineUpgradeManager;->mVersionCode:I
.line 95
invoke-direct {p0}, Lcom/viatech/util/OnlineUpgradeManager;->getmCurLanguage()Ljava/lang/String;
move-result-object v0
iput-object v0, p0, Lcom/viatech/util/OnlineUpgradeManager;->mCurLanguage:Ljava/lang/String;
.line 98
new-instance v0, Lcom/viatech/widget/VPaiDialog$Builder;
iget-object v1, p0, Lcom/viatech/util/OnlineUpgradeManager;->mContext:Landroid/content/Context;
invoke-direct {v0, v1}, Lcom/viatech/widget/VPaiDialog$Builder;-><init>(Landroid/content/Context;)V
iput-object v0, p0, Lcom/viatech/util/OnlineUpgradeManager;->mInstallBuilder:Lcom/viatech/widget/VPaiDialog$Builder;
.line 99
iget-object v0, p0, Lcom/viatech/util/OnlineUpgradeManager;->mInstallBuilder:Lcom/viatech/widget/VPaiDialog$Builder;
invoke-virtual {v0, v4}, Lcom/viatech/widget/VPaiDialog$Builder;->setTitle(I)Landroid/app/AlertDialog$Builder;
.line 100
iget-object v0, p0, Lcom/viatech/util/OnlineUpgradeManager;->mInstallBuilder:Lcom/viatech/widget/VPaiDialog$Builder;
const v1, 0x7f0700c3
invoke-virtual {v0, v1}, Lcom/viatech/widget/VPaiDialog$Builder;->setMessage(I)Landroid/app/AlertDialog$Builder;
.line 101
iget-object v0, p0, Lcom/viatech/util/OnlineUpgradeManager;->mInstallBuilder:Lcom/viatech/widget/VPaiDialog$Builder;
new-instance v1, Lcom/viatech/util/OnlineUpgradeManager$1;
invoke-direct {v1, p0}, Lcom/viatech/util/OnlineUpgradeManager$1;-><init>(Lcom/viatech/util/OnlineUpgradeManager;)V
invoke-virtual {v0, v3, v1}, Lcom/viatech/widget/VPaiDialog$Builder;->setPositiveButton(ILandroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;
.line 130
iget-object v0, p0, Lcom/viatech/util/OnlineUpgradeManager;->mInstallBuilder:Lcom/viatech/widget/VPaiDialog$Builder;
const v1, 0x7f07005c
new-instance v2, Lcom/viatech/util/OnlineUpgradeManager$2;
invoke-direct {v2, p0}, Lcom/viatech/util/OnlineUpgradeManager$2;-><init>(Lcom/viatech/util/OnlineUpgradeManager;)V
invoke-virtual {v0, v1, v2}, Lcom/viatech/widget/VPaiDialog$Builder;->setNeutralButton(ILandroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;
.line 136
iget-object v0, p0, Lcom/viatech/util/OnlineUpgradeManager;->mInstallBuilder:Lcom/viatech/widget/VPaiDialog$Builder;
invoke-virtual {v0}, Lcom/viatech/widget/VPaiDialog$Builder;->create()Landroid/app/AlertDialog;
move-result-object v0
iput-object v0, p0, Lcom/viatech/util/OnlineUpgradeManager;->mInstallDialog:Landroid/app/Dialog;
.line 139
new-instance v0, Lcom/viatech/widget/VPaiDialog$Builder;
iget-object v1, p0, Lcom/viatech/util/OnlineUpgradeManager;->mContext:Landroid/content/Context;
invoke-direct {v0, v1}, Lcom/viatech/widget/VPaiDialog$Builder;-><init>(Landroid/content/Context;)V
.line 140
invoke-virtual {v0, v4}, Lcom/viatech/widget/VPaiDialog$Builder;->setTitle(I)Landroid/app/AlertDialog$Builder;
.line 141
const v1, 0x7f0700c7
invoke-virtual {v0, v1}, Lcom/viatech/widget/VPaiDialog$Builder;->setMessage(I)Landroid/app/AlertDialog$Builder;
.line 142
new-instance v1, Lcom/viatech/util/OnlineUpgradeManager$3;
invoke-direct {v1, p0}, Lcom/viatech/util/OnlineUpgradeManager$3;-><init>(Lcom/viatech/util/OnlineUpgradeManager;)V
invoke-virtual {v0, v3, v1}, Lcom/viatech/widget/VPaiDialog$Builder;->setPositiveButton(ILandroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;
.line 148
invoke-virtual {v0}, Lcom/viatech/widget/VPaiDialog$Builder;->create()Landroid/app/AlertDialog;
move-result-object v0
iput-object v0, p0, Lcom/viatech/util/OnlineUpgradeManager;->mTipDialog:Landroid/app/Dialog;
.line 151
new-instance v0, Lcom/viatech/widget/VPaiDialog$Builder;
iget-object v1, p0, Lcom/viatech/util/OnlineUpgradeManager;->mContext:Landroid/content/Context;
invoke-direct {v0, v1}, Lcom/viatech/widget/VPaiDialog$Builder;-><init>(Landroid/content/Context;)V
iput-object v0, p0, Lcom/viatech/util/OnlineUpgradeManager;->mDownloadBuilder:Lcom/viatech/widget/VPaiDialog$Builder;
.line 152
iget-object v0, p0, Lcom/viatech/util/OnlineUpgradeManager;->mDownloadBuilder:Lcom/viatech/widget/VPaiDialog$Builder;
iget-object v1, p0, Lcom/viatech/util/OnlineUpgradeManager;->mContext:Landroid/content/Context;
const v2, 0x7f0701b7
invoke-virtual {v1, v2}, Landroid/content/Context;->getString(I)Ljava/lang/String;
move-result-object v1
invoke-virtual {v0, v1}, Lcom/viatech/widget/VPaiDialog$Builder;->setTitle(Ljava/lang/CharSequence;)Landroid/app/AlertDialog$Builder;
.line 153
iget-object v0, p0, Lcom/viatech/util/OnlineUpgradeManager;->mDownloadBuilder:Lcom/viatech/widget/VPaiDialog$Builder;
iget-object v1, p0, Lcom/viatech/util/OnlineUpgradeManager;->mContext:Landroid/content/Context;
const v2, 0x7f0701b6
invoke-virtual {v1, v2}, Landroid/content/Context;->getString(I)Ljava/lang/String;
move-result-object v1
invoke-virtual {v0, v1}, Lcom/viatech/widget/VPaiDialog$Builder;->setMessage(Ljava/lang/CharSequence;)Landroid/app/AlertDialog$Builder;
.line 180
iget-object v0, p0, Lcom/viatech/util/OnlineUpgradeManager;->mDownloadBuilder:Lcom/viatech/widget/VPaiDialog$Builder;
iget-object v1, p0, Lcom/viatech/util/OnlineUpgradeManager;->mContext:Landroid/content/Context;
const v2, 0x7f07008c
invoke-virtual {v1, v2}, Landroid/content/Context;->getString(I)Ljava/lang/String;
move-result-object v1
new-instance v2, Lcom/viatech/util/OnlineUpgradeManager$4;
invoke-direct {v2, p0}, Lcom/viatech/util/OnlineUpgradeManager$4;-><init>(Lcom/viatech/util/OnlineUpgradeManager;)V
invoke-virtual {v0, v1, v2}, Lcom/viatech/widget/VPaiDialog$Builder;->setPositiveButton(Ljava/lang/CharSequence;Landroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;
.line 194
iget-object v0, p0, Lcom/viatech/util/OnlineUpgradeManager;->mDownloadBuilder:Lcom/viatech/widget/VPaiDialog$Builder;
iget-object v1, p0, Lcom/viatech/util/OnlineUpgradeManager;->mContext:Landroid/content/Context;
const v2, 0x7f07005f
invoke-virtual {v1, v2}, Landroid/content/Context;->getString(I)Ljava/lang/String;
move-result-object v1
new-instance v2, Lcom/viatech/util/OnlineUpgradeManager$5;
invoke-direct {v2, p0}, Lcom/viatech/util/OnlineUpgradeManager$5;-><init>(Lcom/viatech/util/OnlineUpgradeManager;)V
invoke-virtual {v0, v1, v2}, Lcom/viatech/widget/VPaiDialog$Builder;->setNegativeButton(Ljava/lang/CharSequence;Landroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;
.line 201
iget-object v0, p0, Lcom/viatech/util/OnlineUpgradeManager;->mDownloadBuilder:Lcom/viatech/widget/VPaiDialog$Builder;
invoke-virtual {v0}, Lcom/viatech/widget/VPaiDialog$Builder;->create()Landroid/app/AlertDialog;
move-result-object v0
iput-object v0, p0, Lcom/viatech/util/OnlineUpgradeManager;->mDownloadDialog:Landroid/app/Dialog;
.line 204
new-instance v0, Landroid/app/ProgressDialog;
iget-object v1, p0, Lcom/viatech/util/OnlineUpgradeManager;->mContext:Landroid/content/Context;
const/4 v2, 0x2
invoke-direct {v0, v1, v2}, Landroid/app/ProgressDialog;-><init>(Landroid/content/Context;I)V
iput-object v0, p0, Lcom/viatech/util/OnlineUpgradeManager;->mProgressDialog:Landroid/app/ProgressDialog;
.line 205
iget-object v0, p0, Lcom/viatech/util/OnlineUpgradeManager;->mProgressDialog:Landroid/app/ProgressDialog;
const/4 v1, 0x1
invoke-virtual {v0, v1}, Landroid/app/ProgressDialog;->setProgressStyle(I)V
.line 206
iget-object v0, p0, Lcom/viatech/util/OnlineUpgradeManager;->mProgressDialog:Landroid/app/ProgressDialog;
const/16 v1, 0x64
invoke-virtual {v0, v1}, Landroid/app/ProgressDialog;->setMax(I)V
.line 207
iget-object v0, p0, Lcom/viatech/util/OnlineUpgradeManager;->mProgressDialog:Landroid/app/ProgressDialog;
iget-object v1, p0, Lcom/viatech/util/OnlineUpgradeManager;->mContext:Landroid/content/Context;
const v2, 0x7f0701b5
invoke-virtual {v1, v2}, Landroid/content/Context;->getString(I)Ljava/lang/String;
move-result-object v1
invoke-virtual {v0, v1}, Landroid/app/ProgressDialog;->setTitle(Ljava/lang/CharSequence;)V
.line 208
iget-object v0, p0, Lcom/viatech/util/OnlineUpgradeManager;->mProgressDialog:Landroid/app/ProgressDialog;
const/4 v1, -0x1
iget-object v2, p0, Lcom/viatech/util/OnlineUpgradeManager;->mContext:Landroid/content/Context;
const v3, 0x7f07005d
invoke-virtual {v2, v3}, Landroid/content/Context;->getString(I)Ljava/lang/String;
move-result-object v2
new-instance v3, Lcom/viatech/util/OnlineUpgradeManager$6;
invoke-direct {v3, p0}, Lcom/viatech/util/OnlineUpgradeManager$6;-><init>(Lcom/viatech/util/OnlineUpgradeManager;)V
invoke-virtual {v0, v1, v2, v3}, Landroid/app/ProgressDialog;->setButton(ILjava/lang/CharSequence;Landroid/content/DialogInterface$OnClickListener;)V
.line 218
iget-object v0, p0, Lcom/viatech/util/OnlineUpgradeManager;->mProgressDialog:Landroid/app/ProgressDialog;
const/4 v1, -0x2
iget-object v2, p0, Lcom/viatech/util/OnlineUpgradeManager;->mContext:Landroid/content/Context;
const v3, 0x7f0701b4
invoke-virtual {v2, v3}, Landroid/content/Context;->getString(I)Ljava/lang/String;
move-result-object v2
new-instance v3, Lcom/viatech/util/OnlineUpgradeManager$7;
invoke-direct {v3, p0}, Lcom/viatech/util/OnlineUpgradeManager$7;-><init>(Lcom/viatech/util/OnlineUpgradeManager;)V
invoke-virtual {v0, v1, v2, v3}, Landroid/app/ProgressDialog;->setButton(ILjava/lang/CharSequence;Landroid/content/DialogInterface$OnClickListener;)V
.line 226
return-void
.end method
.method static synthetic access$000()Ljava/lang/String;
.locals 1
.prologue
.line 39
sget-object v0, Lcom/viatech/util/OnlineUpgradeManager;->UPGRADE_APK_SAVE_PATH:Ljava/lang/String;
return-object v0
.end method
.method static synthetic access$100(Lcom/viatech/util/OnlineUpgradeManager;)Landroid/content/Context;
.locals 1
.prologue
.line 39
iget-object v0, p0, Lcom/viatech/util/OnlineUpgradeManager;->mContext:Landroid/content/Context;
return-object v0
.end method
.method static synthetic access$1000(Lcom/viatech/util/OnlineUpgradeManager;)Lcom/viatech/widget/VPaiDialog$Builder;
.locals 1
.prologue
.line 39
iget-object v0, p0, Lcom/viatech/util/OnlineUpgradeManager;->mDownloadBuilder:Lcom/viatech/widget/VPaiDialog$Builder;
return-object v0
.end method
.method static synthetic access$1100(Lcom/viatech/util/OnlineUpgradeManager;)Landroid/app/Dialog;
.locals 1
.prologue
.line 39
iget-object v0, p0, Lcom/viatech/util/OnlineUpgradeManager;->mDownloadDialog:Landroid/app/Dialog;
return-object v0
.end method
.method static synthetic access$1102(Lcom/viatech/util/OnlineUpgradeManager;Landroid/app/Dialog;)Landroid/app/Dialog;
.locals 0
.prologue
.line 39
iput-object p1, p0, Lcom/viatech/util/OnlineUpgradeManager;->mDownloadDialog:Landroid/app/Dialog;
return-object p1
.end method
.method static synthetic access$1200(Lcom/viatech/util/OnlineUpgradeManager;)Landroid/app/Dialog;
.locals 1
.prologue
.line 39
iget-object v0, p0, Lcom/viatech/util/OnlineUpgradeManager;->mTipDialog:Landroid/app/Dialog;
return-object v0
.end method
.method static synthetic access$200(Lcom/viatech/util/OnlineUpgradeManager;)Lcom/viatech/util/DownloadTask;
.locals 1
.prologue
.line 39
iget-object v0, p0, Lcom/viatech/util/OnlineUpgradeManager;->mUpgradeTask:Lcom/viatech/util/DownloadTask;
return-object v0
.end method
.method static synthetic access$202(Lcom/viatech/util/OnlineUpgradeManager;Lcom/viatech/util/DownloadTask;)Lcom/viatech/util/DownloadTask;
.locals 0
.prologue
.line 39
iput-object p1, p0, Lcom/viatech/util/OnlineUpgradeManager;->mUpgradeTask:Lcom/viatech/util/DownloadTask;
return-object p1
.end method
.method static synthetic access$300(Lcom/viatech/util/OnlineUpgradeManager;)Lcom/viatech/util/OnlineUpgradeManager$UpgradeInfo;
.locals 1
.prologue
.line 39
iget-object v0, p0, Lcom/viatech/util/OnlineUpgradeManager;->mUpgradeInfo:Lcom/viatech/util/OnlineUpgradeManager$UpgradeInfo;
return-object v0
.end method
.method static synthetic access$302(Lcom/viatech/util/OnlineUpgradeManager;Lcom/viatech/util/OnlineUpgradeManager$UpgradeInfo;)Lcom/viatech/util/OnlineUpgradeManager$UpgradeInfo;
.locals 0
.prologue
.line 39
iput-object p1, p0, Lcom/viatech/util/OnlineUpgradeManager;->mUpgradeInfo:Lcom/viatech/util/OnlineUpgradeManager$UpgradeInfo;
return-object p1
.end method
.method static synthetic access$400(Lcom/viatech/util/OnlineUpgradeManager;)Landroid/app/ProgressDialog;
.locals 1
.prologue
.line 39
iget-object v0, p0, Lcom/viatech/util/OnlineUpgradeManager;->mProgressDialog:Landroid/app/ProgressDialog;
return-object v0
.end method
.method static synthetic access$500(Lcom/viatech/util/OnlineUpgradeManager;)Landroid/app/Dialog;
.locals 1
.prologue
.line 39
iget-object v0, p0, Lcom/viatech/util/OnlineUpgradeManager;->mInstallDialog:Landroid/app/Dialog;
return-object v0
.end method
.method static synthetic access$502(Lcom/viatech/util/OnlineUpgradeManager;Landroid/app/Dialog;)Landroid/app/Dialog;
.locals 0
.prologue
.line 39
iput-object p1, p0, Lcom/viatech/util/OnlineUpgradeManager;->mInstallDialog:Landroid/app/Dialog;
return-object p1
.end method
.method static synthetic access$600(Lcom/viatech/util/OnlineUpgradeManager;)V
.locals 0
.prologue
.line 39
invoke-direct {p0}, Lcom/viatech/util/OnlineUpgradeManager;->showLastestVersion()V
return-void
.end method
.method static synthetic access$700(Lcom/viatech/util/OnlineUpgradeManager;)I
.locals 1
.prologue
.line 39
iget v0, p0, Lcom/viatech/util/OnlineUpgradeManager;->mVersionCode:I
return v0
.end method
.method static synthetic access$800(Lcom/viatech/util/OnlineUpgradeManager;Lcom/viatech/util/OnlineUpgradeManager$UpgradeInfo;)V
.locals 0
.prologue
.line 39
invoke-direct {p0, p1}, Lcom/viatech/util/OnlineUpgradeManager;->upgradeAPK(Lcom/viatech/util/OnlineUpgradeManager$UpgradeInfo;)V
return-void
.end method
.method static synthetic access$900(Lcom/viatech/util/OnlineUpgradeManager;)Lcom/viatech/widget/VPaiDialog$Builder;
.locals 1
.prologue
.line 39
iget-object v0, p0, Lcom/viatech/util/OnlineUpgradeManager;->mInstallBuilder:Lcom/viatech/widget/VPaiDialog$Builder;
return-object v0
.end method
.method public static create(Landroid/content/Context;)V
.locals 1
.prologue
.line 71
new-instance v0, Lcom/viatech/util/OnlineUpgradeManager;
invoke-direct {v0, p0}, Lcom/viatech/util/OnlineUpgradeManager;-><init>(Landroid/content/Context;)V
sput-object v0, Lcom/viatech/util/OnlineUpgradeManager;->sIns:Lcom/viatech/util/OnlineUpgradeManager;
.line 72
return-void
.end method
.method public static destory()V
.locals 2
.prologue
.line 75
sget-object v0, Lcom/viatech/util/OnlineUpgradeManager;->sIns:Lcom/viatech/util/OnlineUpgradeManager;
if-nez v0, :cond_1
.line 79
:cond_0
:goto_0
return-void
.line 76
:cond_1
sget-object v0, Lcom/viatech/util/OnlineUpgradeManager;->sIns:Lcom/viatech/util/OnlineUpgradeManager;
const/4 v1, 0x1
iput-boolean v1, v0, Lcom/viatech/util/OnlineUpgradeManager;->mDestroyed:Z
.line 77
sget-object v0, Lcom/viatech/util/OnlineUpgradeManager;->sIns:Lcom/viatech/util/OnlineUpgradeManager;
iget-object v0, v0, Lcom/viatech/util/OnlineUpgradeManager;->mUpgradeTask:Lcom/viatech/util/DownloadTask;
if-eqz v0, :cond_0
.line 78
invoke-static {}, Lcom/viatech/util/HttpDownloadManager;->instance()Lcom/viatech/util/HttpDownloadManager;
move-result-object v0
sget-object v1, Lcom/viatech/util/OnlineUpgradeManager;->sIns:Lcom/viatech/util/OnlineUpgradeManager;
iget-object v1, v1, Lcom/viatech/util/OnlineUpgradeManager;->mUpgradeTask:Lcom/viatech/util/DownloadTask;
invoke-virtual {v0, v1}, Lcom/viatech/util/HttpDownloadManager;->cancelDownload(Lcom/viatech/util/DownloadTask;)V
goto :goto_0
.end method
.method private getVersionCode()I
.locals 4
.prologue
const/4 v0, 0x0
.line 410
:try_start_0
iget-object v1, p0, Lcom/viatech/util/OnlineUpgradeManager;->mContext:Landroid/content/Context;
invoke-virtual {v1}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;
move-result-object v1
.line 411
iget-object v2, p0, Lcom/viatech/util/OnlineUpgradeManager;->mContext:Landroid/content/Context;
invoke-virtual {v2}, Landroid/content/Context;->getPackageName()Ljava/lang/String;
move-result-object v2
const/4 v3, 0x0
invoke-virtual {v1, v2, v3}, Landroid/content/pm/PackageManager;->getPackageInfo(Ljava/lang/String;I)Landroid/content/pm/PackageInfo;
move-result-object v1
.line 412
iget v0, v1, Landroid/content/pm/PackageInfo;->versionCode:I
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
.line 415
:goto_0
return v0
.line 413
:catch_0
move-exception v1
.line 414
invoke-virtual {v1}, Ljava/lang/Exception;->printStackTrace()V
goto :goto_0
.end method
.method private getmCurLanguage()Ljava/lang/String;
.locals 6
.prologue
.line 420
const-string v0, "en"
.line 421
iget-object v1, p0, Lcom/viatech/util/OnlineUpgradeManager;->mContext:Landroid/content/Context;
invoke-virtual {v1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v1
invoke-virtual {v1}, Landroid/content/res/Resources;->getConfiguration()Landroid/content/res/Configuration;
move-result-object v1
iget-object v1, v1, Landroid/content/res/Configuration;->locale:Ljava/util/Locale;
.line 422
invoke-virtual {v1}, Ljava/util/Locale;->getLanguage()Ljava/lang/String;
move-result-object v2
.line 423
invoke-virtual {v1}, Ljava/util/Locale;->getCountry()Ljava/lang/String;
move-result-object v1
.line 424
const-string v3, "VPAI_OnlineUpgradeManager"
new-instance v4, Ljava/lang/StringBuilder;
invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V
const-string v5, "language: "
invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v4
invoke-virtual {v4, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v4
const-string v5, ", country:"
invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v4
invoke-virtual {v4, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v4
invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v4
invoke-static {v3, v4}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
.line 425
if-eqz v2, :cond_0
if-eqz v1, :cond_0
.line 426
invoke-virtual {v2}, Ljava/lang/String;->toUpperCase()Ljava/lang/String;
move-result-object v2
const-string v3, "ZH"
invoke-virtual {v2, v3}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v2
if-eqz v2, :cond_2
.line 427
invoke-virtual {v1}, Ljava/lang/String;->toUpperCase()Ljava/lang/String;
move-result-object v2
const-string v3, "CN"
invoke-virtual {v2, v3}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v2
if-eqz v2, :cond_1
.line 428
const-string v0, "sc"
.line 438
:cond_0
:goto_0
return-object v0
.line 429
:cond_1
invoke-virtual {v1}, Ljava/lang/String;->toUpperCase()Ljava/lang/String;
move-result-object v2
const-string v3, "TW"
invoke-virtual {v2, v3}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v2
if-nez v2, :cond_0
.line 431
invoke-virtual {v1}, Ljava/lang/String;->toUpperCase()Ljava/lang/String;
move-result-object v1
const-string v2, "HK"
invoke-virtual {v1, v2}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v1
if-eqz v1, :cond_0
goto :goto_0
.line 435
:cond_2
const-string v0, "en"
goto :goto_0
.end method
.method private gotoGooglePlay()V
.locals 7
.prologue
const/4 v1, 0x0
.line 464
iget-object v0, p0, Lcom/viatech/util/OnlineUpgradeManager;->mContext:Landroid/content/Context;
invoke-virtual {v0}, Landroid/content/Context;->getPackageName()Ljava/lang/String;
move-result-object v2
.line 472
new-instance v3, Landroid/content/Intent;
const-string v0, "android.intent.action.VIEW"
new-instance v4, Ljava/lang/StringBuilder;
invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V
const-string v5, "market://details?id="
invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v4
invoke-virtual {v4, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v4
invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v4
invoke-static {v4}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;
move-result-object v4
invoke-direct {v3, v0, v4}, Landroid/content/Intent;-><init>(Ljava/lang/String;Landroid/net/Uri;)V
.line 474
iget-object v0, p0, Lcom/viatech/util/OnlineUpgradeManager;->mContext:Landroid/content/Context;
invoke-virtual {v0}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;
move-result-object v0
invoke-virtual {v0, v3, v1}, Landroid/content/pm/PackageManager;->queryIntentActivities(Landroid/content/Intent;I)Ljava/util/List;
move-result-object v0
.line 475
invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;
move-result-object v4
:cond_0
invoke-interface {v4}, Ljava/util/Iterator;->hasNext()Z
move-result v0
if-eqz v0, :cond_2
invoke-interface {v4}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/content/pm/ResolveInfo;
.line 476
iget-object v5, v0, Landroid/content/pm/ResolveInfo;->activityInfo:Landroid/content/pm/ActivityInfo;
iget-object v5, v5, Landroid/content/pm/ActivityInfo;->applicationInfo:Landroid/content/pm/ApplicationInfo;
iget-object v5, v5, Landroid/content/pm/ApplicationInfo;->packageName:Ljava/lang/String;
const-string v6, "com.android.vending"
invoke-virtual {v5, v6}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v5
if-eqz v5, :cond_0
.line 477
const/4 v1, 0x1
.line 478
iget-object v0, v0, Landroid/content/pm/ResolveInfo;->activityInfo:Landroid/content/pm/ActivityInfo;
.line 479
new-instance v4, Landroid/content/ComponentName;
iget-object v5, v0, Landroid/content/pm/ActivityInfo;->applicationInfo:Landroid/content/pm/ApplicationInfo;
iget-object v5, v5, Landroid/content/pm/ApplicationInfo;->packageName:Ljava/lang/String;
iget-object v0, v0, Landroid/content/pm/ActivityInfo;->name:Ljava/lang/String;
invoke-direct {v4, v5, v0}, Landroid/content/ComponentName;-><init>(Ljava/lang/String;Ljava/lang/String;)V
.line 480
const/high16 v0, 0x14200000
invoke-virtual {v3, v0}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;
.line 481
invoke-virtual {v3, v4}, Landroid/content/Intent;->setComponent(Landroid/content/ComponentName;)Landroid/content/Intent;
.line 482
iget-object v0, p0, Lcom/viatech/util/OnlineUpgradeManager;->mContext:Landroid/content/Context;
invoke-virtual {v0, v3}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V
move v0, v1
.line 486
:goto_0
if-nez v0, :cond_1
.line 487
iget-object v0, p0, Lcom/viatech/util/OnlineUpgradeManager;->mContext:Landroid/content/Context;
new-instance v1, Landroid/content/Intent;
const-string v3, "android.intent.action.VIEW"
new-instance v4, Ljava/lang/StringBuilder;
invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V
const-string v5, "https://play.google.com/store/apps/details?id="
invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v4
invoke-virtual {v4, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v2
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v2
invoke-static {v2}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;
move-result-object v2
invoke-direct {v1, v3, v2}, Landroid/content/Intent;-><init>(Ljava/lang/String;Landroid/net/Uri;)V
invoke-virtual {v0, v1}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V
.line 490
:cond_1
return-void
:cond_2
move v0, v1
goto :goto_0
.end method
.method private hasGoogleService()Z
.locals 4
.prologue
.line 453
invoke-static {}, Lcom/google/android/gms/common/GoogleApiAvailability;->getInstance()Lcom/google/android/gms/common/GoogleApiAvailability;
move-result-object v0
iget-object v1, p0, Lcom/viatech/util/OnlineUpgradeManager;->mContext:Landroid/content/Context;
invoke-virtual {v0, v1}, Lcom/google/android/gms/common/GoogleApiAvailability;->isGooglePlayServicesAvailable(Landroid/content/Context;)I
move-result v1
.line 454
const-string v0, "VPAI_OnlineUpgradeManager"
new-instance v2, Ljava/lang/StringBuilder;
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
const-string v3, "hasGoogleService available="
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v2
invoke-virtual {v2, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v2
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v2
invoke-static {v0, v2}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
.line 455
const/4 v0, 0x0
.line 456
const/4 v2, 0x2
if-eq v1, v2, :cond_0
if-nez v1, :cond_1
.line 458
:cond_0
const/4 v0, 0x1
.line 460
:cond_1
return v0
.end method
.method public static instance()Lcom/viatech/util/OnlineUpgradeManager;
.locals 1
.prologue
.line 82
sget-object v0, Lcom/viatech/util/OnlineUpgradeManager;->sIns:Lcom/viatech/util/OnlineUpgradeManager;
return-object v0
.end method
.method private showLastestVersion()V
.locals 2
.prologue
.line 442
iget-object v0, p0, Lcom/viatech/util/OnlineUpgradeManager;->mHandler:Landroid/os/Handler;
new-instance v1, Lcom/viatech/util/OnlineUpgradeManager$15;
invoke-direct {v1, p0}, Lcom/viatech/util/OnlineUpgradeManager$15;-><init>(Lcom/viatech/util/OnlineUpgradeManager;)V
invoke-virtual {v0, v1}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z
.line 450
return-void
.end method
.method private upgradeAPK(Lcom/viatech/util/OnlineUpgradeManager$UpgradeInfo;)V
.locals 2
.prologue
.line 368
const-string v0, "VPAI_OnlineUpgradeManager"
const-string v1, "upgradeAPK"
invoke-static {v0, v1}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I
.line 370
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
sget-object v1, Lcom/viatech/util/OnlineUpgradeManager;->UPGRADE_APK_SAVE_PATH:Ljava/lang/String;
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
const-string v1, "/"
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
const-string v1, "VPAI.apk"
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
.line 371
new-instance v1, Ljava/io/File;
invoke-direct {v1, v0}, Ljava/io/File;-><init>(Ljava/lang/String;)V
.line 372
invoke-virtual {v1}, Ljava/io/File;->exists()Z
move-result v1
if-eqz v1, :cond_0
iget-object v1, p0, Lcom/viatech/util/OnlineUpgradeManager;->mContext:Landroid/content/Context;
invoke-static {v1, v0}, Lcom/viatech/util/Util;->getApkVersion(Landroid/content/Context;Ljava/lang/String;)I
move-result v0
iget v1, p1, Lcom/viatech/util/OnlineUpgradeManager$UpgradeInfo;->versionCode:I
if-lt v0, v1, :cond_0
.line 373
iget-object v0, p0, Lcom/viatech/util/OnlineUpgradeManager;->mHandler:Landroid/os/Handler;
new-instance v1, Lcom/viatech/util/OnlineUpgradeManager$13;
invoke-direct {v1, p0, p1}, Lcom/viatech/util/OnlineUpgradeManager$13;-><init>(Lcom/viatech/util/OnlineUpgradeManager;Lcom/viatech/util/OnlineUpgradeManager$UpgradeInfo;)V
invoke-virtual {v0, v1}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z
.line 405
:goto_0
return-void
.line 389
:cond_0
iget-object v0, p0, Lcom/viatech/util/OnlineUpgradeManager;->mHandler:Landroid/os/Handler;
new-instance v1, Lcom/viatech/util/OnlineUpgradeManager$14;
invoke-direct {v1, p0, p1}, Lcom/viatech/util/OnlineUpgradeManager$14;-><init>(Lcom/viatech/util/OnlineUpgradeManager;Lcom/viatech/util/OnlineUpgradeManager$UpgradeInfo;)V
invoke-virtual {v0, v1}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z
goto :goto_0
.end method
# virtual methods
.method public checkVersion(ZZ)V
.locals 8
.prologue
.line 286
iget-boolean v0, p0, Lcom/viatech/util/OnlineUpgradeManager;->mDownloading:Z
if-eqz v0, :cond_1
.line 287
iget-object v0, p0, Lcom/viatech/util/OnlineUpgradeManager;->mProgressDialog:Landroid/app/ProgressDialog;
invoke-virtual {v0}, Landroid/app/ProgressDialog;->show()V
.line 364
:cond_0
:goto_0
return-void
.line 291
:cond_1
new-instance v0, Ljava/util/Date;
invoke-direct {v0}, Ljava/util/Date;-><init>()V
invoke-virtual {v0}, Ljava/util/Date;->getTime()J
move-result-wide v0
.line 292
if-nez p2, :cond_3
.line 293
iget-object v2, p0, Lcom/viatech/util/OnlineUpgradeManager;->mContext:Landroid/content/Context;
invoke-static {v2}, Landroid/preference/PreferenceManager;->getDefaultSharedPreferences(Landroid/content/Context;)Landroid/content/SharedPreferences;
move-result-object v2
.line 294
const-string v3, "last_check_time"
const-wide/16 v4, 0x0
invoke-interface {v2, v3, v4, v5}, Landroid/content/SharedPreferences;->getLong(Ljava/lang/String;J)J
move-result-wide v4
.line 295
const-wide/32 v6, 0x5265c00
add-long/2addr v4, v6
cmp-long v0, v0, v4
if-gez v0, :cond_3
.line 296
new-instance v0, Lcom/viatech/util/OnlineUpgradeManager$UpgradeInfo;
invoke-direct {v0}, Lcom/viatech/util/OnlineUpgradeManager$UpgradeInfo;-><init>()V
.line 297
const-string v1, "last_version_name"
const-string v3, ""
invoke-interface {v2, v1, v3}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
move-result-object v1
iput-object v1, v0, Lcom/viatech/util/OnlineUpgradeManager$UpgradeInfo;->versionName:Ljava/lang/String;
.line 298
const-string v1, "last_version_code"
const/4 v3, 0x0
invoke-interface {v2, v1, v3}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I
move-result v1
iput v1, v0, Lcom/viatech/util/OnlineUpgradeManager$UpgradeInfo;->versionCode:I
.line 299
const-string v1, "last_url"
const-string v3, ""
invoke-interface {v2, v1, v3}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
move-result-object v1
iput-object v1, v0, Lcom/viatech/util/OnlineUpgradeManager$UpgradeInfo;->url:Ljava/lang/String;
.line 300
const-string v1, "last_changelog"
const-string v3, ""
invoke-interface {v2, v1, v3}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
move-result-object v1
iput-object v1, v0, Lcom/viatech/util/OnlineUpgradeManager$UpgradeInfo;->log:Ljava/lang/String;
.line 301
iget-object v1, v0, Lcom/viatech/util/OnlineUpgradeManager$UpgradeInfo;->versionName:Ljava/lang/String;
const-string v2, ""
invoke-virtual {v1, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v1
if-nez v1, :cond_2
iget v1, v0, Lcom/viatech/util/OnlineUpgradeManager$UpgradeInfo;->versionCode:I
if-eqz v1, :cond_2
iget-object v1, v0, Lcom/viatech/util/OnlineUpgradeManager$UpgradeInfo;->url:Ljava/lang/String;
const-string v2, ""
.line 302
invoke-virtual {v1, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v1
if-nez v1, :cond_2
iget-object v1, v0, Lcom/viatech/util/OnlineUpgradeManager$UpgradeInfo;->log:Ljava/lang/String;
const-string v2, ""
invoke-virtual {v1, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v1
if-nez v1, :cond_2
.line 303
iget v1, v0, Lcom/viatech/util/OnlineUpgradeManager$UpgradeInfo;->versionCode:I
iget v2, p0, Lcom/viatech/util/OnlineUpgradeManager;->mVersionCode:I
if-le v1, v2, :cond_2
.line 304
iput-object v0, p0, Lcom/viatech/util/OnlineUpgradeManager;->mUpgradeInfo:Lcom/viatech/util/OnlineUpgradeManager$UpgradeInfo;
.line 305
invoke-direct {p0, v0}, Lcom/viatech/util/OnlineUpgradeManager;->upgradeAPK(Lcom/viatech/util/OnlineUpgradeManager$UpgradeInfo;)V
goto :goto_0
.line 310
:cond_2
if-eqz p1, :cond_0
.line 311
invoke-direct {p0}, Lcom/viatech/util/OnlineUpgradeManager;->showLastestVersion()V
goto/16 :goto_0
.line 319
:cond_3
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
const-string v1, "https://api.vpai360.com/upgrade/appcheck?version="
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
iget v1, p0, Lcom/viatech/util/OnlineUpgradeManager;->mVersionCode:I
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v0
const-string v1, "&language="
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
iget-object v1, p0, Lcom/viatech/util/OnlineUpgradeManager;->mCurLanguage:Ljava/lang/String;
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
const-string v1, "&os=ANDROID&phoneid="
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
iget-object v1, p0, Lcom/viatech/util/OnlineUpgradeManager;->mContext:Landroid/content/Context;
.line 320
invoke-static {v1}, Lcom/viatech/util/Util;->getPhoneid(Landroid/content/Context;)Ljava/lang/String;
move-result-object v1
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
.line 321
invoke-static {}, Lcom/viatech/util/HttpRequestManager;->instance()Lcom/viatech/util/HttpRequestManager;
move-result-object v1
new-instance v2, Lcom/viatech/util/OnlineUpgradeManager$12;
invoke-direct {v2, p0, v0, p1}, Lcom/viatech/util/OnlineUpgradeManager$12;-><init>(Lcom/viatech/util/OnlineUpgradeManager;Ljava/lang/String;Z)V
invoke-virtual {v1, v0, v2}, Lcom/viatech/util/HttpRequestManager;->requestHttps(Ljava/lang/String;Lcom/viatech/util/HttpRequestManager$OnHttpResponseListener;)V
goto/16 :goto_0
.end method
.method public onDownloadEnd(Lcom/viatech/util/DownloadTask;Z)V
.locals 3
.prologue
.line 246
const-string v0, "VPAI_OnlineUpgradeManager"
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string v2, "onDownloadEnd:succeed = "
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1, p2}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-static {v0, v1}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I
.line 247
iget-boolean v0, p0, Lcom/viatech/util/OnlineUpgradeManager;->mDestroyed:Z
if-eqz v0, :cond_0
.line 269
:goto_0
return-void
.line 249
:cond_0
const/4 v0, 0x0
iput-boolean v0, p0, Lcom/viatech/util/OnlineUpgradeManager;->mDownloading:Z
.line 250
const/4 v0, 0x0
iput-object v0, p0, Lcom/viatech/util/OnlineUpgradeManager;->mUpgradeTask:Lcom/viatech/util/DownloadTask;
.line 251
iget-object v0, p0, Lcom/viatech/util/OnlineUpgradeManager;->mHandler:Landroid/os/Handler;
new-instance v1, Lcom/viatech/util/OnlineUpgradeManager$9;
invoke-direct {v1, p0}, Lcom/viatech/util/OnlineUpgradeManager$9;-><init>(Lcom/viatech/util/OnlineUpgradeManager;)V
invoke-virtual {v0, v1}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z
.line 258
if-eqz p2, :cond_1
.line 259
iget-object v0, p0, Lcom/viatech/util/OnlineUpgradeManager;->mHandler:Landroid/os/Handler;
new-instance v1, Lcom/viatech/util/OnlineUpgradeManager$10;
invoke-direct {v1, p0}, Lcom/viatech/util/OnlineUpgradeManager$10;-><init>(Lcom/viatech/util/OnlineUpgradeManager;)V
invoke-virtual {v0, v1}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z
goto :goto_0
.line 267
:cond_1
const v0, 0x7f0701b3
invoke-static {v0}, Lcom/viatech/VPaiApplication;->b(I)V
goto :goto_0
.end method
.method public onDownloadProgress(Lcom/viatech/util/DownloadTask;I)V
.locals 3
.prologue
.line 273
const-string v0, "VPAI_OnlineUpgradeManager"
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string v2, "onDownloadProgress:progress = "
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1, p2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-static {v0, v1}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I
.line 274
iget-boolean v0, p0, Lcom/viatech/util/OnlineUpgradeManager;->mDestroyed:Z
if-eqz v0, :cond_0
.line 283
:goto_0
return-void
.line 276
:cond_0
iget-object v0, p0, Lcom/viatech/util/OnlineUpgradeManager;->mHandler:Landroid/os/Handler;
new-instance v1, Lcom/viatech/util/OnlineUpgradeManager$11;
invoke-direct {v1, p0, p2}, Lcom/viatech/util/OnlineUpgradeManager$11;-><init>(Lcom/viatech/util/OnlineUpgradeManager;I)V
invoke-virtual {v0, v1}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z
goto :goto_0
.end method
.method public onDownloadStart(Lcom/viatech/util/DownloadTask;)V
.locals 2
.prologue
.line 230
const-string v0, "VPAI_OnlineUpgradeManager"
const-string v1, "onDownloadStart"
invoke-static {v0, v1}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I
.line 231
iget-boolean v0, p0, Lcom/viatech/util/OnlineUpgradeManager;->mDestroyed:Z
if-eqz v0, :cond_0
.line 242
:goto_0
return-void
.line 233
:cond_0
const/4 v0, 0x1
iput-boolean v0, p0, Lcom/viatech/util/OnlineUpgradeManager;->mDownloading:Z
.line 234
iget-object v0, p0, Lcom/viatech/util/OnlineUpgradeManager;->mHandler:Landroid/os/Handler;
new-instance v1, Lcom/viatech/util/OnlineUpgradeManager$8;
invoke-direct {v1, p0}, Lcom/viatech/util/OnlineUpgradeManager$8;-><init>(Lcom/viatech/util/OnlineUpgradeManager;)V
invoke-virtual {v0, v1}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z
goto :goto_0
.end method