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.
811 lines
23 KiB
811 lines
23 KiB
2 years ago
|
.class final Lcom/viatech/update/UpdateManager$DownFirmwareThreadRunnable;
|
||
|
.super Ljava/lang/Object;
|
||
|
.source "UpdateManager.java"
|
||
|
|
||
|
# interfaces
|
||
|
.implements Ljava/lang/Runnable;
|
||
|
|
||
|
|
||
|
# annotations
|
||
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
||
|
value = Lcom/viatech/update/UpdateManager;
|
||
|
.end annotation
|
||
|
|
||
|
.annotation system Ldalvik/annotation/InnerClass;
|
||
|
accessFlags = 0x12
|
||
|
name = "DownFirmwareThreadRunnable"
|
||
|
.end annotation
|
||
|
|
||
|
|
||
|
# instance fields
|
||
|
.field private mDevInfo:Lcom/viatech/device/DeviceInfo;
|
||
|
|
||
|
.field private mUrl:Ljava/lang/String;
|
||
|
|
||
|
.field final synthetic this$0:Lcom/viatech/update/UpdateManager;
|
||
|
|
||
|
|
||
|
# direct methods
|
||
|
.method public constructor <init>(Lcom/viatech/update/UpdateManager;Ljava/lang/String;Lcom/viatech/device/DeviceInfo;)V
|
||
|
.locals 3
|
||
|
|
||
|
.prologue
|
||
|
.line 252
|
||
|
iput-object p1, p0, Lcom/viatech/update/UpdateManager$DownFirmwareThreadRunnable;->this$0:Lcom/viatech/update/UpdateManager;
|
||
|
|
||
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
||
|
|
||
|
.line 253
|
||
|
iput-object p2, p0, Lcom/viatech/update/UpdateManager$DownFirmwareThreadRunnable;->mUrl:Ljava/lang/String;
|
||
|
|
||
|
.line 254
|
||
|
iput-object p3, p0, Lcom/viatech/update/UpdateManager$DownFirmwareThreadRunnable;->mDevInfo:Lcom/viatech/device/DeviceInfo;
|
||
|
|
||
|
.line 255
|
||
|
const-string v0, "Vpai_Upgrade"
|
||
|
|
||
|
new-instance v1, Ljava/lang/StringBuilder;
|
||
|
|
||
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
|
||
|
|
||
|
const-string v2, "DownFirmwareThreadRunnable() mUrl="
|
||
|
|
||
|
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$DownFirmwareThreadRunnable;->mUrl:Ljava/lang/String;
|
||
|
|
||
|
invoke-virtual {v1, v2}, 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 {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
|
||
|
|
||
|
.line 256
|
||
|
return-void
|
||
|
.end method
|
||
|
|
||
|
|
||
|
# virtual methods
|
||
|
.method public run()V
|
||
|
.locals 14
|
||
|
|
||
|
.prologue
|
||
|
const/4 v2, 0x0
|
||
|
|
||
|
.line 260
|
||
|
sget-object v0, Lcom/viatech/Config;->f:Ljava/lang/String;
|
||
|
|
||
|
invoke-static {v0}, Lcom/viatech/util/Util;->getAvailableSpace(Ljava/lang/String;)J
|
||
|
|
||
|
move-result-wide v0
|
||
|
|
||
|
const-wide/32 v4, 0x11e1a300
|
||
|
|
||
|
cmp-long v0, v0, v4
|
||
|
|
||
|
if-gez v0, :cond_1
|
||
|
|
||
|
.line 261
|
||
|
const-string v0, "Vpai_Upgrade"
|
||
|
|
||
|
const-string v1, "update firmware error reason: low storage"
|
||
|
|
||
|
invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
|
||
|
|
||
|
.line 262
|
||
|
iget-object v0, p0, Lcom/viatech/update/UpdateManager$DownFirmwareThreadRunnable;->this$0:Lcom/viatech/update/UpdateManager;
|
||
|
|
||
|
invoke-virtual {v0}, Lcom/viatech/update/UpdateManager;->destory()V
|
||
|
|
||
|
.line 342
|
||
|
:cond_0
|
||
|
:goto_0
|
||
|
return-void
|
||
|
|
||
|
.line 266
|
||
|
:cond_1
|
||
|
const/4 v1, 0x0
|
||
|
|
||
|
.line 269
|
||
|
:try_start_0
|
||
|
new-instance v0, Ljava/net/URL;
|
||
|
|
||
|
iget-object v3, p0, Lcom/viatech/update/UpdateManager$DownFirmwareThreadRunnable;->mUrl:Ljava/lang/String;
|
||
|
|
||
|
invoke-direct {v0, v3}, Ljava/net/URL;-><init>(Ljava/lang/String;)V
|
||
|
|
||
|
.line 270
|
||
|
invoke-virtual {v0}, Ljava/net/URL;->openConnection()Ljava/net/URLConnection;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
check-cast v0, Ljava/net/HttpURLConnection;
|
||
|
:try_end_0
|
||
|
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_1
|
||
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
||
|
|
||
|
.line 272
|
||
|
:try_start_1
|
||
|
iget-object v1, p0, Lcom/viatech/update/UpdateManager$DownFirmwareThreadRunnable;->this$0:Lcom/viatech/update/UpdateManager;
|
||
|
|
||
|
new-instance v3, Ljava/lang/StringBuilder;
|
||
|
|
||
|
invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V
|
||
|
|
||
|
sget-object v4, Lcom/viatech/Config;->f:Ljava/lang/String;
|
||
|
|
||
|
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
||
|
|
||
|
move-result-object v3
|
||
|
|
||
|
const-string v4, "/"
|
||
|
|
||
|
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
||
|
|
||
|
move-result-object v3
|
||
|
|
||
|
iget-object v4, p0, Lcom/viatech/update/UpdateManager$DownFirmwareThreadRunnable;->mUrl:Ljava/lang/String;
|
||
|
|
||
|
iget-object v5, p0, Lcom/viatech/update/UpdateManager$DownFirmwareThreadRunnable;->mUrl:Ljava/lang/String;
|
||
|
|
||
|
const-string v6, "/"
|
||
|
|
||
|
invoke-virtual {v5, v6}, Ljava/lang/String;->lastIndexOf(Ljava/lang/String;)I
|
||
|
|
||
|
move-result v5
|
||
|
|
||
|
add-int/lit8 v5, v5, 0x1
|
||
|
|
||
|
invoke-virtual {v4, v5}, Ljava/lang/String;->substring(I)Ljava/lang/String;
|
||
|
|
||
|
move-result-object v4
|
||
|
|
||
|
invoke-virtual {v3, v4}, 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 {v1, v3}, Lcom/viatech/update/UpdateManager;->access$902(Lcom/viatech/update/UpdateManager;Ljava/lang/String;)Ljava/lang/String;
|
||
|
|
||
|
.line 273
|
||
|
iget-object v1, p0, Lcom/viatech/update/UpdateManager$DownFirmwareThreadRunnable;->this$0:Lcom/viatech/update/UpdateManager;
|
||
|
|
||
|
invoke-static {v1}, Lcom/viatech/update/UpdateManager;->access$900(Lcom/viatech/update/UpdateManager;)Ljava/lang/String;
|
||
|
|
||
|
move-result-object v1
|
||
|
|
||
|
iget-object v3, p0, Lcom/viatech/update/UpdateManager$DownFirmwareThreadRunnable;->this$0:Lcom/viatech/update/UpdateManager;
|
||
|
|
||
|
invoke-static {v3}, Lcom/viatech/update/UpdateManager;->access$900(Lcom/viatech/update/UpdateManager;)Ljava/lang/String;
|
||
|
|
||
|
move-result-object v3
|
||
|
|
||
|
const-string v4, "-"
|
||
|
|
||
|
invoke-virtual {v3, v4}, Ljava/lang/String;->lastIndexOf(Ljava/lang/String;)I
|
||
|
|
||
|
move-result v3
|
||
|
|
||
|
add-int/lit8 v3, v3, 0x1
|
||
|
|
||
|
iget-object v4, p0, Lcom/viatech/update/UpdateManager$DownFirmwareThreadRunnable;->this$0:Lcom/viatech/update/UpdateManager;
|
||
|
|
||
|
invoke-static {v4}, Lcom/viatech/update/UpdateManager;->access$900(Lcom/viatech/update/UpdateManager;)Ljava/lang/String;
|
||
|
|
||
|
move-result-object v4
|
||
|
|
||
|
const-string v5, "."
|
||
|
|
||
|
invoke-virtual {v4, v5}, Ljava/lang/String;->lastIndexOf(Ljava/lang/String;)I
|
||
|
|
||
|
move-result v4
|
||
|
|
||
|
invoke-virtual {v1, v3, v4}, Ljava/lang/String;->substring(II)Ljava/lang/String;
|
||
|
|
||
|
move-result-object v4
|
||
|
|
||
|
.line 274
|
||
|
const-string v1, "Vpai_Upgrade"
|
||
|
|
||
|
new-instance v3, Ljava/lang/StringBuilder;
|
||
|
|
||
|
invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V
|
||
|
|
||
|
const-string v5, "DownFirmwareThreadRunnable runing mDownloadUpdateFwPath="
|
||
|
|
||
|
invoke-virtual {v3, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
||
|
|
||
|
move-result-object v3
|
||
|
|
||
|
iget-object v5, p0, Lcom/viatech/update/UpdateManager$DownFirmwareThreadRunnable;->this$0:Lcom/viatech/update/UpdateManager;
|
||
|
|
||
|
invoke-static {v5}, Lcom/viatech/update/UpdateManager;->access$900(Lcom/viatech/update/UpdateManager;)Ljava/lang/String;
|
||
|
|
||
|
move-result-object v5
|
||
|
|
||
|
invoke-virtual {v3, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
||
|
|
||
|
move-result-object v3
|
||
|
|
||
|
const-string v5, ", newversion="
|
||
|
|
||
|
invoke-virtual {v3, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
||
|
|
||
|
move-result-object v3
|
||
|
|
||
|
invoke-virtual {v3, v4}, 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 {v1, v3}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
|
||
|
|
||
|
.line 275
|
||
|
new-instance v1, Ljava/lang/StringBuilder;
|
||
|
|
||
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
|
||
|
|
||
|
iget-object v3, p0, Lcom/viatech/update/UpdateManager$DownFirmwareThreadRunnable;->this$0:Lcom/viatech/update/UpdateManager;
|
||
|
|
||
|
invoke-static {v3}, Lcom/viatech/update/UpdateManager;->access$900(Lcom/viatech/update/UpdateManager;)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, ".tmp"
|
||
|
|
||
|
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
|
||
|
|
||
|
.line 276
|
||
|
new-instance v5, Ljava/io/File;
|
||
|
|
||
|
iget-object v3, p0, Lcom/viatech/update/UpdateManager$DownFirmwareThreadRunnable;->this$0:Lcom/viatech/update/UpdateManager;
|
||
|
|
||
|
invoke-static {v3}, Lcom/viatech/update/UpdateManager;->access$900(Lcom/viatech/update/UpdateManager;)Ljava/lang/String;
|
||
|
|
||
|
move-result-object v3
|
||
|
|
||
|
invoke-direct {v5, v3}, Ljava/io/File;-><init>(Ljava/lang/String;)V
|
||
|
|
||
|
.line 277
|
||
|
new-instance v6, Ljava/io/File;
|
||
|
|
||
|
invoke-direct {v6, v1}, Ljava/io/File;-><init>(Ljava/lang/String;)V
|
||
|
|
||
|
.line 278
|
||
|
invoke-virtual {v5}, Ljava/io/File;->exists()Z
|
||
|
|
||
|
move-result v1
|
||
|
|
||
|
if-nez v1, :cond_7
|
||
|
|
||
|
.line 279
|
||
|
iget-object v1, p0, Lcom/viatech/update/UpdateManager$DownFirmwareThreadRunnable;->this$0:Lcom/viatech/update/UpdateManager;
|
||
|
|
||
|
iget-object v3, p0, Lcom/viatech/update/UpdateManager$DownFirmwareThreadRunnable;->mDevInfo:Lcom/viatech/device/DeviceInfo;
|
||
|
|
||
|
iget-object v3, v3, Lcom/viatech/device/DeviceInfo;->module:Ljava/lang/String;
|
||
|
|
||
|
iget-object v7, p0, Lcom/viatech/update/UpdateManager$DownFirmwareThreadRunnable;->mDevInfo:Lcom/viatech/device/DeviceInfo;
|
||
|
|
||
|
iget v7, v7, Lcom/viatech/device/DeviceInfo;->version:I
|
||
|
|
||
|
invoke-static {v4}, Ljava/lang/Integer;->valueOf(Ljava/lang/String;)Ljava/lang/Integer;
|
||
|
|
||
|
move-result-object v8
|
||
|
|
||
|
invoke-virtual {v8}, Ljava/lang/Integer;->intValue()I
|
||
|
|
||
|
move-result v8
|
||
|
|
||
|
invoke-static {v1, v3, v7, v8}, Lcom/viatech/update/UpdateManager;->access$1000(Lcom/viatech/update/UpdateManager;Ljava/lang/String;II)V
|
||
|
|
||
|
.line 280
|
||
|
invoke-virtual {v6}, Ljava/io/File;->exists()Z
|
||
|
|
||
|
move-result v1
|
||
|
|
||
|
if-eqz v1, :cond_2
|
||
|
|
||
|
.line 281
|
||
|
invoke-virtual {v6}, Ljava/io/File;->delete()Z
|
||
|
|
||
|
.line 283
|
||
|
:cond_2
|
||
|
invoke-virtual {v0}, Ljava/net/HttpURLConnection;->getInputStream()Ljava/io/InputStream;
|
||
|
|
||
|
move-result-object v7
|
||
|
|
||
|
.line 284
|
||
|
invoke-virtual {v6}, Ljava/io/File;->createNewFile()Z
|
||
|
|
||
|
.line 285
|
||
|
new-instance v8, Ljava/io/FileOutputStream;
|
||
|
|
||
|
invoke-direct {v8, v6}, Ljava/io/FileOutputStream;-><init>(Ljava/io/File;)V
|
||
|
|
||
|
.line 287
|
||
|
const/16 v1, 0x400
|
||
|
|
||
|
new-array v9, v1, [B
|
||
|
|
||
|
.line 288
|
||
|
invoke-virtual {v0}, Ljava/net/HttpURLConnection;->getContentLength()I
|
||
|
|
||
|
move-result v10
|
||
|
|
||
|
.line 292
|
||
|
invoke-virtual {v7, v9}, Ljava/io/InputStream;->read([B)I
|
||
|
|
||
|
move-result v1
|
||
|
|
||
|
move v3, v2
|
||
|
|
||
|
.line 293
|
||
|
:goto_1
|
||
|
const/4 v11, -0x1
|
||
|
|
||
|
if-eq v1, v11, :cond_3
|
||
|
|
||
|
iget-object v11, p0, Lcom/viatech/update/UpdateManager$DownFirmwareThreadRunnable;->this$0:Lcom/viatech/update/UpdateManager;
|
||
|
|
||
|
invoke-static {v11}, Lcom/viatech/update/UpdateManager;->access$1100(Lcom/viatech/update/UpdateManager;)Z
|
||
|
|
||
|
move-result v11
|
||
|
|
||
|
if-nez v11, :cond_3
|
||
|
|
||
|
.line 294
|
||
|
const/4 v11, 0x0
|
||
|
|
||
|
invoke-virtual {v8, v9, v11, v1}, Ljava/io/OutputStream;->write([BII)V
|
||
|
|
||
|
.line 295
|
||
|
add-int/2addr v3, v1
|
||
|
|
||
|
.line 296
|
||
|
int-to-float v1, v3
|
||
|
|
||
|
const/high16 v11, 0x3f800000 # 1.0f
|
||
|
|
||
|
mul-float/2addr v1, v11
|
||
|
|
||
|
int-to-float v11, v10
|
||
|
|
||
|
div-float/2addr v1, v11
|
||
|
|
||
|
const/high16 v11, 0x42c80000 # 100.0f
|
||
|
|
||
|
mul-float/2addr v1, v11
|
||
|
|
||
|
float-to-int v1, v1
|
||
|
|
||
|
.line 297
|
||
|
if-le v1, v2, :cond_a
|
||
|
|
||
|
.line 299
|
||
|
const-string v2, "Vpai_Upgrade"
|
||
|
|
||
|
new-instance v11, Ljava/lang/StringBuilder;
|
||
|
|
||
|
invoke-direct {v11}, Ljava/lang/StringBuilder;-><init>()V
|
||
|
|
||
|
const-string v12, "upgrade donwloading percent="
|
||
|
|
||
|
invoke-virtual {v11, v12}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
||
|
|
||
|
move-result-object v11
|
||
|
|
||
|
invoke-virtual {v11, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
||
|
|
||
|
move-result-object v11
|
||
|
|
||
|
invoke-virtual {v11}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
||
|
|
||
|
move-result-object v11
|
||
|
|
||
|
invoke-static {v2, v11}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
|
||
|
|
||
|
.line 302
|
||
|
:goto_2
|
||
|
invoke-virtual {v7, v9}, Ljava/io/InputStream;->read([B)I
|
||
|
|
||
|
move-result v2
|
||
|
|
||
|
move v13, v2
|
||
|
|
||
|
move v2, v1
|
||
|
|
||
|
move v1, v13
|
||
|
|
||
|
goto :goto_1
|
||
|
|
||
|
.line 304
|
||
|
:cond_3
|
||
|
invoke-virtual {v8}, Ljava/io/OutputStream;->flush()V
|
||
|
|
||
|
.line 305
|
||
|
invoke-virtual {v8}, Ljava/io/OutputStream;->close()V
|
||
|
|
||
|
.line 306
|
||
|
invoke-virtual {v7}, Ljava/io/InputStream;->close()V
|
||
|
|
||
|
.line 307
|
||
|
iget-object v1, p0, Lcom/viatech/update/UpdateManager$DownFirmwareThreadRunnable;->this$0:Lcom/viatech/update/UpdateManager;
|
||
|
|
||
|
invoke-static {v1}, Lcom/viatech/update/UpdateManager;->access$1100(Lcom/viatech/update/UpdateManager;)Z
|
||
|
|
||
|
move-result v1
|
||
|
|
||
|
if-nez v1, :cond_4
|
||
|
|
||
|
.line 308
|
||
|
invoke-virtual {v6, v5}, Ljava/io/File;->renameTo(Ljava/io/File;)Z
|
||
|
|
||
|
.line 309
|
||
|
:cond_4
|
||
|
invoke-virtual {v6}, Ljava/io/File;->exists()Z
|
||
|
|
||
|
move-result v1
|
||
|
|
||
|
if-eqz v1, :cond_5
|
||
|
|
||
|
.line 310
|
||
|
invoke-virtual {v6}, Ljava/io/File;->delete()Z
|
||
|
|
||
|
.line 317
|
||
|
:cond_5
|
||
|
:goto_3
|
||
|
iget-object v1, p0, Lcom/viatech/update/UpdateManager$DownFirmwareThreadRunnable;->this$0:Lcom/viatech/update/UpdateManager;
|
||
|
|
||
|
const/4 v2, 0x1
|
||
|
|
||
|
invoke-static {v1, v2}, Lcom/viatech/update/UpdateManager;->access$1202(Lcom/viatech/update/UpdateManager;Z)Z
|
||
|
|
||
|
.line 318
|
||
|
iget-object v1, p0, Lcom/viatech/update/UpdateManager$DownFirmwareThreadRunnable;->mDevInfo:Lcom/viatech/device/DeviceInfo;
|
||
|
|
||
|
const/4 v2, 0x1
|
||
|
|
||
|
iput v2, v1, Lcom/viatech/device/DeviceInfo;->isupdate:I
|
||
|
|
||
|
.line 319
|
||
|
iget-object v1, p0, Lcom/viatech/update/UpdateManager$DownFirmwareThreadRunnable;->mDevInfo:Lcom/viatech/device/DeviceInfo;
|
||
|
|
||
|
invoke-static {v4}, Ljava/lang/Integer;->valueOf(Ljava/lang/String;)Ljava/lang/Integer;
|
||
|
|
||
|
move-result-object v2
|
||
|
|
||
|
invoke-virtual {v2}, Ljava/lang/Integer;->intValue()I
|
||
|
|
||
|
move-result v2
|
||
|
|
||
|
iput v2, v1, Lcom/viatech/device/DeviceInfo;->newversion:I
|
||
|
|
||
|
.line 320
|
||
|
const-string v1, "Vpai_Upgrade"
|
||
|
|
||
|
new-instance v2, Ljava/lang/StringBuilder;
|
||
|
|
||
|
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
|
||
|
|
||
|
const-string v3, "updateDeviceDB isupdate = 1, deviceid="
|
||
|
|
||
|
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
||
|
|
||
|
move-result-object v2
|
||
|
|
||
|
iget-object v3, p0, Lcom/viatech/update/UpdateManager$DownFirmwareThreadRunnable;->mDevInfo:Lcom/viatech/device/DeviceInfo;
|
||
|
|
||
|
iget-object v3, v3, Lcom/viatech/device/DeviceInfo;->deviceid:Ljava/lang/String;
|
||
|
|
||
|
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
||
|
|
||
|
move-result-object v2
|
||
|
|
||
|
const-string v3, ",newdeviceid="
|
||
|
|
||
|
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
||
|
|
||
|
move-result-object v2
|
||
|
|
||
|
iget-object v3, p0, Lcom/viatech/update/UpdateManager$DownFirmwareThreadRunnable;->mDevInfo:Lcom/viatech/device/DeviceInfo;
|
||
|
|
||
|
iget-object v3, v3, Lcom/viatech/device/DeviceInfo;->newdeviceid:Ljava/lang/String;
|
||
|
|
||
|
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
||
|
|
||
|
move-result-object v2
|
||
|
|
||
|
const-string v3, ",newversion="
|
||
|
|
||
|
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
||
|
|
||
|
move-result-object v2
|
||
|
|
||
|
invoke-virtual {v2, v4}, 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 322
|
||
|
iget-object v1, p0, Lcom/viatech/update/UpdateManager$DownFirmwareThreadRunnable;->this$0:Lcom/viatech/update/UpdateManager;
|
||
|
|
||
|
invoke-static {v1}, Lcom/viatech/update/UpdateManager;->access$400(Lcom/viatech/update/UpdateManager;)Lcom/viatech/device/DeviceInfo;
|
||
|
|
||
|
move-result-object v1
|
||
|
|
||
|
if-eqz v1, :cond_6
|
||
|
|
||
|
iget-object v1, p0, Lcom/viatech/update/UpdateManager$DownFirmwareThreadRunnable;->this$0:Lcom/viatech/update/UpdateManager;
|
||
|
|
||
|
invoke-static {v1}, Lcom/viatech/update/UpdateManager;->access$400(Lcom/viatech/update/UpdateManager;)Lcom/viatech/device/DeviceInfo;
|
||
|
|
||
|
move-result-object v1
|
||
|
|
||
|
iget-object v1, v1, Lcom/viatech/device/DeviceInfo;->deviceid:Ljava/lang/String;
|
||
|
|
||
|
if-eqz v1, :cond_6
|
||
|
|
||
|
iget-object v1, p0, Lcom/viatech/update/UpdateManager$DownFirmwareThreadRunnable;->this$0:Lcom/viatech/update/UpdateManager;
|
||
|
|
||
|
invoke-static {v1}, Lcom/viatech/update/UpdateManager;->access$400(Lcom/viatech/update/UpdateManager;)Lcom/viatech/device/DeviceInfo;
|
||
|
|
||
|
move-result-object v1
|
||
|
|
||
|
iget-object v1, v1, Lcom/viatech/device/DeviceInfo;->deviceid:Ljava/lang/String;
|
||
|
|
||
|
invoke-virtual {v1}, Ljava/lang/String;->isEmpty()Z
|
||
|
|
||
|
move-result v1
|
||
|
|
||
|
if-nez v1, :cond_6
|
||
|
|
||
|
.line 323
|
||
|
iget-object v1, p0, Lcom/viatech/update/UpdateManager$DownFirmwareThreadRunnable;->this$0:Lcom/viatech/update/UpdateManager;
|
||
|
|
||
|
invoke-static {v1}, Lcom/viatech/update/UpdateManager;->access$400(Lcom/viatech/update/UpdateManager;)Lcom/viatech/device/DeviceInfo;
|
||
|
|
||
|
move-result-object v1
|
||
|
|
||
|
iget-object v1, v1, Lcom/viatech/device/DeviceInfo;->deviceid:Ljava/lang/String;
|
||
|
|
||
|
iget-object v2, p0, Lcom/viatech/update/UpdateManager$DownFirmwareThreadRunnable;->mDevInfo:Lcom/viatech/device/DeviceInfo;
|
||
|
|
||
|
iget-object v2, v2, Lcom/viatech/device/DeviceInfo;->deviceid:Ljava/lang/String;
|
||
|
|
||
|
invoke-virtual {v1, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
||
|
|
||
|
move-result v1
|
||
|
|
||
|
if-eqz v1, :cond_6
|
||
|
|
||
|
iget-object v1, p0, Lcom/viatech/update/UpdateManager$DownFirmwareThreadRunnable;->mDevInfo:Lcom/viatech/device/DeviceInfo;
|
||
|
|
||
|
iget v1, v1, Lcom/viatech/device/DeviceInfo;->version:I
|
||
|
|
||
|
iget-object v2, p0, Lcom/viatech/update/UpdateManager$DownFirmwareThreadRunnable;->this$0:Lcom/viatech/update/UpdateManager;
|
||
|
|
||
|
invoke-static {v2}, Lcom/viatech/update/UpdateManager;->access$400(Lcom/viatech/update/UpdateManager;)Lcom/viatech/device/DeviceInfo;
|
||
|
|
||
|
move-result-object v2
|
||
|
|
||
|
iget v2, v2, Lcom/viatech/device/DeviceInfo;->version:I
|
||
|
|
||
|
if-ne v1, v2, :cond_6
|
||
|
|
||
|
.line 324
|
||
|
new-instance v1, Landroid/os/Message;
|
||
|
|
||
|
invoke-direct {v1}, Landroid/os/Message;-><init>()V
|
||
|
|
||
|
.line 325
|
||
|
const/16 v2, 0xa
|
||
|
|
||
|
iput v2, v1, Landroid/os/Message;->what:I
|
||
|
|
||
|
.line 326
|
||
|
iget-object v2, p0, Lcom/viatech/update/UpdateManager$DownFirmwareThreadRunnable;->mDevInfo:Lcom/viatech/device/DeviceInfo;
|
||
|
|
||
|
iget-object v2, v2, Lcom/viatech/device/DeviceInfo;->changelog:Ljava/lang/String;
|
||
|
|
||
|
iput-object v2, v1, Landroid/os/Message;->obj:Ljava/lang/Object;
|
||
|
|
||
|
.line 327
|
||
|
iget-object v2, p0, Lcom/viatech/update/UpdateManager$DownFirmwareThreadRunnable;->mDevInfo:Lcom/viatech/device/DeviceInfo;
|
||
|
|
||
|
iget v2, v2, Lcom/viatech/device/DeviceInfo;->newversion:I
|
||
|
|
||
|
iput v2, v1, Landroid/os/Message;->arg1:I
|
||
|
|
||
|
.line 328
|
||
|
iget-object v2, p0, Lcom/viatech/update/UpdateManager$DownFirmwareThreadRunnable;->this$0:Lcom/viatech/update/UpdateManager;
|
||
|
|
||
|
invoke-static {v2}, Lcom/viatech/update/UpdateManager;->access$400(Lcom/viatech/update/UpdateManager;)Lcom/viatech/device/DeviceInfo;
|
||
|
|
||
|
move-result-object v2
|
||
|
|
||
|
iget v2, v2, Lcom/viatech/device/DeviceInfo;->version:I
|
||
|
|
||
|
iput v2, v1, Landroid/os/Message;->arg2:I
|
||
|
|
||
|
.line 329
|
||
|
const-string v2, "Vpai_Upgrade"
|
||
|
|
||
|
new-instance v3, Ljava/lang/StringBuilder;
|
||
|
|
||
|
invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V
|
||
|
|
||
|
const-string v5, "upgrade donwloading finish to show dialog,newversion="
|
||
|
|
||
|
invoke-virtual {v3, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
||
|
|
||
|
move-result-object v3
|
||
|
|
||
|
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
||
|
|
||
|
move-result-object v3
|
||
|
|
||
|
const-string v4, ", log="
|
||
|
|
||
|
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
||
|
|
||
|
move-result-object v3
|
||
|
|
||
|
iget-object v4, p0, Lcom/viatech/update/UpdateManager$DownFirmwareThreadRunnable;->mDevInfo:Lcom/viatech/device/DeviceInfo;
|
||
|
|
||
|
iget-object v4, v4, Lcom/viatech/device/DeviceInfo;->changelog:Ljava/lang/String;
|
||
|
|
||
|
invoke-virtual {v3, v4}, 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 {v2, v3}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
|
||
|
|
||
|
.line 330
|
||
|
iget-object v2, p0, Lcom/viatech/update/UpdateManager$DownFirmwareThreadRunnable;->this$0:Lcom/viatech/update/UpdateManager;
|
||
|
|
||
|
invoke-static {v2}, Lcom/viatech/update/UpdateManager;->access$000(Lcom/viatech/update/UpdateManager;)Landroid/os/Handler;
|
||
|
|
||
|
move-result-object v2
|
||
|
|
||
|
const/16 v3, 0xa
|
||
|
|
||
|
invoke-virtual {v2, v3}, Landroid/os/Handler;->removeMessages(I)V
|
||
|
|
||
|
.line 331
|
||
|
iget-object v2, p0, Lcom/viatech/update/UpdateManager$DownFirmwareThreadRunnable;->this$0:Lcom/viatech/update/UpdateManager;
|
||
|
|
||
|
invoke-static {v2}, Lcom/viatech/update/UpdateManager;->access$000(Lcom/viatech/update/UpdateManager;)Landroid/os/Handler;
|
||
|
|
||
|
move-result-object v2
|
||
|
|
||
|
const-wide/16 v4, 0x3e8
|
||
|
|
||
|
invoke-virtual {v2, v1, v4, v5}, Landroid/os/Handler;->sendMessageDelayed(Landroid/os/Message;J)Z
|
||
|
:try_end_1
|
||
|
.catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_0
|
||
|
.catchall {:try_start_1 .. :try_end_1} :catchall_1
|
||
|
|
||
|
.line 338
|
||
|
:cond_6
|
||
|
if-eqz v0, :cond_0
|
||
|
|
||
|
.line 339
|
||
|
invoke-virtual {v0}, Ljava/net/HttpURLConnection;->disconnect()V
|
||
|
|
||
|
goto/16 :goto_0
|
||
|
|
||
|
.line 314
|
||
|
:cond_7
|
||
|
:try_start_2
|
||
|
const-string v1, "Vpai_Upgrade"
|
||
|
|
||
|
const-string v2, "file exists, download return"
|
||
|
|
||
|
invoke-static {v1, v2}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I
|
||
|
:try_end_2
|
||
|
.catch Ljava/lang/Exception; {:try_start_2 .. :try_end_2} :catch_0
|
||
|
.catchall {:try_start_2 .. :try_end_2} :catchall_1
|
||
|
|
||
|
goto/16 :goto_3
|
||
|
|
||
|
.line 335
|
||
|
:catch_0
|
||
|
move-exception v1
|
||
|
|
||
|
move-object v13, v1
|
||
|
|
||
|
move-object v1, v0
|
||
|
|
||
|
move-object v0, v13
|
||
|
|
||
|
.line 336
|
||
|
:goto_4
|
||
|
:try_start_3
|
||
|
invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V
|
||
|
:try_end_3
|
||
|
.catchall {:try_start_3 .. :try_end_3} :catchall_0
|
||
|
|
||
|
.line 338
|
||
|
if-eqz v1, :cond_8
|
||
|
|
||
|
.line 339
|
||
|
invoke-virtual {v1}, Ljava/net/HttpURLConnection;->disconnect()V
|
||
|
|
||
|
.line 341
|
||
|
:cond_8
|
||
|
iget-object v0, p0, Lcom/viatech/update/UpdateManager$DownFirmwareThreadRunnable;->this$0:Lcom/viatech/update/UpdateManager;
|
||
|
|
||
|
invoke-virtual {v0}, Lcom/viatech/update/UpdateManager;->destory()V
|
||
|
|
||
|
goto/16 :goto_0
|
||
|
|
||
|
.line 338
|
||
|
:catchall_0
|
||
|
move-exception v0
|
||
|
|
||
|
:goto_5
|
||
|
if-eqz v1, :cond_9
|
||
|
|
||
|
.line 339
|
||
|
invoke-virtual {v1}, Ljava/net/HttpURLConnection;->disconnect()V
|
||
|
|
||
|
.line 340
|
||
|
:cond_9
|
||
|
throw v0
|
||
|
|
||
|
.line 338
|
||
|
:catchall_1
|
||
|
move-exception v1
|
||
|
|
||
|
move-object v13, v1
|
||
|
|
||
|
move-object v1, v0
|
||
|
|
||
|
move-object v0, v13
|
||
|
|
||
|
goto :goto_5
|
||
|
|
||
|
.line 335
|
||
|
:catch_1
|
||
|
move-exception v0
|
||
|
|
||
|
goto :goto_4
|
||
|
|
||
|
:cond_a
|
||
|
move v1, v2
|
||
|
|
||
|
goto/16 :goto_2
|
||
|
.end method
|