.class public Lcom/viatech/update/UpdateManager; .super Ljava/lang/Object; .source "UpdateManager.java" # interfaces .implements Lcom/viatech/device/DeviceMessage$DeviceMessageCallback; # annotations .annotation system Ldalvik/annotation/MemberClasses; value = { Lcom/viatech/update/UpdateManager$UpgradeDeviceThreadRunnable;, Lcom/viatech/update/UpdateManager$DownFirmwareThreadRunnable; } .end annotation # static fields .field private static final MSG_SHOW_DOWNLOAD_DIALOG:I = 0xa .field private static final MSG_START_CHECK_DEVICE_VPAISERVER:I = 0xb .field private static final TAG:Ljava/lang/String; = "Vpai_Upgrade" .field private static final UPDATE_FILENAME:Ljava/lang/String; = "/update_" .field public static final WEBSOCKET_SENDBUF_LEN:I = 0x64000 .field public static final mOldVersion:I = 0x6e6 # instance fields .field private mCancel:Z .field private mChangelog:Ljava/lang/String; .field private mContext:Landroid/content/Context; .field private mCookieNumber:I .field private mDeviceInfo:Lcom/viatech/device/DeviceInfo; .field private mDownFirmwareThreadRunnable:Lcom/viatech/update/UpdateManager$DownFirmwareThreadRunnable; .field private mDownloadFinishDlg:Landroid/app/Dialog; .field private mDownloadFinishDlgSyncLock:Ljava/lang/Object; .field private mDownloadUpdateFwPath:Ljava/lang/String; .field private mHandler:Landroid/os/Handler; .field private mPercent:I .field private mUpdateDialogBuild:Lcom/viatech/widget/VPaiDialog$Builder; .field private mUpgradeDeviceThreadRunnable:Lcom/viatech/update/UpdateManager$UpgradeDeviceThreadRunnable; .field private mUpgradeFileHasReadied:Z .field private mUpgradeHandler:Landroid/os/Handler; .field private mUploadInterval:I .field private mUploadStartTime:J .field private mVPaiDevice:Lcom/viatech/device/VPaiDevice; .field private mWorkHandler:Landroid/os/Handler; .field private mWorkThread:Landroid/os/HandlerThread; .field private mWorkWebHandler:Landroid/os/Handler; .field private mWorkWebThread:Landroid/os/HandlerThread; # direct methods .method public constructor (Landroid/content/Context;Lcom/viatech/device/VPaiDevice;)V .locals 4 .prologue const/4 v3, 0x0 const/4 v2, 0x0 .line 116 invoke-direct {p0}, Ljava/lang/Object;->()V .line 60 iput-boolean v2, p0, Lcom/viatech/update/UpdateManager;->mUpgradeFileHasReadied:Z .line 61 iput-boolean v2, p0, Lcom/viatech/update/UpdateManager;->mCancel:Z .line 65 new-instance v0, Ljava/lang/Object; invoke-direct {v0}, Ljava/lang/Object;->()V iput-object v0, p0, Lcom/viatech/update/UpdateManager;->mDownloadFinishDlgSyncLock:Ljava/lang/Object; .line 73 const-wide/16 v0, 0x0 iput-wide v0, p0, Lcom/viatech/update/UpdateManager;->mUploadStartTime:J .line 74 const/16 v0, 0x64 iput v0, p0, Lcom/viatech/update/UpdateManager;->mUploadInterval:I .line 75 iput v2, p0, Lcom/viatech/update/UpdateManager;->mPercent:I .line 84 new-instance v0, Lcom/viatech/update/UpdateManager$1; invoke-direct {v0, p0}, Lcom/viatech/update/UpdateManager$1;->(Lcom/viatech/update/UpdateManager;)V iput-object v0, p0, Lcom/viatech/update/UpdateManager;->mHandler:Landroid/os/Handler; .line 246 iput-object v3, p0, Lcom/viatech/update/UpdateManager;->mDownFirmwareThreadRunnable:Lcom/viatech/update/UpdateManager$DownFirmwareThreadRunnable; .line 504 iput-object v3, p0, Lcom/viatech/update/UpdateManager;->mUpgradeDeviceThreadRunnable:Lcom/viatech/update/UpdateManager$UpgradeDeviceThreadRunnable; .line 505 iput-object v3, p0, Lcom/viatech/update/UpdateManager;->mUpgradeHandler:Landroid/os/Handler; .line 117 const-string v0, "Vpai_Upgrade" const-string v1, "UpdateManager()" invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I .line 118 iput-object p1, p0, Lcom/viatech/update/UpdateManager;->mContext:Landroid/content/Context; .line 119 new-instance v0, Landroid/os/HandlerThread; const-string v1, "Update Thread" invoke-direct {v0, v1}, Landroid/os/HandlerThread;->(Ljava/lang/String;)V iput-object v0, p0, Lcom/viatech/update/UpdateManager;->mWorkThread:Landroid/os/HandlerThread; .line 120 iget-object v0, p0, Lcom/viatech/update/UpdateManager;->mWorkThread:Landroid/os/HandlerThread; invoke-virtual {v0}, Landroid/os/HandlerThread;->start()V .line 121 new-instance v0, Landroid/os/Handler; iget-object v1, p0, Lcom/viatech/update/UpdateManager;->mWorkThread:Landroid/os/HandlerThread; invoke-virtual {v1}, Landroid/os/HandlerThread;->getLooper()Landroid/os/Looper; move-result-object v1 invoke-direct {v0, v1}, Landroid/os/Handler;->(Landroid/os/Looper;)V iput-object v0, p0, Lcom/viatech/update/UpdateManager;->mWorkHandler:Landroid/os/Handler; .line 123 new-instance v0, Landroid/os/HandlerThread; const-string v1, "Web Thread" invoke-direct {v0, v1}, Landroid/os/HandlerThread;->(Ljava/lang/String;)V iput-object v0, p0, Lcom/viatech/update/UpdateManager;->mWorkWebThread:Landroid/os/HandlerThread; .line 124 iget-object v0, p0, Lcom/viatech/update/UpdateManager;->mWorkWebThread:Landroid/os/HandlerThread; invoke-virtual {v0}, Landroid/os/HandlerThread;->start()V .line 125 new-instance v0, Landroid/os/Handler; iget-object v1, p0, Lcom/viatech/update/UpdateManager;->mWorkWebThread:Landroid/os/HandlerThread; invoke-virtual {v1}, Landroid/os/HandlerThread;->getLooper()Landroid/os/Looper; move-result-object v1 invoke-direct {v0, v1}, Landroid/os/Handler;->(Landroid/os/Looper;)V iput-object v0, p0, Lcom/viatech/update/UpdateManager;->mWorkWebHandler:Landroid/os/Handler; .line 126 iput-object p2, p0, Lcom/viatech/update/UpdateManager;->mVPaiDevice:Lcom/viatech/device/VPaiDevice; .line 127 iget-object v0, p0, Lcom/viatech/update/UpdateManager;->mVPaiDevice:Lcom/viatech/device/VPaiDevice; iget-object v0, v0, Lcom/viatech/device/VPaiDevice;->mDeviceInfo:Lcom/viatech/device/DeviceInfo; iput-object v0, p0, Lcom/viatech/update/UpdateManager;->mDeviceInfo:Lcom/viatech/device/DeviceInfo; .line 128 iget-object v0, p0, Lcom/viatech/update/UpdateManager;->mVPaiDevice:Lcom/viatech/device/VPaiDevice; invoke-virtual {v0, p0}, Lcom/viatech/device/VPaiDevice;->registerDeviceResponseCallback(Lcom/viatech/device/DeviceMessage$DeviceMessageCallback;)V .line 129 iget-object v0, p0, Lcom/viatech/update/UpdateManager;->mHandler:Landroid/os/Handler; const/16 v1, 0xb const-wide/16 v2, 0x7d0 invoke-virtual {v0, v1, v2, v3}, Landroid/os/Handler;->sendEmptyMessageDelayed(IJ)Z .line 130 invoke-static {p1}, Lcom/viatech/util/Util;->getBatteryLevel(Landroid/content/Context;)I .line 132 return-void .end method .method static synthetic access$000(Lcom/viatech/update/UpdateManager;)Landroid/os/Handler; .locals 1 .prologue .line 49 iget-object v0, p0, Lcom/viatech/update/UpdateManager;->mHandler:Landroid/os/Handler; return-object v0 .end method .method static synthetic access$100(Lcom/viatech/update/UpdateManager;)V .locals 0 .prologue .line 49 invoke-direct {p0}, Lcom/viatech/update/UpdateManager;->upgradeCheckNetwork()V return-void .end method .method static synthetic access$1000(Lcom/viatech/update/UpdateManager;Ljava/lang/String;II)V .locals 0 .prologue .line 49 invoke-direct {p0, p1, p2, p3}, Lcom/viatech/update/UpdateManager;->deleteOldFiles(Ljava/lang/String;II)V return-void .end method .method static synthetic access$1100(Lcom/viatech/update/UpdateManager;)Z .locals 1 .prologue .line 49 iget-boolean v0, p0, Lcom/viatech/update/UpdateManager;->mCancel:Z return v0 .end method .method static synthetic access$1202(Lcom/viatech/update/UpdateManager;Z)Z .locals 0 .prologue .line 49 iput-boolean p1, p0, Lcom/viatech/update/UpdateManager;->mUpgradeFileHasReadied:Z return p1 .end method .method static synthetic access$1300(Lcom/viatech/update/UpdateManager;)Z .locals 1 .prologue .line 49 invoke-direct {p0}, Lcom/viatech/update/UpdateManager;->bBatteryLow()Z move-result v0 return v0 .end method .method static synthetic access$1400(Lcom/viatech/update/UpdateManager;)Landroid/app/Dialog; .locals 1 .prologue .line 49 iget-object v0, p0, Lcom/viatech/update/UpdateManager;->mDownloadFinishDlg:Landroid/app/Dialog; return-object v0 .end method .method static synthetic access$1402(Lcom/viatech/update/UpdateManager;Landroid/app/Dialog;)Landroid/app/Dialog; .locals 0 .prologue .line 49 iput-object p1, p0, Lcom/viatech/update/UpdateManager;->mDownloadFinishDlg:Landroid/app/Dialog; return-object p1 .end method .method static synthetic access$1500(Lcom/viatech/update/UpdateManager;)Lcom/viatech/device/VPaiDevice; .locals 1 .prologue .line 49 iget-object v0, p0, Lcom/viatech/update/UpdateManager;->mVPaiDevice:Lcom/viatech/device/VPaiDevice; return-object v0 .end method .method static synthetic access$1600(Lcom/viatech/update/UpdateManager;)Lcom/viatech/widget/VPaiDialog$Builder; .locals 1 .prologue .line 49 iget-object v0, p0, Lcom/viatech/update/UpdateManager;->mUpdateDialogBuild:Lcom/viatech/widget/VPaiDialog$Builder; return-object v0 .end method .method static synthetic access$1602(Lcom/viatech/update/UpdateManager;Lcom/viatech/widget/VPaiDialog$Builder;)Lcom/viatech/widget/VPaiDialog$Builder; .locals 0 .prologue .line 49 iput-object p1, p0, Lcom/viatech/update/UpdateManager;->mUpdateDialogBuild:Lcom/viatech/widget/VPaiDialog$Builder; return-object p1 .end method .method static synthetic access$1700(Lcom/viatech/update/UpdateManager;)Ljava/lang/Object; .locals 1 .prologue .line 49 iget-object v0, p0, Lcom/viatech/update/UpdateManager;->mDownloadFinishDlgSyncLock:Ljava/lang/Object; return-object v0 .end method .method static synthetic access$1800(Lcom/viatech/update/UpdateManager;)Landroid/os/Handler; .locals 1 .prologue .line 49 iget-object v0, p0, Lcom/viatech/update/UpdateManager;->mUpgradeHandler:Landroid/os/Handler; return-object v0 .end method .method static synthetic access$1900(Lcom/viatech/update/UpdateManager;)I .locals 1 .prologue .line 49 iget v0, p0, Lcom/viatech/update/UpdateManager;->mUploadInterval:I return v0 .end method .method static synthetic access$1902(Lcom/viatech/update/UpdateManager;I)I .locals 0 .prologue .line 49 iput p1, p0, Lcom/viatech/update/UpdateManager;->mUploadInterval:I return p1 .end method .method static synthetic access$200(Lcom/viatech/update/UpdateManager;Landroid/os/Message;)I .locals 1 .prologue .line 49 invoke-direct {p0, p1}, Lcom/viatech/update/UpdateManager;->showUpgradeDialog(Landroid/os/Message;)I move-result v0 return v0 .end method .method static synthetic access$300(Lcom/viatech/update/UpdateManager;)Landroid/content/Context; .locals 1 .prologue .line 49 iget-object v0, p0, Lcom/viatech/update/UpdateManager;->mContext:Landroid/content/Context; return-object v0 .end method .method static synthetic access$400(Lcom/viatech/update/UpdateManager;)Lcom/viatech/device/DeviceInfo; .locals 1 .prologue .line 49 iget-object v0, p0, Lcom/viatech/update/UpdateManager;->mDeviceInfo:Lcom/viatech/device/DeviceInfo; return-object v0 .end method .method static synthetic access$500(Lcom/viatech/update/UpdateManager;Lcom/viatech/device/DeviceInfo;)V .locals 0 .prologue .line 49 invoke-direct {p0, p1}, Lcom/viatech/update/UpdateManager;->upgradeCheckFromVpaiServer(Lcom/viatech/device/DeviceInfo;)V return-void .end method .method static synthetic access$600(Lcom/viatech/update/UpdateManager;)Ljava/lang/String; .locals 1 .prologue .line 49 iget-object v0, p0, Lcom/viatech/update/UpdateManager;->mChangelog:Ljava/lang/String; return-object v0 .end method .method static synthetic access$602(Lcom/viatech/update/UpdateManager;Ljava/lang/String;)Ljava/lang/String; .locals 0 .prologue .line 49 iput-object p1, p0, Lcom/viatech/update/UpdateManager;->mChangelog:Ljava/lang/String; return-object p1 .end method .method static synthetic access$700(Lcom/viatech/update/UpdateManager;)Lcom/viatech/update/UpdateManager$DownFirmwareThreadRunnable; .locals 1 .prologue .line 49 iget-object v0, p0, Lcom/viatech/update/UpdateManager;->mDownFirmwareThreadRunnable:Lcom/viatech/update/UpdateManager$DownFirmwareThreadRunnable; return-object v0 .end method .method static synthetic access$702(Lcom/viatech/update/UpdateManager;Lcom/viatech/update/UpdateManager$DownFirmwareThreadRunnable;)Lcom/viatech/update/UpdateManager$DownFirmwareThreadRunnable; .locals 0 .prologue .line 49 iput-object p1, p0, Lcom/viatech/update/UpdateManager;->mDownFirmwareThreadRunnable:Lcom/viatech/update/UpdateManager$DownFirmwareThreadRunnable; return-object p1 .end method .method static synthetic access$800(Lcom/viatech/update/UpdateManager;)Landroid/os/Handler; .locals 1 .prologue .line 49 iget-object v0, p0, Lcom/viatech/update/UpdateManager;->mWorkWebHandler:Landroid/os/Handler; return-object v0 .end method .method static synthetic access$900(Lcom/viatech/update/UpdateManager;)Ljava/lang/String; .locals 1 .prologue .line 49 iget-object v0, p0, Lcom/viatech/update/UpdateManager;->mDownloadUpdateFwPath:Ljava/lang/String; return-object v0 .end method .method static synthetic access$902(Lcom/viatech/update/UpdateManager;Ljava/lang/String;)Ljava/lang/String; .locals 0 .prologue .line 49 iput-object p1, p0, Lcom/viatech/update/UpdateManager;->mDownloadUpdateFwPath:Ljava/lang/String; return-object p1 .end method .method private bBatteryLow()Z .locals 4 .prologue const/4 v0, 0x1 const/4 v1, 0x0 .line 347 .line 348 iget-object v2, p0, Lcom/viatech/update/UpdateManager;->mVPaiDevice:Lcom/viatech/device/VPaiDevice; invoke-virtual {v2}, Lcom/viatech/device/VPaiDevice;->isUSBDevice()Z move-result v2 if-eqz v2, :cond_2 .line 349 sget v2, Lcom/viatech/VPaiApplication;->a:I .line 350 const/16 v3, 0xf if-ge v2, v3, :cond_1 .line 357 :cond_0 :goto_0 return v0 :cond_1 move v0, v1 .line 350 goto :goto_0 .line 352 :cond_2 iget-object v2, p0, Lcom/viatech/update/UpdateManager;->mVPaiDevice:Lcom/viatech/device/VPaiDevice; iget-object v2, v2, Lcom/viatech/device/VPaiDevice;->mDeviceInfo:Lcom/viatech/device/DeviceInfo; .line 353 if-eqz v2, :cond_0 iget v3, v2, Lcom/viatech/device/DeviceInfo;->externalpower:I if-nez v3, :cond_3 iget v2, v2, Lcom/viatech/device/DeviceInfo;->remainbattery:I const/16 v3, 0x28 if-lt v2, v3, :cond_0 :cond_3 move v0, v1 goto :goto_0 .end method .method private deleteOldFiles(Ljava/lang/String;II)V .locals 7 .prologue .line 757 new-instance v0, Ljava/io/File; sget-object v1, Lcom/viatech/Config;->f:Ljava/lang/String; invoke-direct {v0, v1}, Ljava/io/File;->(Ljava/lang/String;)V .line 758 invoke-virtual {v0}, Ljava/io/File;->isDirectory()Z move-result v1 if-eqz v1, :cond_0 invoke-virtual {v0}, Ljava/io/File;->exists()Z move-result v1 if-nez v1, :cond_1 .line 783 :cond_0 :goto_0 return-void .line 760 :cond_1 invoke-virtual {v0}, Ljava/io/File;->listFiles()[Ljava/io/File; move-result-object v1 .line 761 if-eqz v1, :cond_0 .line 764 const/4 v0, 0x0 :goto_1 :try_start_0 array-length v2, v1 if-ge v0, v2, :cond_0 .line 765 aget-object v2, v1, v0 .line 766 invoke-virtual {v2}, Ljava/io/File;->isDirectory()Z move-result v3 if-nez v3, :cond_2 .line 767 invoke-virtual {v2}, Ljava/io/File;->getName()Ljava/lang/String; move-result-object v3 .line 768 invoke-virtual {v3}, Ljava/lang/String;->length()I move-result v4 if-lez v4, :cond_2 const-string v4, "." invoke-virtual {v3, v4}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z move-result v4 if-eqz v4, :cond_3 .line 764 :cond_2 :goto_2 add-int/lit8 v0, v0, 0x1 goto :goto_1 .line 770 :cond_3 new-instance v4, Ljava/lang/StringBuilder; invoke-direct {v4}, Ljava/lang/StringBuilder;->()V invoke-virtual {v4, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v4 const-string v5, "_" invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v4 invoke-virtual {v4, p2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder; move-result-object v4 invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v4 invoke-virtual {v3, v4}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z move-result v4 if-eqz v4, :cond_2 .line 771 const-string v4, "-" invoke-virtual {v3, v4}, Ljava/lang/String;->lastIndexOf(Ljava/lang/String;)I move-result v4 add-int/lit8 v4, v4, 0x1 const-string v5, "." invoke-virtual {v3, v5}, Ljava/lang/String;->lastIndexOf(Ljava/lang/String;)I move-result v5 add-int/lit8 v5, v5, -0x1 invoke-virtual {v3, v4, v5}, Ljava/lang/String;->substring(II)Ljava/lang/String; move-result-object v4 .line 772 invoke-static {v4}, Ljava/lang/Integer;->valueOf(Ljava/lang/String;)Ljava/lang/Integer; move-result-object v4 invoke-virtual {v4}, Ljava/lang/Integer;->intValue()I move-result v4 .line 773 if-ge v4, p3, :cond_2 .line 774 const-string v4, "Vpai_Upgrade" new-instance v5, Ljava/lang/StringBuilder; invoke-direct {v5}, Ljava/lang/StringBuilder;->()V const-string v6, "deleteOldFiles() delete :" invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v5 invoke-virtual {v5, v3}, 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 {v4, v3}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I .line 775 invoke-virtual {v2}, Ljava/io/File;->delete()Z :try_end_0 .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0 goto :goto_2 .line 780 :catch_0 move-exception v0 .line 781 invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V goto/16 :goto_0 .end method .method public static isTopActivity(Landroid/content/Context;)Z .locals 3 .prologue const/4 v1, 0x0 .line 740 .line 741 const-string v0, "activity" .line 742 invoke-virtual {p0, v0}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object; move-result-object v0 check-cast v0, Landroid/app/ActivityManager; .line 743 const/4 v2, 0x2 invoke-virtual {v0, v2}, Landroid/app/ActivityManager;->getRunningTasks(I)Ljava/util/List; move-result-object v0 invoke-interface {v0, v1}, Ljava/util/List;->get(I)Ljava/lang/Object; move-result-object v0 check-cast v0, Landroid/app/ActivityManager$RunningTaskInfo; iget-object v0, v0, Landroid/app/ActivityManager$RunningTaskInfo;->topActivity:Landroid/content/ComponentName; .line 744 if-eqz v0, :cond_0 .line 745 const-class v2, Lcom/via/vpai/MainActivity; invoke-virtual {v2}, Ljava/lang/Class;->getName()Ljava/lang/String; move-result-object v2 invoke-virtual {v0}, Landroid/content/ComponentName;->getClassName()Ljava/lang/String; move-result-object v0 invoke-virtual {v2, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z move-result v0 if-eqz v0, :cond_0 .line 746 const/4 v0, 0x1 .line 749 :goto_0 return v0 :cond_0 move v0, v1 goto :goto_0 .end method .method private showUpgradeDialog(Landroid/os/Message;)I .locals 10 .prologue const/4 v2, 0x0 .line 362 iget-object v0, p0, Lcom/viatech/update/UpdateManager;->mVPaiDevice:Lcom/viatech/device/VPaiDevice; iget v0, v0, Lcom/viatech/device/VPaiDevice;->ctrlStatus:I const/4 v1, 0x2 if-eq v0, v1, :cond_0 .line 363 const/4 v0, -0x1 .line 497 :goto_0 return v0 .line 365 :cond_0 iget-object v0, p0, Lcom/viatech/update/UpdateManager;->mContext:Landroid/content/Context; invoke-static {v0}, Lcom/viatech/update/UpdateManager;->isTopActivity(Landroid/content/Context;)Z move-result v0 if-nez v0, :cond_1 .line 366 const/4 v0, -0x2 goto :goto_0 .line 369 :cond_1 iget-object v0, p0, Lcom/viatech/update/UpdateManager;->mVPaiDevice:Lcom/viatech/device/VPaiDevice; invoke-virtual {v0}, Lcom/viatech/device/VPaiDevice;->isUSBDevice()Z move-result v0 if-eqz v0, :cond_2 .line 370 sget v0, Lcom/viatech/VPaiApplication;->a:I .line 371 if-nez v0, :cond_2 .line 372 const-string v0, "Vpai_Upgrade" const-string v1, "NOT get battery level. Will try again next 1 second." invoke-static {v0, v1}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I .line 373 const/4 v0, -0x3 goto :goto_0 .line 377 :cond_2 invoke-direct {p0}, Lcom/viatech/update/UpdateManager;->bBatteryLow()Z move-result v3 .line 378 const/4 v0, 0x0 .line 379 if-eqz v3, :cond_8 .line 380 const-string v0, "Vpai_Upgrade" const-string v1, "Battery too low , upgrade???" invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I .line 381 iget-object v1, p0, Lcom/viatech/update/UpdateManager;->mContext:Landroid/content/Context; iget-object v0, p0, Lcom/viatech/update/UpdateManager;->mVPaiDevice:Lcom/viatech/device/VPaiDevice; invoke-virtual {v0}, Lcom/viatech/device/VPaiDevice;->isUSBDevice()Z move-result v0 if-eqz v0, :cond_3 const v0, 0x7f0701c4 :goto_1 invoke-virtual {v1, v0}, Landroid/content/Context;->getString(I)Ljava/lang/String; move-result-object v0 move-object v1, v0 .line 384 :goto_2 iget-object v0, p0, Lcom/viatech/update/UpdateManager;->mDownloadFinishDlg:Landroid/app/Dialog; if-eqz v0, :cond_4 iget-object v0, p0, Lcom/viatech/update/UpdateManager;->mDownloadFinishDlg:Landroid/app/Dialog; invoke-virtual {v0}, Landroid/app/Dialog;->isShowing()Z move-result v0 if-eqz v0, :cond_4 move v0, v2 .line 385 goto :goto_0 .line 381 :cond_3 const v0, 0x7f0701c3 goto :goto_1 .line 387 :cond_4 iget-object v0, p1, Landroid/os/Message;->obj:Ljava/lang/Object; check-cast v0, Ljava/lang/String; .line 388 if-nez v0, :cond_6 .line 389 const-string v0, " " .line 393 :cond_5 :goto_3 iget v4, p1, Landroid/os/Message;->arg1:I .line 394 iget v5, p1, Landroid/os/Message;->arg2:I .line 395 const-string v6, "Vpai_Upgrade" new-instance v7, Ljava/lang/StringBuilder; invoke-direct {v7}, Ljava/lang/StringBuilder;->()V const-string v8, "to show download dialog,newversion=" invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v7 invoke-virtual {v7, v4}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder; move-result-object v7 const-string v8, ", changelog=" invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v7 invoke-virtual {v7, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v7 invoke-virtual {v7}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v7 invoke-static {v6, v7}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I .line 396 new-instance v6, Lcom/viatech/widget/VPaiDialog$Builder; iget-object v7, p0, Lcom/viatech/update/UpdateManager;->mContext:Landroid/content/Context; invoke-direct {v6, v7}, Lcom/viatech/widget/VPaiDialog$Builder;->(Landroid/content/Context;)V .line 397 const v7, 0x7f070119 invoke-virtual {v6, v7}, Lcom/viatech/widget/VPaiDialog$Builder;->setTitle(I)Landroid/app/AlertDialog$Builder; .line 398 new-instance v7, Ljava/lang/StringBuilder; invoke-direct {v7}, Ljava/lang/StringBuilder;->()V iget-object v8, p0, Lcom/viatech/update/UpdateManager;->mContext:Landroid/content/Context; const v9, 0x7f070118 invoke-virtual {v8, v9}, Landroid/content/Context;->getString(I)Ljava/lang/String; move-result-object v8 invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v7 if-eqz v3, :cond_7 new-instance v3, Ljava/lang/StringBuilder; invoke-direct {v3}, Ljava/lang/StringBuilder;->()V const-string v8, "
" invoke-virtual {v3, v8}, 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 v1 const-string v3, "" invoke-virtual {v1, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v1 invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v1 :goto_4 invoke-virtual {v7, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v1 const-string v3, "

v" invoke-virtual {v1, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v1 invoke-virtual {v1, v4}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder; move-result-object v1 iget-object v3, p0, Lcom/viatech/update/UpdateManager;->mContext:Landroid/content/Context; const v4, 0x7f070120 .line 400 invoke-virtual {v3, v4}, Landroid/content/Context;->getString(I)Ljava/lang/String; move-result-object v3 invoke-virtual {v1, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v1 const-string v3, "
" invoke-virtual {v1, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v1 invoke-virtual {v1, v0}, 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 invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v0 .line 398 invoke-static {v0}, Landroid/text/Html;->fromHtml(Ljava/lang/String;)Landroid/text/Spanned; move-result-object v0 invoke-virtual {v6, v0}, Lcom/viatech/widget/VPaiDialog$Builder;->setMessage(Ljava/lang/CharSequence;)Landroid/app/AlertDialog$Builder; .line 403 const v0, 0x7f07012d new-instance v1, Lcom/viatech/update/UpdateManager$4; invoke-direct {v1, p0, v5}, Lcom/viatech/update/UpdateManager$4;->(Lcom/viatech/update/UpdateManager;I)V invoke-virtual {v6, v0, v1}, Lcom/viatech/widget/VPaiDialog$Builder;->setPositiveButton(ILandroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder; .line 484 const v0, 0x7f07005c new-instance v1, Lcom/viatech/update/UpdateManager$5; invoke-direct {v1, p0}, Lcom/viatech/update/UpdateManager$5;->(Lcom/viatech/update/UpdateManager;)V invoke-virtual {v6, v0, v1}, Lcom/viatech/widget/VPaiDialog$Builder;->setNegativeButton(ILandroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder; .line 492 iget-object v1, p0, Lcom/viatech/update/UpdateManager;->mDownloadFinishDlgSyncLock:Ljava/lang/Object; monitor-enter v1 .line 493 :try_start_0 invoke-virtual {v6}, Lcom/viatech/widget/VPaiDialog$Builder;->create()Landroid/app/AlertDialog; move-result-object v0 iput-object v0, p0, Lcom/viatech/update/UpdateManager;->mDownloadFinishDlg:Landroid/app/Dialog; .line 494 iget-object v0, p0, Lcom/viatech/update/UpdateManager;->mDownloadFinishDlg:Landroid/app/Dialog; const/4 v3, 0x0 invoke-virtual {v0, v3}, Landroid/app/Dialog;->setCanceledOnTouchOutside(Z)V .line 495 iget-object v0, p0, Lcom/viatech/update/UpdateManager;->mDownloadFinishDlg:Landroid/app/Dialog; invoke-virtual {v0}, Landroid/app/Dialog;->show()V .line 496 monitor-exit v1 :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 move v0, v2 .line 497 goto/16 :goto_0 .line 390 :cond_6 invoke-virtual {v0}, Ljava/lang/String;->isEmpty()Z move-result v4 if-eqz v4, :cond_5 .line 391 const-string v0, " " goto/16 :goto_3 .line 398 :cond_7 const-string v1, "" goto :goto_4 .line 496 :catchall_0 move-exception v0 :try_start_1 monitor-exit v1 :try_end_1 .catchall {:try_start_1 .. :try_end_1} :catchall_0 throw v0 :cond_8 move-object v1, v0 goto/16 :goto_2 .end method .method private upgradeCheckFromVpaiServer(Lcom/viatech/device/DeviceInfo;)V .locals 5 .prologue const/4 v1, 0x0 .line 185 iget-object v0, p0, Lcom/viatech/update/UpdateManager;->mContext:Landroid/content/Context; invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources; move-result-object v0 invoke-virtual {v0}, Landroid/content/res/Resources;->getConfiguration()Landroid/content/res/Configuration; move-result-object v0 iget-object v2, v0, Landroid/content/res/Configuration;->locale:Ljava/util/Locale; .line 186 invoke-virtual {v2}, Ljava/util/Locale;->getLanguage()Ljava/lang/String; move-result-object v0 .line 187 invoke-virtual {v0}, Ljava/lang/String;->isEmpty()Z move-result v3 if-eqz v3, :cond_0 .line 188 const-string v0, "en" .line 190 :cond_0 invoke-virtual {v2}, Ljava/util/Locale;->getCountry()Ljava/lang/String; move-result-object v2 .line 191 const-string v3, "en" invoke-virtual {v0, v3}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z move-result v3 if-nez v3, :cond_1 const-string v3, "cn" invoke-virtual {v2, v3}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z move-result v3 if-nez v3, :cond_1 .line 192 new-instance v3, Ljava/lang/StringBuilder; invoke-direct {v3}, Ljava/lang/StringBuilder;->()V invoke-virtual {v3, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v0 const-string v3, "_" invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v0 invoke-virtual {v2}, Ljava/lang/String;->toLowerCase()Ljava/lang/String; move-result-object v2 invoke-virtual {v0, v2}, 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 196 :cond_1 :try_start_0 iget-object v2, p0, Lcom/viatech/update/UpdateManager;->mContext:Landroid/content/Context; invoke-virtual {v2}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager; move-result-object v2 .line 197 iget-object v3, p0, Lcom/viatech/update/UpdateManager;->mContext:Landroid/content/Context; invoke-virtual {v3}, Landroid/content/Context;->getPackageName()Ljava/lang/String; move-result-object v3 const/4 v4, 0x0 invoke-virtual {v2, v3, v4}, Landroid/content/pm/PackageManager;->getPackageInfo(Ljava/lang/String;I)Landroid/content/pm/PackageInfo; move-result-object v2 .line 198 iget v1, v2, Landroid/content/pm/PackageInfo;->versionCode:I :try_end_0 .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0 .line 204 :goto_0 new-instance v2, Ljava/lang/StringBuilder; invoke-direct {v2}, Ljava/lang/StringBuilder;->()V const-string v3, "https://api.vpai360.com/upgrade/devicecheck?product=" invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v2 iget-object v3, p1, Lcom/viatech/device/DeviceInfo;->product:Ljava/lang/String; invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v2 const-string v3, "&manufactory=" invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v2 iget-object v3, p1, Lcom/viatech/device/DeviceInfo;->manufactory:Ljava/lang/String; invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v2 const-string v3, "&module=" invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v2 iget-object v3, p1, Lcom/viatech/device/DeviceInfo;->module:Ljava/lang/String; invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v2 const-string v3, "&version=" invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v2 iget v3, p1, Lcom/viatech/device/DeviceInfo;->version:I invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder; move-result-object v2 const-string v3, "&language=" invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v2 invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v0 const-string v2, "&mac=" invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v0 iget-object v2, p1, Lcom/viatech/device/DeviceInfo;->mac:Ljava/lang/String; invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v0 const-string v2, "&deviceid=" invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v0 iget-object v2, p1, Lcom/viatech/device/DeviceInfo;->deviceid:Ljava/lang/String; invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v0 const-string v2, "&versioncode=" invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v0 invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder; move-result-object v0 invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v0 .line 207 iget-object v1, p0, Lcom/viatech/update/UpdateManager;->mVPaiDevice:Lcom/viatech/device/VPaiDevice; invoke-virtual {v1}, Lcom/viatech/device/VPaiDevice;->isVTPDevice()Z move-result v1 if-eqz v1, :cond_2 .line 208 new-instance v1, Ljava/lang/StringBuilder; invoke-direct {v1}, Ljava/lang/StringBuilder;->()V invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v0 const-string v1, "&fullupgrade=1" 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 209 const-string v1, " " invoke-virtual {v0, v1}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z move-result v1 if-eqz v1, :cond_2 .line 210 const-string v1, " " const-string v2, "" invoke-virtual {v0, v1, v2}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String; move-result-object v0 .line 213 :cond_2 const-string v1, "Vpai_Upgrade" new-instance v2, Ljava/lang/StringBuilder; invoke-direct {v2}, Ljava/lang/StringBuilder;->()V const-string v3, "Vpai check device upgrade server_url=" invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v2 invoke-virtual {v2, v0}, 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 {v1, v2}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I .line 215 invoke-static {}, Lcom/viatech/util/HttpRequestManager;->instance()Lcom/viatech/util/HttpRequestManager; move-result-object v1 new-instance v2, Lcom/viatech/update/UpdateManager$3; invoke-direct {v2, p0, p1}, Lcom/viatech/update/UpdateManager$3;->(Lcom/viatech/update/UpdateManager;Lcom/viatech/device/DeviceInfo;)V invoke-virtual {v1, v0, v2}, Lcom/viatech/util/HttpRequestManager;->requestHttps(Ljava/lang/String;Lcom/viatech/util/HttpRequestManager$OnHttpResponseListener;)V .line 243 return-void .line 199 :catch_0 move-exception v2 .line 200 invoke-virtual {v2}, Ljava/lang/Exception;->printStackTrace()V goto/16 :goto_0 .end method .method private upgradeCheckNetwork()V .locals 2 .prologue .line 165 iget-object v0, p0, Lcom/viatech/update/UpdateManager;->mWorkWebHandler:Landroid/os/Handler; new-instance v1, Lcom/viatech/update/UpdateManager$2; invoke-direct {v1, p0}, Lcom/viatech/update/UpdateManager$2;->(Lcom/viatech/update/UpdateManager;)V invoke-virtual {v0, v1}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z .line 181 return-void .end method # virtual methods .method public closeUpgradeDeviceActivity()V .locals 3 .prologue const/16 v2, 0x3f1 .line 728 const-string v0, "Vpai_Upgrade" const-string v1, "closeUpgradeDeviceActivity()" invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I .line 729 iget-object v0, p0, Lcom/viatech/update/UpdateManager;->mUpgradeHandler:Landroid/os/Handler; if-eqz v0, :cond_0 .line 730 iget-object v0, p0, Lcom/viatech/update/UpdateManager;->mUpgradeHandler:Landroid/os/Handler; invoke-virtual {v0, v2}, Landroid/os/Handler;->removeMessages(I)V .line 731 iget-object v0, p0, Lcom/viatech/update/UpdateManager;->mUpgradeHandler:Landroid/os/Handler; invoke-virtual {v0, v2}, Landroid/os/Handler;->sendEmptyMessage(I)Z .line 733 :cond_0 return-void .end method .method public destory()V .locals 3 .prologue const/4 v2, 0x0 .line 138 const-string v0, "Vpai_Upgrade" const-string v1, "destory()" invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I .line 139 const/4 v0, 0x1 iput-boolean v0, p0, Lcom/viatech/update/UpdateManager;->mCancel:Z .line 140 iget-object v0, p0, Lcom/viatech/update/UpdateManager;->mVPaiDevice:Lcom/viatech/device/VPaiDevice; if-eqz v0, :cond_0 iget-object v0, p0, Lcom/viatech/update/UpdateManager;->mVPaiDevice:Lcom/viatech/device/VPaiDevice; invoke-virtual {v0}, Lcom/viatech/device/VPaiDevice;->isCtrlConnect()Z move-result v0 if-eqz v0, :cond_0 .line 142 iget-object v0, p0, Lcom/viatech/update/UpdateManager;->mVPaiDevice:Lcom/viatech/device/VPaiDevice; invoke-virtual {v0, p0}, Lcom/viatech/device/VPaiDevice;->unregisterDeviceResponseCallback(Lcom/viatech/device/DeviceMessage$DeviceMessageCallback;)V .line 144 :cond_0 iget-object v0, p0, Lcom/viatech/update/UpdateManager;->mDownloadFinishDlg:Landroid/app/Dialog; if-eqz v0, :cond_1 iget-object v0, p0, Lcom/viatech/update/UpdateManager;->mDownloadFinishDlg:Landroid/app/Dialog; invoke-virtual {v0}, Landroid/app/Dialog;->isShowing()Z move-result v0 if-eqz v0, :cond_1 .line 145 iget-object v0, p0, Lcom/viatech/update/UpdateManager;->mDownloadFinishDlg:Landroid/app/Dialog; invoke-virtual {v0}, Landroid/app/Dialog;->cancel()V .line 147 :cond_1 iget-object v0, p0, Lcom/viatech/update/UpdateManager;->mDownFirmwareThreadRunnable:Lcom/viatech/update/UpdateManager$DownFirmwareThreadRunnable; if-eqz v0, :cond_2 .line 148 iget-object v0, p0, Lcom/viatech/update/UpdateManager;->mWorkHandler:Landroid/os/Handler; iget-object v1, p0, Lcom/viatech/update/UpdateManager;->mDownFirmwareThreadRunnable:Lcom/viatech/update/UpdateManager$DownFirmwareThreadRunnable; invoke-virtual {v0, v1}, Landroid/os/Handler;->removeCallbacks(Ljava/lang/Runnable;)V .line 150 :cond_2 iput-object v2, p0, Lcom/viatech/update/UpdateManager;->mDownFirmwareThreadRunnable:Lcom/viatech/update/UpdateManager$DownFirmwareThreadRunnable; .line 151 iget-object v0, p0, Lcom/viatech/update/UpdateManager;->mDownloadFinishDlg:Landroid/app/Dialog; if-eqz v0, :cond_4 .line 152 iget-object v0, p0, Lcom/viatech/update/UpdateManager;->mDownloadFinishDlg:Landroid/app/Dialog; invoke-virtual {v0}, Landroid/app/Dialog;->isShowing()Z move-result v0 if-eqz v0, :cond_3 .line 153 iget-object v0, p0, Lcom/viatech/update/UpdateManager;->mDownloadFinishDlg:Landroid/app/Dialog; invoke-virtual {v0}, Landroid/app/Dialog;->dismiss()V .line 155 :cond_3 iget-object v1, p0, Lcom/viatech/update/UpdateManager;->mDownloadFinishDlgSyncLock:Ljava/lang/Object; monitor-enter v1 .line 156 const/4 v0, 0x0 :try_start_0 iput-object v0, p0, Lcom/viatech/update/UpdateManager;->mDownloadFinishDlg:Landroid/app/Dialog; .line 157 monitor-exit v1 :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 .line 159 :cond_4 iget-object v0, p0, Lcom/viatech/update/UpdateManager;->mWorkThread:Landroid/os/HandlerThread; invoke-virtual {v0}, Landroid/os/HandlerThread;->quit()Z .line 160 iget-object v0, p0, Lcom/viatech/update/UpdateManager;->mWorkWebThread:Landroid/os/HandlerThread; invoke-virtual {v0}, Landroid/os/HandlerThread;->quit()Z .line 161 return-void .line 157 :catchall_0 move-exception v0 :try_start_1 monitor-exit v1 :try_end_1 .catchall {:try_start_1 .. :try_end_1} :catchall_0 throw v0 .end method .method public getFileName(Ljava/lang/String;II)Ljava/lang/String; .locals 2 .prologue .line 753 new-instance v0, Ljava/lang/StringBuilder; invoke-direct {v0}, Ljava/lang/StringBuilder;->()V sget-object v1, Lcom/viatech/Config;->f: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 invoke-virtual {v0, p1}, 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 invoke-virtual {v0, p2}, Ljava/lang/StringBuilder;->append(I)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 invoke-virtual {v0, p3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder; move-result-object v0 const-string v1, ".zip" 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 return-object v0 .end method .method public getUpgradeHandler()Landroid/os/Handler; .locals 1 .prologue .line 512 iget-object v0, p0, Lcom/viatech/update/UpdateManager;->mUpgradeHandler:Landroid/os/Handler; return-object v0 .end method .method public getVpaiDevice()Lcom/viatech/device/VPaiDevice; .locals 1 .prologue .line 786 iget-object v0, p0, Lcom/viatech/update/UpdateManager;->mVPaiDevice:Lcom/viatech/device/VPaiDevice; return-object v0 .end method .method public onMessageResult(Ljava/lang/String;)V .locals 8 .prologue const/16 v5, 0x64 .line 661 .line 664 :try_start_0 new-instance v0, Lorg/json/JSONObject; invoke-direct {v0, p1}, Lorg/json/JSONObject;->(Ljava/lang/String;)V .line 665 const-string v1, "action" invoke-virtual {v0, v1}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String; move-result-object v1 .line 666 const-string v2, "updatedevice_response" invoke-virtual {v1, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z move-result v1 if-nez v1, :cond_1 .line 724 :cond_0 :goto_0 return-void .line 669 :cond_1 const-string v1, "Vpai_Upgrade" new-instance v2, Ljava/lang/StringBuilder; invoke-direct {v2}, Ljava/lang/StringBuilder;->()V const-string v3, "onUpgradeDeviceResponse() message=" invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v2 invoke-virtual {v2, p1}, 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 {v1, v2}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I .line 670 const-string v1, "finished" invoke-virtual {v0, v1}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String; move-result-object v1 .line 671 const-string v2, "time" const-string v3, "0" invoke-virtual {v0, v2, v3}, Lorg/json/JSONObject;->optString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; move-result-object v0 .line 672 const-string v2, "-1" invoke-virtual {v2, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z move-result v2 if-nez v2, :cond_2 const-string v2, "0" invoke-virtual {v2, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z move-result v2 if-eqz v2, :cond_4 if-eqz v0, :cond_2 invoke-virtual {v0}, Ljava/lang/String;->length()I move-result v2 const/4 v3, 0x1 if-ge v2, v3, :cond_4 .line 673 :cond_2 const-string v0, "Vpai_Upgrade" const-string v1, "UpgradeD Device fail .." invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I .line 674 iget-object v0, p0, Lcom/viatech/update/UpdateManager;->mUpgradeHandler:Landroid/os/Handler; if-eqz v0, :cond_3 .line 675 iget-object v0, p0, Lcom/viatech/update/UpdateManager;->mUpgradeHandler:Landroid/os/Handler; const/16 v1, 0x3eb invoke-virtual {v0, v1}, Landroid/os/Handler;->removeMessages(I)V .line 676 iget-object v0, p0, Lcom/viatech/update/UpdateManager;->mUpgradeHandler:Landroid/os/Handler; const/16 v1, 0x3eb invoke-virtual {v0, v1}, Landroid/os/Handler;->sendEmptyMessage(I)Z .line 678 :cond_3 invoke-virtual {p0}, Lcom/viatech/update/UpdateManager;->stopUpgradeDevice()V :try_end_0 .catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0 goto :goto_0 .line 721 :catch_0 move-exception v0 .line 722 const-string v1, "Vpai_Upgrade" invoke-virtual {v0}, Lorg/json/JSONException;->getMessage()Ljava/lang/String; move-result-object v0 invoke-static {v1, v0}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I goto :goto_0 .line 680 :cond_4 :try_start_1 invoke-static {v1}, Ljava/lang/Integer;->valueOf(Ljava/lang/String;)Ljava/lang/Integer; move-result-object v1 invoke-virtual {v1}, Ljava/lang/Integer;->intValue()I move-result v1 .line 681 const-string v2, "Vpai_Upgrade" new-instance v3, Ljava/lang/StringBuilder; invoke-direct {v3}, Ljava/lang/StringBuilder;->()V const-string v4, "UpgradeD Device percent=" 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(I)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 682 if-ge v1, v5, :cond_6 iget-object v2, p0, Lcom/viatech/update/UpdateManager;->mUpgradeHandler:Landroid/os/Handler; if-eqz v2, :cond_6 .line 686 invoke-static {v0}, Ljava/lang/Long;->valueOf(Ljava/lang/String;)Ljava/lang/Long; move-result-object v0 invoke-virtual {v0}, Ljava/lang/Long;->longValue()J move-result-wide v2 .line 687 iget v0, p0, Lcom/viatech/update/UpdateManager;->mPercent:I if-eq v1, v0, :cond_5 iget-wide v4, p0, Lcom/viatech/update/UpdateManager;->mUploadStartTime:J const-wide/16 v6, 0x0 cmp-long v0, v4, v6 if-eqz v0, :cond_5 .line 688 iget-wide v4, p0, Lcom/viatech/update/UpdateManager;->mUploadStartTime:J sub-long v4, v2, v4 iget v0, p0, Lcom/viatech/update/UpdateManager;->mPercent:I sub-int v0, v1, v0 int-to-long v6, v0 div-long/2addr v4, v6 const-wide/16 v6, 0xa sub-long/2addr v4, v6 long-to-int v0, v4 iput v0, p0, Lcom/viatech/update/UpdateManager;->mUploadInterval:I .line 690 :cond_5 const-string v0, "Vpai_Upgrade" new-instance v4, Ljava/lang/StringBuilder; invoke-direct {v4}, Ljava/lang/StringBuilder;->()V const-string v5, "" invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v4 iget v5, p0, Lcom/viatech/update/UpdateManager;->mPercent:I invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder; move-result-object v4 const-string v5, "@" invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v4 iget-wide v6, p0, Lcom/viatech/update/UpdateManager;->mUploadStartTime:J invoke-virtual {v4, v6, v7}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder; move-result-object v4 const-string v5, " >> " 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(I)Ljava/lang/StringBuilder; move-result-object v4 const-string v5, "@" invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v4 invoke-virtual {v4, v2, v3}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder; move-result-object v4 const-string v5, " >> mUploadInterval adjust to " invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v4 iget v5, p0, Lcom/viatech/update/UpdateManager;->mUploadInterval:I invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder; move-result-object v4 invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v4 invoke-static {v0, v4}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I .line 691 iput v1, p0, Lcom/viatech/update/UpdateManager;->mPercent:I .line 692 iput-wide v2, p0, Lcom/viatech/update/UpdateManager;->mUploadStartTime:J .line 693 iget-object v0, p0, Lcom/viatech/update/UpdateManager;->mUpgradeHandler:Landroid/os/Handler; if-eqz v0, :cond_0 .line 694 iget-object v0, p0, Lcom/viatech/update/UpdateManager;->mUpgradeHandler:Landroid/os/Handler; const/16 v1, 0x3ec invoke-virtual {v0, v1}, Landroid/os/Handler;->removeMessages(I)V .line 695 iget-object v0, p0, Lcom/viatech/update/UpdateManager;->mUpgradeHandler:Landroid/os/Handler; iget-object v1, p0, Lcom/viatech/update/UpdateManager;->mUpgradeHandler:Landroid/os/Handler; const/16 v2, 0x3ec iget v3, p0, Lcom/viatech/update/UpdateManager;->mPercent:I iget v4, p0, Lcom/viatech/update/UpdateManager;->mUploadInterval:I const/4 v5, 0x0 .line 696 invoke-virtual {v1, v2, v3, v4, v5}, Landroid/os/Handler;->obtainMessage(IIILjava/lang/Object;)Landroid/os/Message; move-result-object v1 .line 695 invoke-virtual {v0, v1}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z goto/16 :goto_0 .line 699 :cond_6 if-ne v1, v5, :cond_0 .line 700 const-string v0, "Vpai_Upgrade" const-string v1, "Upgrade Device successful .." invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I .line 701 const/4 v0, 0x0 iput-boolean v0, p0, Lcom/viatech/update/UpdateManager;->mUpgradeFileHasReadied:Z .line 702 iget-object v0, p0, Lcom/viatech/update/UpdateManager;->mUpgradeHandler:Landroid/os/Handler; if-eqz v0, :cond_7 .line 703 iget-object v0, p0, Lcom/viatech/update/UpdateManager;->mUpgradeHandler:Landroid/os/Handler; iget-object v1, p0, Lcom/viatech/update/UpdateManager;->mUpgradeHandler:Landroid/os/Handler; const/16 v2, 0x3ec const/16 v3, 0x64 const/4 v4, -0x1 const/4 v5, 0x0 invoke-virtual {v1, v2, v3, v4, v5}, Landroid/os/Handler;->obtainMessage(IIILjava/lang/Object;)Landroid/os/Message; move-result-object v1 invoke-virtual {v0, v1}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z .line 704 iget-object v0, p0, Lcom/viatech/update/UpdateManager;->mUpgradeHandler:Landroid/os/Handler; const/16 v1, 0x3ea invoke-virtual {v0, v1}, Landroid/os/Handler;->removeMessages(I)V .line 705 iget-object v0, p0, Lcom/viatech/update/UpdateManager;->mUpgradeHandler:Landroid/os/Handler; const/16 v1, 0x3ea const-wide/16 v2, 0x3e8 invoke-virtual {v0, v1, v2, v3}, Landroid/os/Handler;->sendEmptyMessageDelayed(IJ)Z .line 708 :cond_7 iget-object v0, p0, Lcom/viatech/update/UpdateManager;->mDeviceInfo:Lcom/viatech/device/DeviceInfo; iget v0, v0, Lcom/viatech/device/DeviceInfo;->version:I const/16 v1, 0x694 if-gt v0, v1, :cond_8 iget-object v0, p0, Lcom/viatech/update/UpdateManager;->mVPaiDevice:Lcom/viatech/device/VPaiDevice; invoke-virtual {v0}, Lcom/viatech/device/VPaiDevice;->isUSBDevice()Z move-result v0 if-eqz v0, :cond_8 .line 709 const-string v0, "Vpai_Upgrade" new-instance v1, Ljava/lang/StringBuilder; invoke-direct {v1}, Ljava/lang/StringBuilder;->()V const-string v2, "UpgradeD Device to restart decie as version = " invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v1 iget-object v2, p0, Lcom/viatech/update/UpdateManager;->mDeviceInfo:Lcom/viatech/device/DeviceInfo; iget v2, v2, Lcom/viatech/device/DeviceInfo;->version:I invoke-virtual {v1, v2}, 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;->d(Ljava/lang/String;Ljava/lang/String;)I .line 710 iget-object v0, p0, Lcom/viatech/update/UpdateManager;->mVPaiDevice:Lcom/viatech/device/VPaiDevice; new-instance v1, Lcom/viatech/update/UpdateManager$7; invoke-direct {v1, p0}, Lcom/viatech/update/UpdateManager$7;->(Lcom/viatech/update/UpdateManager;)V invoke-virtual {v0, v1}, Lcom/viatech/device/VPaiDevice;->restartDevice(Lcom/viatech/device/DeviceMessage$DeviceMessageCallback;)V .line 717 :cond_8 iget-object v0, p0, Lcom/viatech/update/UpdateManager;->mDeviceInfo:Lcom/viatech/device/DeviceInfo; const/4 v1, 0x0 iput v1, v0, Lcom/viatech/device/DeviceInfo;->isupdate:I :try_end_1 .catch Lorg/json/JSONException; {:try_start_1 .. :try_end_1} :catch_0 goto/16 :goto_0 .end method .method public sendFirmeareLength()I .locals 5 .prologue const/4 v0, -0x1 .line 517 .line 519 :try_start_0 const-string v1, "Vpai_Upgrade" const-string v2, "sendFirmeareLength() run" invoke-static {v1, v2}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I .line 520 iget-object v1, p0, Lcom/viatech/update/UpdateManager;->mDeviceInfo:Lcom/viatech/device/DeviceInfo; iget-object v1, v1, Lcom/viatech/device/DeviceInfo;->module:Ljava/lang/String; iget-object v2, p0, Lcom/viatech/update/UpdateManager;->mDeviceInfo:Lcom/viatech/device/DeviceInfo; iget v2, v2, Lcom/viatech/device/DeviceInfo;->version:I iget-object v3, p0, Lcom/viatech/update/UpdateManager;->mDeviceInfo:Lcom/viatech/device/DeviceInfo; iget v3, v3, Lcom/viatech/device/DeviceInfo;->newversion:I invoke-virtual {p0, v1, v2, v3}, Lcom/viatech/update/UpdateManager;->getFileName(Ljava/lang/String;II)Ljava/lang/String; move-result-object v1 .line 521 new-instance v2, Ljava/io/File; invoke-direct {v2, v1}, Ljava/io/File;->(Ljava/lang/String;)V .line 522 invoke-virtual {v2}, Ljava/io/File;->exists()Z move-result v3 if-nez v3, :cond_0 .line 523 const-string v2, "Vpai_Upgrade" new-instance v3, Ljava/lang/StringBuilder; invoke-direct {v3}, Ljava/lang/StringBuilder;->()V const-string v4, "the update file is not exists. filename=" 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 v1 invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v1 invoke-static {v2, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I .line 555 :goto_0 return v0 .line 527 :cond_0 new-instance v3, Ljava/io/FileInputStream; invoke-direct {v3, v2}, Ljava/io/FileInputStream;->(Ljava/io/File;)V .line 528 invoke-virtual {v3}, Ljava/io/InputStream;->available()I move-result v1 .line 529 invoke-virtual {v3}, Ljava/io/InputStream;->close()V .line 530 iget-object v2, p0, Lcom/viatech/update/UpdateManager;->mVPaiDevice:Lcom/viatech/device/VPaiDevice; new-instance v3, Lcom/viatech/update/UpdateManager$6; invoke-direct {v3, p0}, Lcom/viatech/update/UpdateManager$6;->(Lcom/viatech/update/UpdateManager;)V invoke-virtual {v2, v1, v3}, Lcom/viatech/device/VPaiDevice;->upgradeDevice(ILcom/viatech/device/DeviceMessage$DeviceMessageCallback;)V :try_end_0 .catch Ljava/io/FileNotFoundException; {:try_start_0 .. :try_end_0} :catch_0 .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_1 .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_2 move v0, v1 .line 555 goto :goto_0 .line 546 :catch_0 move-exception v1 .line 547 const-string v2, "Vpai_Upgrade" invoke-virtual {v1}, Ljava/io/FileNotFoundException;->getMessage()Ljava/lang/String; move-result-object v1 invoke-static {v2, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I goto :goto_0 .line 549 :catch_1 move-exception v0 .line 550 const-string v1, "Vpai_Upgrade" invoke-virtual {v0}, Ljava/io/IOException;->getMessage()Ljava/lang/String; move-result-object v0 invoke-static {v1, v0}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I .line 551 const/4 v0, -0x2 goto :goto_0 .line 552 :catch_2 move-exception v0 .line 553 const/4 v0, -0x3 goto :goto_0 .end method .method public setUpgradeHandler(Landroid/os/Handler;)V .locals 0 .prologue .line 508 iput-object p1, p0, Lcom/viatech/update/UpdateManager;->mUpgradeHandler:Landroid/os/Handler; .line 509 return-void .end method .method public startUpgradeDevice()Z .locals 4 .prologue const/4 v0, 0x0 .line 560 iget-object v1, p0, Lcom/viatech/update/UpdateManager;->mVPaiDevice:Lcom/viatech/device/VPaiDevice; iget v1, v1, Lcom/viatech/device/VPaiDevice;->ctrlStatus:I const/4 v2, 0x2 if-eq v1, v2, :cond_0 .line 561 const-string v1, "Vpai_Upgrade" const-string v2, "ctrl port is not connected" invoke-static {v1, v2}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I .line 573 :goto_0 return v0 .line 564 :cond_0 iget-object v1, p0, Lcom/viatech/update/UpdateManager;->mDeviceInfo:Lcom/viatech/device/DeviceInfo; iget-object v1, v1, Lcom/viatech/device/DeviceInfo;->module:Ljava/lang/String; iget-object v2, p0, Lcom/viatech/update/UpdateManager;->mDeviceInfo:Lcom/viatech/device/DeviceInfo; iget v2, v2, Lcom/viatech/device/DeviceInfo;->version:I iget-object v3, p0, Lcom/viatech/update/UpdateManager;->mDeviceInfo:Lcom/viatech/device/DeviceInfo; iget v3, v3, Lcom/viatech/device/DeviceInfo;->newversion:I invoke-virtual {p0, v1, v2, v3}, Lcom/viatech/update/UpdateManager;->getFileName(Ljava/lang/String;II)Ljava/lang/String; move-result-object v1 .line 565 new-instance v2, Ljava/io/File; invoke-direct {v2, v1}, Ljava/io/File;->(Ljava/lang/String;)V .line 566 invoke-virtual {v2}, Ljava/io/File;->exists()Z move-result v1 if-nez v1, :cond_1 .line 567 const-string v1, "Vpai_Upgrade" const-string v2, "the update fine is not exists." invoke-static {v1, v2}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I goto :goto_0 .line 570 :cond_1 const-string v0, "Vpai_Upgrade" const-string v1, "startUpgradeDevice()!" invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I .line 571 new-instance v0, Lcom/viatech/update/UpdateManager$UpgradeDeviceThreadRunnable; iget-object v1, p0, Lcom/viatech/update/UpdateManager;->mUpgradeHandler:Landroid/os/Handler; invoke-direct {v0, p0, v1}, Lcom/viatech/update/UpdateManager$UpgradeDeviceThreadRunnable;->(Lcom/viatech/update/UpdateManager;Landroid/os/Handler;)V iput-object v0, p0, Lcom/viatech/update/UpdateManager;->mUpgradeDeviceThreadRunnable:Lcom/viatech/update/UpdateManager$UpgradeDeviceThreadRunnable; .line 572 iget-object v0, p0, Lcom/viatech/update/UpdateManager;->mWorkHandler:Landroid/os/Handler; iget-object v1, p0, Lcom/viatech/update/UpdateManager;->mUpgradeDeviceThreadRunnable:Lcom/viatech/update/UpdateManager$UpgradeDeviceThreadRunnable; invoke-virtual {v0, v1}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z .line 573 const/4 v0, 0x1 goto :goto_0 .end method .method public stopUpgradeDevice()V .locals 3 .prologue const/4 v2, 0x0 .line 577 iget-object v0, p0, Lcom/viatech/update/UpdateManager;->mUpgradeDeviceThreadRunnable:Lcom/viatech/update/UpdateManager$UpgradeDeviceThreadRunnable; if-eqz v0, :cond_0 .line 578 iget-object v0, p0, Lcom/viatech/update/UpdateManager;->mUpgradeDeviceThreadRunnable:Lcom/viatech/update/UpdateManager$UpgradeDeviceThreadRunnable; invoke-virtual {v0}, Lcom/viatech/update/UpdateManager$UpgradeDeviceThreadRunnable;->setStop()V .line 579 iget-object v0, p0, Lcom/viatech/update/UpdateManager;->mWorkHandler:Landroid/os/Handler; iget-object v1, p0, Lcom/viatech/update/UpdateManager;->mUpgradeDeviceThreadRunnable:Lcom/viatech/update/UpdateManager$UpgradeDeviceThreadRunnable; invoke-virtual {v0, v1}, Landroid/os/Handler;->removeCallbacks(Ljava/lang/Runnable;)V .line 581 :cond_0 iput-object v2, p0, Lcom/viatech/update/UpdateManager;->mUpgradeDeviceThreadRunnable:Lcom/viatech/update/UpdateManager$UpgradeDeviceThreadRunnable; .line 582 iput-object v2, p0, Lcom/viatech/update/UpdateManager;->mUpgradeHandler:Landroid/os/Handler; .line 583 invoke-virtual {p0}, Lcom/viatech/update/UpdateManager;->destory()V .line 584 return-void .end method