r.smali

.class final Lcom/sandboxol/blockymods/utils/r;
.super Ljava/lang/Object;
.source "DiskManageUtils.java"

# interfaces
.implements Lcom/sandboxol/greendao/a/c;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/sandboxol/blockymods/utils/t;->b(Landroid/content/Context;Lcom/sandboxol/greendao/entity/GameDiskCacheInfo;)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<",
        "Ljava/util/List<",
        "Lcom/sandboxol/greendao/entity/Game;",
        ">;>;"
    }
.end annotation


# instance fields
.field final synthetic a:Lcom/sandboxol/greendao/entity/GameDiskCacheInfo;

.field final synthetic b:Ljava/util/concurrent/CountDownLatch;


# direct methods
.method constructor <init>(Lcom/sandboxol/greendao/entity/GameDiskCacheInfo;Ljava/util/concurrent/CountDownLatch;)V
    .registers 3

    .line 1
    iput-object p1, p0, Lcom/sandboxol/blockymods/utils/r;->a:Lcom/sandboxol/greendao/entity/GameDiskCacheInfo;

    iput-object p2, p0, Lcom/sandboxol/blockymods/utils/r;->b:Ljava/util/concurrent/CountDownLatch;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public a(Ljava/util/List;)V
    .registers 6
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/List<",
            "Lcom/sandboxol/greendao/entity/Game;",
            ">;)V"
        }
    .end annotation

    if-eqz p1, :cond_72

    .line 1
    invoke-interface {p1}, Ljava/util/List;->size()I

    move-result v0

    if-lez v0, :cond_72

    .line 2
    invoke-interface {p1}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object p1

    :cond_c
    :goto_c
    invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z

    move-result v0

    if-eqz v0, :cond_72

    invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/sandboxol/greendao/entity/Game;

    if-eqz v0, :cond_c

    .line 3
    invoke-virtual {v0}, Lcom/sandboxol/greendao/entity/Game;->getGameId()Ljava/lang/String;

    move-result-object v1

    invoke-static {v1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v1

    if-nez v1, :cond_c

    invoke-virtual {v0}, Lcom/sandboxol/greendao/entity/Game;->getGameId()Ljava/lang/String;

    move-result-object v1

    invoke-static {v1}, Lcom/sandboxol/center/utils/CommonUtils;->isNewEngineCommonGame(Ljava/lang/String;)Z

    move-result v1

    if-eqz v1, :cond_c

    .line 4
    invoke-virtual {v0}, Lcom/sandboxol/greendao/entity/Game;->getLatestResVersions()Lcom/sandboxol/greendao/entity/ResourceLatestVersionData;

    move-result-object v1

    const-wide/16 v2, 0x0

    invoke-virtual {v1, v2, v3}, 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 v1

    invoke-virtual {v1, v0}, Lcom/sandboxol/greendao/c/M;->b(Lcom/sandboxol/greendao/entity/Game;)V

    .line 6
    invoke-static {}, Lcom/sandboxol/center/download/entity/DownloadInfoCenter;->getInstance()Lcom/sandboxol/center/download/entity/DownloadInfoCenter;

    move-result-object v0

    invoke-virtual {v0}, Lcom/sandboxol/center/download/entity/DownloadInfoCenter;->getTotalGameProgressInfoMap()Ljava/util/HashMap;

    move-result-object v0

    iget-object v1, p0, Lcom/sandboxol/blockymods/utils/r;->a:Lcom/sandboxol/greendao/entity/GameDiskCacheInfo;

    invoke-virtual {v1}, Lcom/sandboxol/greendao/entity/GameDiskCacheInfo;->getGameId()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/util/HashMap;->remove(Ljava/lang/Object;)Ljava/lang/Object;

    .line 7
    invoke-static {}, Lcom/sandboxol/center/download/entity/DownloadInfoCenter;->getInstance()Lcom/sandboxol/center/download/entity/DownloadInfoCenter;

    move-result-object v0

    invoke-virtual {v0}, Lcom/sandboxol/center/download/entity/DownloadInfoCenter;->getGameProgressInfoMap()Ljava/util/HashMap;

    move-result-object v0

    iget-object v1, p0, Lcom/sandboxol/blockymods/utils/r;->a:Lcom/sandboxol/greendao/entity/GameDiskCacheInfo;

    invoke-virtual {v1}, Lcom/sandboxol/greendao/entity/GameDiskCacheInfo;->getGameId()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/util/HashMap;->remove(Ljava/lang/Object;)Ljava/lang/Object;

    .line 8
    invoke-static {}, Lcom/sandboxol/center/download/entity/DownloadInfoCenter;->getInstance()Lcom/sandboxol/center/download/entity/DownloadInfoCenter;

    move-result-object v0

    invoke-virtual {v0}, Lcom/sandboxol/center/download/entity/DownloadInfoCenter;->getMapProgressInfoMap()Ljava/util/HashMap;

    move-result-object v0

    iget-object v1, p0, Lcom/sandboxol/blockymods/utils/r;->a:Lcom/sandboxol/greendao/entity/GameDiskCacheInfo;

    invoke-virtual {v1}, Lcom/sandboxol/greendao/entity/GameDiskCacheInfo;->getGameId()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/util/HashMap;->remove(Ljava/lang/Object;)Ljava/lang/Object;

    goto :goto_c

    .line 9
    :cond_72
    iget-object p1, p0, Lcom/sandboxol/blockymods/utils/r;->b:Ljava/util/concurrent/CountDownLatch;

    invoke-virtual {p1}, Ljava/util/concurrent/CountDownLatch;->countDown()V

    return-void
.end method

.method public onError(ILjava/lang/String;)V
    .registers 3

    .line 1
    iget-object p1, p0, Lcom/sandboxol/blockymods/utils/r;->b:Ljava/util/concurrent/CountDownLatch;

    invoke-virtual {p1}, Ljava/util/concurrent/CountDownLatch;->countDown()V

    return-void
.end method

.method public bridge synthetic onSuccess(Ljava/lang/Object;)V
    .registers 2

    .line 1
    check-cast p1, Ljava/util/List;

    invoke-virtual {p0, p1}, Lcom/sandboxol/blockymods/utils/r;->a(Ljava/util/List;)V

    return-void
.end method