今奥全景相机
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.

192 lines
5.8 KiB

.class Lcom/viatech/update/UpdateManager$3;
.super Ljava/lang/Object;
.source "UpdateManager.java"
# interfaces
.implements Lcom/viatech/util/HttpRequestManager$OnHttpResponseListener;
# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
value = Lcom/viatech/update/UpdateManager;->upgradeCheckFromVpaiServer(Lcom/viatech/device/DeviceInfo;)V
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x0
name = null
.end annotation
# instance fields
.field final synthetic this$0:Lcom/viatech/update/UpdateManager;
.field final synthetic val$deviceInfo:Lcom/viatech/device/DeviceInfo;
# direct methods
.method constructor <init>(Lcom/viatech/update/UpdateManager;Lcom/viatech/device/DeviceInfo;)V
.locals 0
.prologue
.line 215
iput-object p1, p0, Lcom/viatech/update/UpdateManager$3;->this$0:Lcom/viatech/update/UpdateManager;
iput-object p2, p0, Lcom/viatech/update/UpdateManager$3;->val$deviceInfo:Lcom/viatech/device/DeviceInfo;
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
# virtual methods
.method public onHttpResponse(Ljava/lang/String;)V
.locals 5
.prologue
.line 219
if-eqz p1, :cond_0
.line 220
const-string v0, "Vpai_Upgrade"
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string v2, "Vpai check device return ="
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1, p1}, 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 222
:try_start_0
new-instance v0, Lorg/json/JSONObject;
invoke-direct {v0, p1}, Lorg/json/JSONObject;-><init>(Ljava/lang/String;)V
.line 223
const-string v1, "ret"
invoke-virtual {v0, v1}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;
move-result-object v1
.line 224
const-string v2, "0"
invoke-virtual {v2, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v1
if-eqz v1, :cond_0
.line 225
const-string v1, "url"
invoke-virtual {v0, v1}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;
move-result-object v1
.line 226
invoke-virtual {v1}, Ljava/lang/String;->isEmpty()Z
move-result v2
if-nez v2, :cond_0
.line 227
const-string v2, "Vpai_Upgrade"
const-string v3, "start down firmware thread..."
invoke-static {v2, v3}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
.line 228
iget-object v2, p0, Lcom/viatech/update/UpdateManager$3;->this$0:Lcom/viatech/update/UpdateManager;
const-string v3, "changelog"
invoke-virtual {v0, v3}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;
move-result-object v0
invoke-static {v2, v0}, Lcom/viatech/update/UpdateManager;->access$602(Lcom/viatech/update/UpdateManager;Ljava/lang/String;)Ljava/lang/String;
.line 229
iget-object v0, p0, Lcom/viatech/update/UpdateManager$3;->val$deviceInfo:Lcom/viatech/device/DeviceInfo;
iget-object v2, p0, Lcom/viatech/update/UpdateManager$3;->this$0:Lcom/viatech/update/UpdateManager;
invoke-static {v2}, Lcom/viatech/update/UpdateManager;->access$600(Lcom/viatech/update/UpdateManager;)Ljava/lang/String;
move-result-object v2
iput-object v2, v0, Lcom/viatech/device/DeviceInfo;->changelog:Ljava/lang/String;
.line 230
iget-object v0, p0, Lcom/viatech/update/UpdateManager$3;->this$0:Lcom/viatech/update/UpdateManager;
new-instance v2, Lcom/viatech/update/UpdateManager$DownFirmwareThreadRunnable;
iget-object v3, p0, Lcom/viatech/update/UpdateManager$3;->this$0:Lcom/viatech/update/UpdateManager;
iget-object v4, p0, Lcom/viatech/update/UpdateManager$3;->val$deviceInfo:Lcom/viatech/device/DeviceInfo;
invoke-direct {v2, v3, v1, v4}, Lcom/viatech/update/UpdateManager$DownFirmwareThreadRunnable;-><init>(Lcom/viatech/update/UpdateManager;Ljava/lang/String;Lcom/viatech/device/DeviceInfo;)V
invoke-static {v0, v2}, Lcom/viatech/update/UpdateManager;->access$702(Lcom/viatech/update/UpdateManager;Lcom/viatech/update/UpdateManager$DownFirmwareThreadRunnable;)Lcom/viatech/update/UpdateManager$DownFirmwareThreadRunnable;
.line 231
iget-object v0, p0, Lcom/viatech/update/UpdateManager$3;->this$0:Lcom/viatech/update/UpdateManager;
invoke-static {v0}, Lcom/viatech/update/UpdateManager;->access$800(Lcom/viatech/update/UpdateManager;)Landroid/os/Handler;
move-result-object v0
iget-object v1, p0, Lcom/viatech/update/UpdateManager$3;->this$0:Lcom/viatech/update/UpdateManager;
invoke-static {v1}, Lcom/viatech/update/UpdateManager;->access$700(Lcom/viatech/update/UpdateManager;)Lcom/viatech/update/UpdateManager$DownFirmwareThreadRunnable;
move-result-object v1
invoke-virtual {v0, v1}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
.line 240
:goto_0
return-void
.line 235
:catch_0
move-exception v0
.line 236
const-string v1, "Vpai_Upgrade"
invoke-virtual {v0}, Ljava/lang/Exception;->getMessage()Ljava/lang/String;
move-result-object v0
invoke-static {v1, v0}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
.line 239
:cond_0
iget-object v0, p0, Lcom/viatech/update/UpdateManager$3;->this$0:Lcom/viatech/update/UpdateManager;
invoke-virtual {v0}, Lcom/viatech/update/UpdateManager;->destory()V
goto :goto_0
.end method