115 lines
2.4 KiB
Smali
115 lines
2.4 KiB
Smali
.class public Lcom/moji/http/upt/bean/UpdateBaseResp;
|
|
.super Lcom/moji/requestcore/entity/MJBaseRespRc;
|
|
.source "UpdateBaseResp.java"
|
|
|
|
|
|
# instance fields
|
|
.field public sign:Ljava/lang/String;
|
|
|
|
.field public upgrade:Lcom/google/gson/JsonObject;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>()V
|
|
.locals 0
|
|
|
|
.line 17
|
|
invoke-direct {p0}, Lcom/moji/requestcore/entity/MJBaseRespRc;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public checkHasUpdate()Z
|
|
.locals 1
|
|
|
|
.line 22
|
|
iget-object v0, p0, Lcom/moji/http/upt/bean/UpdateBaseResp;->upgrade:Lcom/google/gson/JsonObject;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
const/4 v0, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
:goto_0
|
|
return v0
|
|
.end method
|
|
|
|
.method public checkValid()Z
|
|
.locals 3
|
|
|
|
.line 25
|
|
iget-object v0, p0, Lcom/moji/http/upt/bean/UpdateBaseResp;->upgrade:Lcom/google/gson/JsonObject;
|
|
|
|
invoke-virtual {v0}, Lcom/google/gson/JsonObject;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
.line 26
|
|
invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
return v2
|
|
|
|
.line 30
|
|
:cond_0
|
|
invoke-static {v0}, Lcom/moji/mjweather/library/Digest;->a(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
.line 31
|
|
iget-object v1, p0, Lcom/moji/http/upt/bean/UpdateBaseResp;->sign:Ljava/lang/String;
|
|
|
|
invoke-static {v1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v1
|
|
|
|
if-nez v1, :cond_1
|
|
|
|
iget-object v1, p0, Lcom/moji/http/upt/bean/UpdateBaseResp;->sign:Ljava/lang/String;
|
|
|
|
invoke-virtual {v1, v0}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
const/4 v0, 0x1
|
|
|
|
return v0
|
|
|
|
:cond_1
|
|
return v2
|
|
.end method
|
|
|
|
.method public getUpdateInfo()Lcom/moji/http/upt/bean/UpdateInfoResp;
|
|
.locals 3
|
|
|
|
.line 38
|
|
new-instance v0, Lcom/google/gson/Gson;
|
|
|
|
invoke-direct {v0}, Lcom/google/gson/Gson;-><init>()V
|
|
|
|
iget-object v1, p0, Lcom/moji/http/upt/bean/UpdateBaseResp;->upgrade:Lcom/google/gson/JsonObject;
|
|
|
|
const-class v2, Lcom/moji/http/upt/bean/UpdateInfoResp;
|
|
|
|
invoke-virtual {v0, v1, v2}, Lcom/google/gson/Gson;->fromJson(Lcom/google/gson/JsonElement;Ljava/lang/Class;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Lcom/moji/http/upt/bean/UpdateInfoResp;
|
|
|
|
return-object v0
|
|
.end method
|