GameResVersionManager$1.smali
.class final Lcom/sandboxol/center/utils/GameResVersionManager$1;
.super Ljava/lang/Object;
.source "GameResVersionManager.java"
# interfaces
.implements Lcom/sandboxol/greendao/a/c;
# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
value = Lcom/sandboxol/center/utils/GameResVersionManager;->resetOldEngineResVersion()V
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x8
name = null
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/lang/Object;",
"Lcom/sandboxol/greendao/a/c<",
"Lcom/sandboxol/greendao/entity/Game;",
">;"
}
.end annotation
# instance fields
.field final synthetic val$gameId:Ljava/lang/String;
.field final synthetic val$jsonObject:Lorg/json/JSONObject;
# direct methods
.method constructor <init>(Lorg/json/JSONObject;Ljava/lang/String;)V
.registers 3
.line 1
iput-object p1, p0, Lcom/sandboxol/center/utils/GameResVersionManager$1;->val$jsonObject:Lorg/json/JSONObject;
iput-object p2, p0, Lcom/sandboxol/center/utils/GameResVersionManager$1;->val$gameId:Ljava/lang/String;
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
# virtual methods
.method public onError(ILjava/lang/String;)V
.registers 5
.line 1
# getter for: Lcom/sandboxol/center/utils/GameResVersionManager;->TAG:Ljava/lang/String;
invoke-static {}, Lcom/sandboxol/center/utils/GameResVersionManager;->access$000()Ljava/lang/String;
move-result-object p1
invoke-static {p1}, Lcom/apkfuns/logutils/c;->a(Ljava/lang/String;)Lcom/apkfuns/logutils/e;
move-result-object p1
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
const-string v1, "resetOldEngineResVersion onError "
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v0, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p2
invoke-interface {p1, p2}, Lcom/apkfuns/logutils/e;->d(Ljava/lang/Object;)V
return-void
.end method
.method public onSuccess(Lcom/sandboxol/greendao/entity/Game;)V
.registers 8
.line 2
:try_start_0
iget-object v0, p0, Lcom/sandboxol/center/utils/GameResVersionManager$1;->val$jsonObject:Lorg/json/JSONObject;
iget-object v1, p0, Lcom/sandboxol/center/utils/GameResVersionManager$1;->val$gameId:Ljava/lang/String;
invoke-virtual {v0, v1}, Lorg/json/JSONObject;->getLong(Ljava/lang/String;)J
move-result-wide v0
if-eqz p1, :cond_55
.line 3
invoke-virtual {p1}, Lcom/sandboxol/greendao/entity/Game;->getLatestResVersions()Lcom/sandboxol/greendao/entity/ResourceLatestVersionData;
move-result-object v2
if-eqz v2, :cond_55
const-wide/16 v2, 0x0
cmp-long v4, v0, v2
if-lez v4, :cond_55
.line 4
invoke-virtual {p1}, Lcom/sandboxol/greendao/entity/Game;->getLatestResVersions()Lcom/sandboxol/greendao/entity/ResourceLatestVersionData;
move-result-object v2
invoke-virtual {v2, v0, v1}, Lcom/sandboxol/greendao/entity/ResourceLatestVersionData;->setGresVersion(J)V
.line 5
invoke-static {}, Lcom/sandboxol/greendao/c/M;->getInstance()Lcom/sandboxol/greendao/c/M;
move-result-object v2
invoke-virtual {v2, p1}, Lcom/sandboxol/greendao/c/M;->a(Lcom/sandboxol/greendao/entity/Game;)V
.line 6
# getter for: Lcom/sandboxol/center/utils/GameResVersionManager;->TAG:Ljava/lang/String;
invoke-static {}, Lcom/sandboxol/center/utils/GameResVersionManager;->access$000()Ljava/lang/String;
move-result-object v2
invoke-static {v2}, Lcom/apkfuns/logutils/c;->a(Ljava/lang/String;)Lcom/apkfuns/logutils/e;
move-result-object v2
new-instance v3, Ljava/lang/StringBuilder;
invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V
const-string v4, "oldVersion :"
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {p1}, Lcom/sandboxol/greendao/entity/Game;->getLatestResVersions()Lcom/sandboxol/greendao/entity/ResourceLatestVersionData;
move-result-object p1
invoke-virtual {p1}, Lcom/sandboxol/greendao/entity/ResourceLatestVersionData;->getGresVersion()J
move-result-wide v4
invoke-virtual {v3, v4, v5}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
const-string p1, ",newVersion:"
invoke-virtual {v3, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v3, v0, v1}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
invoke-interface {v2, p1}, Lcom/apkfuns/logutils/e;->d(Ljava/lang/Object;)V
:try_end_50
.catch Lorg/json/JSONException; {:try_start_0 .. :try_end_50} :catch_51
goto :goto_55
:catch_51
move-exception p1
.line 7
invoke-virtual {p1}, Lorg/json/JSONException;->printStackTrace()V
:cond_55
:goto_55
return-void
.end method
.method public bridge synthetic onSuccess(Ljava/lang/Object;)V
.registers 2
.line 1
check-cast p1, Lcom/sandboxol/greendao/entity/Game;
invoke-virtual {p0, p1}, Lcom/sandboxol/center/utils/GameResVersionManager$1;->onSuccess(Lcom/sandboxol/greendao/entity/Game;)V
return-void
.end method