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.
271 lines
7.3 KiB
271 lines
7.3 KiB
.class Lcom/viatech/util/OnlineUpgradeManager$UpgradeInfo; |
|
.super Ljava/lang/Object; |
|
.source "OnlineUpgradeManager.java" |
|
|
|
|
|
# annotations |
|
.annotation system Ldalvik/annotation/EnclosingClass; |
|
value = Lcom/viatech/util/OnlineUpgradeManager; |
|
.end annotation |
|
|
|
.annotation system Ldalvik/annotation/InnerClass; |
|
accessFlags = 0x8 |
|
name = "UpgradeInfo" |
|
.end annotation |
|
|
|
|
|
# instance fields |
|
.field log:Ljava/lang/String; |
|
|
|
.field name:Ljava/lang/String; |
|
|
|
.field url:Ljava/lang/String; |
|
|
|
.field versionCode:I |
|
|
|
.field versionName:Ljava/lang/String; |
|
|
|
|
|
# direct methods |
|
.method constructor <init>()V |
|
.locals 0 |
|
|
|
.prologue |
|
.line 492 |
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V |
|
|
|
return-void |
|
.end method |
|
|
|
.method static parseUpgradeInfo(Ljava/lang/String;)Lcom/viatech/util/OnlineUpgradeManager$UpgradeInfo; |
|
.locals 5 |
|
|
|
.prologue |
|
.line 502 |
|
:try_start_0 |
|
new-instance v0, Lcom/viatech/util/OnlineUpgradeManager$UpgradeInfo; |
|
|
|
invoke-direct {v0}, Lcom/viatech/util/OnlineUpgradeManager$UpgradeInfo;-><init>()V |
|
|
|
.line 503 |
|
new-instance v1, Lorg/json/JSONObject; |
|
|
|
invoke-direct {v1, p0}, Lorg/json/JSONObject;-><init>(Ljava/lang/String;)V |
|
|
|
.line 504 |
|
const-string v2, "VPAI_OnlineUpgradeManager" |
|
|
|
new-instance v3, Ljava/lang/StringBuilder; |
|
|
|
invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V |
|
|
|
const-string v4, "apk update JSON: " |
|
|
|
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v3 |
|
|
|
invoke-virtual {v3, p0}, 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 505 |
|
const-string v2, "VPAI.apk" |
|
|
|
iput-object v2, v0, Lcom/viatech/util/OnlineUpgradeManager$UpgradeInfo;->name:Ljava/lang/String; |
|
|
|
.line 506 |
|
const-string v2, "latestversion" |
|
|
|
invoke-virtual {v1, v2}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String; |
|
|
|
move-result-object v2 |
|
|
|
iput-object v2, v0, Lcom/viatech/util/OnlineUpgradeManager$UpgradeInfo;->versionName:Ljava/lang/String; |
|
|
|
.line 507 |
|
const-string v2, "latestversioncode" |
|
|
|
invoke-virtual {v1, v2}, Lorg/json/JSONObject;->optInt(Ljava/lang/String;)I |
|
|
|
move-result v2 |
|
|
|
iput v2, v0, Lcom/viatech/util/OnlineUpgradeManager$UpgradeInfo;->versionCode:I |
|
|
|
.line 508 |
|
const-string v2, "url" |
|
|
|
invoke-virtual {v1, v2}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String; |
|
|
|
move-result-object v2 |
|
|
|
iput-object v2, v0, Lcom/viatech/util/OnlineUpgradeManager$UpgradeInfo;->url:Ljava/lang/String; |
|
|
|
.line 509 |
|
const-string v2, "changelog" |
|
|
|
invoke-virtual {v1, v2}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String; |
|
|
|
move-result-object v1 |
|
|
|
iput-object v1, v0, Lcom/viatech/util/OnlineUpgradeManager$UpgradeInfo;->log:Ljava/lang/String; |
|
:try_end_0 |
|
.catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0 |
|
|
|
.line 515 |
|
:goto_0 |
|
return-object v0 |
|
|
|
.line 511 |
|
:catch_0 |
|
move-exception v0 |
|
|
|
.line 513 |
|
invoke-virtual {v0}, Lorg/json/JSONException;->printStackTrace()V |
|
|
|
.line 515 |
|
const/4 v0, 0x0 |
|
|
|
goto :goto_0 |
|
.end method |
|
|
|
|
|
# virtual methods |
|
.method public toString()Ljava/lang/String; |
|
.locals 3 |
|
|
|
.prologue |
|
.line 519 |
|
new-instance v0, Ljava/lang/StringBuilder; |
|
|
|
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V |
|
|
|
.line 520 |
|
new-instance v1, Ljava/lang/StringBuilder; |
|
|
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V |
|
|
|
const-string v2, "[versionName = " |
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v1 |
|
|
|
iget-object v2, p0, Lcom/viatech/util/OnlineUpgradeManager$UpgradeInfo;->versionName:Ljava/lang/String; |
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v1 |
|
|
|
const-string v2, ", " |
|
|
|
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-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
.line 521 |
|
new-instance v1, Ljava/lang/StringBuilder; |
|
|
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V |
|
|
|
const-string v2, "versionCode = " |
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v1 |
|
|
|
iget v2, p0, Lcom/viatech/util/OnlineUpgradeManager$UpgradeInfo;->versionCode:I |
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v1 |
|
|
|
const-string v2, ", " |
|
|
|
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-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
.line 522 |
|
new-instance v1, Ljava/lang/StringBuilder; |
|
|
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V |
|
|
|
const-string v2, "url = " |
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v1 |
|
|
|
iget-object v2, p0, Lcom/viatech/util/OnlineUpgradeManager$UpgradeInfo;->url:Ljava/lang/String; |
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v1 |
|
|
|
const-string v2, ", " |
|
|
|
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-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
.line 523 |
|
new-instance v1, Ljava/lang/StringBuilder; |
|
|
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V |
|
|
|
const-string v2, "log = " |
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v1 |
|
|
|
iget-object v2, p0, Lcom/viatech/util/OnlineUpgradeManager$UpgradeInfo;->log:Ljava/lang/String; |
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v1 |
|
|
|
const-string v2, "]" |
|
|
|
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-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
.line 524 |
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; |
|
|
|
move-result-object v0 |
|
|
|
return-object v0 |
|
.end method
|
|
|