GameResUpdater.smali

.class public Lcom/sandboxol/blockmango/GameResUpdater;
.super Landroid/os/AsyncTask;
.source "GameResUpdater.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/sandboxol/blockmango/GameResUpdater$GameResUpdaterListener;,
        Lcom/sandboxol/blockmango/GameResUpdater$DownloadProgress;
    }
.end annotation

.annotation system Ldalvik/annotation/Signature;
    value = {
        "Landroid/os/AsyncTask<",
        "Ljava/lang/String;",
        "Ljava/lang/Integer;",
        "Ljava/lang/Integer;",
        ">;"
    }
.end annotation


# static fields
.field private static MSG_DOWNLOAD_FAILED:Ljava/lang/String; = "MSG_GAMERESDOWNLOAD_FAILED"

.field private static MSG_DOWNLOAD_PROGRESS:Ljava/lang/String; = "MSG_GAMERESDOWNLOAD_PROGRESS"

.field private static MSG_DOWNLOAD_SUCESS:Ljava/lang/String; = "MSG_GAMERESDWONLOAD_SUCESS"

.field public static final TYPE_CANCELED:I = 0x3

.field public static final TYPE_FAILED:I = 0x1

.field public static final TYPE_PAUSED:I = 0x2

.field public static final TYPE_SUCCESS:I


# instance fields
.field private currentVersion:I

.field private downLoadGameName:Ljava/lang/String;

.field private downloadUrl:Ljava/lang/String;

.field private isCanceled:Z

.field private isPaused:Z

.field private lastProgress:I

.field private listener:Lcom/sandboxol/blockmango/GameResUpdater$GameResUpdaterListener;

.field private mContext:Landroid/content/Context;

.field private mSignature:Ljava/lang/String;

.field private updateFileName:Ljava/lang/String;


# direct methods
.method static constructor <clinit>()V
    .registers 0

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Lcom/sandboxol/blockmango/GameResUpdater$GameResUpdaterListener;Ljava/lang/String;ILjava/lang/String;)V
    .registers 7

    .line 1
    invoke-direct {p0}, Landroid/os/AsyncTask;-><init>()V

    const/4 v0, 0x0

    .line 2
    iput-object v0, p0, Lcom/sandboxol/blockmango/GameResUpdater;->mSignature:Ljava/lang/String;

    const/4 v0, -0x1

    .line 3
    iput v0, p0, Lcom/sandboxol/blockmango/GameResUpdater;->currentVersion:I

    const/4 v0, 0x0

    .line 4
    iput-boolean v0, p0, Lcom/sandboxol/blockmango/GameResUpdater;->isCanceled:Z

    .line 5
    iput-boolean v0, p0, Lcom/sandboxol/blockmango/GameResUpdater;->isPaused:Z

    .line 6
    iput-object p2, p0, Lcom/sandboxol/blockmango/GameResUpdater;->listener:Lcom/sandboxol/blockmango/GameResUpdater$GameResUpdaterListener;

    .line 7
    iput-object p1, p0, Lcom/sandboxol/blockmango/GameResUpdater;->mContext:Landroid/content/Context;

    .line 8
    iput-object p5, p0, Lcom/sandboxol/blockmango/GameResUpdater;->downloadUrl:Ljava/lang/String;

    .line 9
    iput-object p3, p0, Lcom/sandboxol/blockmango/GameResUpdater;->downLoadGameName:Ljava/lang/String;

    .line 10
    iput p4, p0, Lcom/sandboxol/blockmango/GameResUpdater;->currentVersion:I

    .line 11
    invoke-static {}, Lcom/sandboxol/common/messenger/Messenger;->getDefault()Lcom/sandboxol/common/messenger/Messenger;

    move-result-object p3

    sget-object p4, Lcom/sandboxol/blockmango/GameResUpdater;->MSG_DOWNLOAD_PROGRESS:Ljava/lang/String;

    const-class p5, Lcom/sandboxol/blockmango/GameResUpdater$DownloadProgress;

    new-instance v0, Lcom/sandboxol/blockmango/Bb;

    invoke-direct {v0, p2}, Lcom/sandboxol/blockmango/Bb;-><init>(Lcom/sandboxol/blockmango/GameResUpdater$GameResUpdaterListener;)V

    invoke-virtual {p3, p1, p4, p5, v0}, Lcom/sandboxol/common/messenger/Messenger;->register(Landroid/content/Context;Ljava/lang/Object;Ljava/lang/Class;Lrx/functions/Action1;)V

    .line 12
    invoke-static {}, Lcom/sandboxol/common/messenger/Messenger;->getDefault()Lcom/sandboxol/common/messenger/Messenger;

    move-result-object p3

    sget-object p4, Lcom/sandboxol/blockmango/GameResUpdater;->MSG_DOWNLOAD_FAILED:Ljava/lang/String;

    new-instance p5, Lcom/sandboxol/blockmango/Cb;

    invoke-direct {p5, p2}, Lcom/sandboxol/blockmango/Cb;-><init>(Lcom/sandboxol/blockmango/GameResUpdater$GameResUpdaterListener;)V

    invoke-virtual {p3, p1, p4, p5}, Lcom/sandboxol/common/messenger/Messenger;->register(Landroid/content/Context;Ljava/lang/Object;Lrx/functions/Action0;)V

    .line 13
    invoke-static {}, Lcom/sandboxol/common/messenger/Messenger;->getDefault()Lcom/sandboxol/common/messenger/Messenger;

    move-result-object p2

    sget-object p3, Lcom/sandboxol/blockmango/GameResUpdater;->MSG_DOWNLOAD_SUCESS:Ljava/lang/String;

    new-instance p4, Lcom/sandboxol/blockmango/Ab;

    invoke-direct {p4, p0}, Lcom/sandboxol/blockmango/Ab;-><init>(Lcom/sandboxol/blockmango/GameResUpdater;)V

    invoke-virtual {p2, p1, p3, p4}, Lcom/sandboxol/common/messenger/Messenger;->register(Landroid/content/Context;Ljava/lang/Object;Lrx/functions/Action0;)V

    return-void
.end method

.method static synthetic a(Lcom/sandboxol/blockmango/GameResUpdater$GameResUpdaterListener;)V
    .registers 1

    .line 2
    invoke-interface {p0}, Lcom/sandboxol/blockmango/GameResUpdater$GameResUpdaterListener;->onFailed()V

    return-void
.end method

.method static synthetic a(Lcom/sandboxol/blockmango/GameResUpdater$GameResUpdaterListener;Lcom/sandboxol/blockmango/GameResUpdater$DownloadProgress;)V
    .registers 10

    .line 1
    iget v0, p1, Lcom/sandboxol/blockmango/GameResUpdater$DownloadProgress;->progress:I

    int-to-double v2, v0

    iget-wide v0, p1, Lcom/sandboxol/blockmango/GameResUpdater$DownloadProgress;->currentSize:J

    long-to-double v4, v0

    iget-wide v0, p1, Lcom/sandboxol/blockmango/GameResUpdater$DownloadProgress;->totalSize:J

    long-to-double v6, v0

    move-object v1, p0

    invoke-interface/range {v1 .. v7}, Lcom/sandboxol/blockmango/GameResUpdater$GameResUpdaterListener;->onProgress(DDD)V

    return-void
.end method

.method static synthetic access$000(Lcom/sandboxol/blockmango/GameResUpdater;)Lcom/sandboxol/blockmango/GameResUpdater$GameResUpdaterListener;
    .registers 1

    .line 1
    iget-object p0, p0, Lcom/sandboxol/blockmango/GameResUpdater;->listener:Lcom/sandboxol/blockmango/GameResUpdater$GameResUpdaterListener;

    return-object p0
.end method

.method static synthetic access$100(Lcom/sandboxol/blockmango/GameResUpdater;)Ljava/lang/String;
    .registers 1

    .line 1
    iget-object p0, p0, Lcom/sandboxol/blockmango/GameResUpdater;->downLoadGameName:Ljava/lang/String;

    return-object p0
.end method

.method static synthetic access$200(Lcom/sandboxol/blockmango/GameResUpdater;)Ljava/lang/String;
    .registers 1

    .line 1
    iget-object p0, p0, Lcom/sandboxol/blockmango/GameResUpdater;->updateFileName:Ljava/lang/String;

    return-object p0
.end method

.method static synthetic access$300(Lcom/sandboxol/blockmango/GameResUpdater;)I
    .registers 1

    .line 1
    iget p0, p0, Lcom/sandboxol/blockmango/GameResUpdater;->currentVersion:I

    return p0
.end method

.method static synthetic access$400(Lcom/sandboxol/blockmango/GameResUpdater;Ljava/lang/String;Ljava/lang/String;)V
    .registers 3

    .line 1
    invoke-direct {p0, p1, p2}, Lcom/sandboxol/blockmango/GameResUpdater;->writeStringToFile(Ljava/lang/String;Ljava/lang/String;)V

    return-void
.end method

.method private getContentLength(Ljava/lang/String;)J
    .registers 4

    .line 1
    new-instance v0, Lokhttp3/z;

    invoke-direct {v0}, Lokhttp3/z;-><init>()V

    .line 2
    new-instance v1, Lokhttp3/C$a;

    invoke-direct {v1}, Lokhttp3/C$a;-><init>()V

    invoke-virtual {v1, p1}, Lokhttp3/C$a;->b(Ljava/lang/String;)Lokhttp3/C$a;

    invoke-virtual {v1}, Lokhttp3/C$a;->a()Lokhttp3/C;

    move-result-object p1

    .line 3
    :try_start_11
    invoke-virtual {v0, p1}, Lokhttp3/z;->newCall(Lokhttp3/C;)Lokhttp3/Call;

    move-result-object p1

    invoke-interface {p1}, Lokhttp3/Call;->execute()Lokhttp3/H;

    move-result-object p1

    if-eqz p1, :cond_35

    .line 4
    invoke-virtual {p1}, Lokhttp3/H;->q()Z

    move-result v0

    if-eqz v0, :cond_35

    .line 5
    invoke-virtual {p1}, Lokhttp3/H;->b()Lokhttp3/J;

    move-result-object v0

    invoke-virtual {v0}, Lokhttp3/J;->contentLength()J

    move-result-wide v0

    .line 6
    invoke-virtual {p1}, Lokhttp3/H;->b()Lokhttp3/J;

    move-result-object p1

    invoke-virtual {p1}, Lokhttp3/J;->close()V
    :try_end_30
    .catch Ljava/io/IOException; {:try_start_11 .. :try_end_30} :catch_31

    return-wide v0

    :catch_31
    move-exception p1

    .line 7
    invoke-virtual {p1}, Ljava/io/IOException;->printStackTrace()V

    :cond_35
    const-wide/16 v0, 0x0

    return-wide v0
.end method

.method private getGameResFilesMd5Reg(Ljava/io/InputStream;)Ljava/util/Map;
    .registers 8
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/io/InputStream;",
            ")",
            "Ljava/util/Map<",
            "Ljava/lang/String;",
            "Ljava/lang/String;",
            ">;"
        }
    .end annotation

    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/lang/Exception;
        }
    .end annotation

    .line 1
    new-instance v0, Ljava/util/HashMap;

    invoke-direct {v0}, Ljava/util/HashMap;-><init>()V

    .line 2
    new-instance v1, Ljava/io/InputStreamReader;

    const-string v2, "UTF-8"

    invoke-direct {v1, p1, v2}, Ljava/io/InputStreamReader;-><init>(Ljava/io/InputStream;Ljava/lang/String;)V

    .line 3
    new-instance p1, Ljava/io/BufferedReader;

    invoke-direct {p1, v1}, Ljava/io/BufferedReader;-><init>(Ljava/io/Reader;)V

    .line 4
    :goto_11
    invoke-virtual {p1}, Ljava/io/BufferedReader;->readLine()Ljava/lang/String;

    move-result-object v2

    if-eqz v2, :cond_2f

    const-string v3, "\\*"

    .line 5
    invoke-virtual {v2, v3}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;

    move-result-object v2

    const/4 v3, 0x1

    .line 6
    aget-object v3, v2, v3

    const/4 v4, 0x0

    aget-object v2, v2, v4

    const-string v4, " "

    const-string v5, ""

    invoke-virtual {v2, v4, v5}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;

    move-result-object v2

    invoke-interface {v0, v3, v2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    goto :goto_11

    .line 7
    :cond_2f
    invoke-virtual {p1}, Ljava/io/BufferedReader;->close()V

    .line 8
    invoke-virtual {v1}, Ljava/io/InputStreamReader;->close()V

    return-object v0
.end method

.method private getStringFromInputStream(Ljava/io/InputStream;)Ljava/lang/String;
    .registers 6

    .line 1
    :try_start_0
    new-instance v0, Ljava/io/ByteArrayOutputStream;

    invoke-direct {v0}, Ljava/io/ByteArrayOutputStream;-><init>()V

    const/16 v1, 0x400

    .line 2
    new-array v1, v1, [B

    .line 3
    :goto_9
    invoke-virtual {p1, v1}, Ljava/io/InputStream;->read([B)I

    move-result v2

    const/4 v3, -0x1

    if-eq v2, v3, :cond_15

    const/4 v3, 0x0

    .line 4
    invoke-virtual {v0, v1, v3, v2}, Ljava/io/ByteArrayOutputStream;->write([BII)V

    goto :goto_9

    :cond_15
    const-string p1, "UTF-8"

    .line 5
    invoke-virtual {v0, p1}, Ljava/io/ByteArrayOutputStream;->toString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object p1
    :try_end_1b
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_1b} :catch_1c

    goto :goto_1d

    :catch_1c
    const/4 p1, 0x0

    :goto_1d
    return-object p1
.end method

.method private onDownloadSusses()V
    .registers 3

    .line 1
    new-instance v0, Lcom/sandboxol/blockmango/GameResUpdater$2;

    invoke-direct {v0, p0}, Lcom/sandboxol/blockmango/GameResUpdater$2;-><init>(Lcom/sandboxol/blockmango/GameResUpdater;)V

    invoke-static {v0}, Lrx/Observable;->create(Lrx/Observable$OnSubscribe;)Lrx/Observable;

    move-result-object v0

    .line 2
    invoke-static {}, Lcom/sandboxol/greendao/a/b;->a()Lrx/Observable$Transformer;

    move-result-object v1

    invoke-virtual {v0, v1}, Lrx/Observable;->compose(Lrx/Observable$Transformer;)Lrx/Observable;

    move-result-object v0

    new-instance v1, Lcom/sandboxol/blockmango/GameResUpdater$1;

    invoke-direct {v1, p0}, Lcom/sandboxol/blockmango/GameResUpdater$1;-><init>(Lcom/sandboxol/blockmango/GameResUpdater;)V

    invoke-virtual {v0, v1}, Lrx/Observable;->subscribe(Lrx/Observer;)Lrx/Subscription;

    return-void
.end method

.method private writeStringToFile(Ljava/lang/String;Ljava/lang/String;)V
    .registers 5

    .line 1
    :try_start_0
    new-instance v0, Ljava/io/FileOutputStream;

    const/4 v1, 0x0

    invoke-direct {v0, p2, v1}, Ljava/io/FileOutputStream;-><init>(Ljava/lang/String;Z)V

    .line 2
    invoke-virtual {p1}, Ljava/lang/String;->getBytes()[B

    move-result-object p1

    invoke-virtual {v0, p1}, Ljava/io/FileOutputStream;->write([B)V
    :try_end_d
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_d} :catch_d

    :catch_d
    return-void
.end method


# virtual methods
.method public synthetic a()V
    .registers 1

    .line 3
    invoke-direct {p0}, Lcom/sandboxol/blockmango/GameResUpdater;->onDownloadSusses()V

    return-void
.end method

.method public cancelDownload()V
    .registers 2

    const/4 v0, 0x1

    .line 1
    iput-boolean v0, p0, Lcom/sandboxol/blockmango/GameResUpdater;->isCanceled:Z

    return-void
.end method

.method protected varargs doInBackground([Ljava/lang/String;)Ljava/lang/Integer;
    .registers 24

    move-object/from16 v1, p0

    .line 2
    iget-object v0, v1, Lcom/sandboxol/blockmango/GameResUpdater;->downloadUrl:Ljava/lang/String;

    const/16 v2, 0x2f

    invoke-virtual {v0, v2}, Ljava/lang/String;->lastIndexOf(I)I

    move-result v2

    const/4 v3, 0x1

    invoke-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v4

    add-int/2addr v2, v3

    invoke-virtual {v0, v2}, Ljava/lang/String;->substring(I)Ljava/lang/String;

    move-result-object v0

    iput-object v0, v1, Lcom/sandboxol/blockmango/GameResUpdater;->updateFileName:Ljava/lang/String;

    .line 3
    new-instance v0, Ljava/lang/StringBuilder;

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

    invoke-static {}, Lcom/sandboxol/center/router/moduleInfo/game/EngineEnv;->v2()Lcom/sandboxol/center/router/moduleInfo/game/AbstractEngineEnv;

    move-result-object v2

    invoke-virtual {v2}, Lcom/sandboxol/center/router/moduleInfo/game/AbstractEngineEnv;->getMapTempRootPath()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget-object v2, v1, Lcom/sandboxol/blockmango/GameResUpdater;->downLoadGameName:Ljava/lang/String;

    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string v2, "/"

    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    .line 4
    new-instance v5, Ljava/io/File;

    iget-object v0, v1, Lcom/sandboxol/blockmango/GameResUpdater;->updateFileName:Ljava/lang/String;

    invoke-direct {v5, v2, v0}, Ljava/io/File;-><init>(Ljava/lang/String;Ljava/lang/String;)V

    .line 5
    invoke-virtual {v5}, Ljava/io/File;->exists()Z

    move-result v0

    const-wide/16 v6, 0x0

    if-eqz v0, :cond_48

    .line 6
    invoke-virtual {v5}, Ljava/io/File;->length()J

    move-result-wide v8

    goto :goto_49

    :cond_48
    move-wide v8, v6

    .line 7
    :goto_49
    iget-object v0, v1, Lcom/sandboxol/blockmango/GameResUpdater;->downloadUrl:Ljava/lang/String;

    invoke-direct {v1, v0}, Lcom/sandboxol/blockmango/GameResUpdater;->getContentLength(Ljava/lang/String;)J

    move-result-wide v10

    cmp-long v0, v10, v6

    if-nez v0, :cond_54

    return-object v4

    :cond_54
    const/4 v6, 0x0

    cmp-long v0, v10, v8

    if-nez v0, :cond_7a

    .line 8
    iget-object v0, v1, Lcom/sandboxol/blockmango/GameResUpdater;->mSignature:Ljava/lang/String;

    if-eqz v0, :cond_75

    .line 9
    :try_start_5d
    invoke-static {v5}, Lcom/sandboxol/common/utils/MD5Util;->getFileMD5String(Ljava/io/File;)Ljava/lang/String;

    move-result-object v7

    invoke-virtual {v7}, Ljava/lang/String;->toLowerCase()Ljava/lang/String;

    move-result-object v7

    invoke-virtual {v0, v7}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_7a

    .line 10
    invoke-static {v6}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v0
    :try_end_6f
    .catch Ljava/io/IOException; {:try_start_5d .. :try_end_6f} :catch_70

    return-object v0

    :catch_70
    move-exception v0

    .line 11
    invoke-virtual {v0}, Ljava/io/IOException;->printStackTrace()V

    goto :goto_7a

    .line 12
    :cond_75
    invoke-static {v6}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v0

    return-object v0

    .line 13
    :cond_7a
    :goto_7a
    new-instance v0, Lokhttp3/z;

    invoke-direct {v0}, Lokhttp3/z;-><init>()V

    .line 14
    new-instance v7, Lokhttp3/C$a;

    invoke-direct {v7}, Lokhttp3/C$a;-><init>()V

    new-instance v12, Ljava/lang/StringBuilder;

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

    const-string v13, "bytes="

    invoke-virtual {v12, v13}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v12, v8, v9}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    const-string v13, "-"

    invoke-virtual {v12, v13}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v12}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v12

    const-string v13, "RANGE"

    .line 15
    invoke-virtual {v7, v13, v12}, Lokhttp3/C$a;->a(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/C$a;

    iget-object v12, v1, Lcom/sandboxol/blockmango/GameResUpdater;->downloadUrl:Ljava/lang/String;

    .line 16
    invoke-virtual {v7, v12}, Lokhttp3/C$a;->b(Ljava/lang/String;)Lokhttp3/C$a;

    .line 17
    invoke-virtual {v7}, Lokhttp3/C$a;->a()Lokhttp3/C;

    move-result-object v7

    const/4 v12, 0x0

    .line 18
    :try_start_a9
    invoke-virtual {v5}, Ljava/io/File;->exists()Z

    move-result v13

    if-nez v13, :cond_ba

    .line 19
    new-instance v13, Ljava/io/File;

    invoke-direct {v13, v2}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    invoke-virtual {v13}, Ljava/io/File;->mkdirs()Z

    .line 20
    invoke-virtual {v5}, Ljava/io/File;->createNewFile()Z

    .line 21
    :cond_ba
    invoke-virtual {v0, v7}, Lokhttp3/z;->newCall(Lokhttp3/C;)Lokhttp3/Call;

    move-result-object v0

    invoke-interface {v0}, Lokhttp3/Call;->execute()Lokhttp3/H;

    move-result-object v0

    if-eqz v0, :cond_210

    .line 22
    invoke-virtual {v0}, Lokhttp3/H;->b()Lokhttp3/J;

    move-result-object v2

    invoke-virtual {v2}, Lokhttp3/J;->byteStream()Ljava/io/InputStream;

    move-result-object v2
    :try_end_cc
    .catch Ljava/io/IOException; {:try_start_a9 .. :try_end_cc} :catch_229
    .catchall {:try_start_a9 .. :try_end_cc} :catchall_225

    .line 23
    :try_start_cc
    new-instance v7, Ljava/io/RandomAccessFile;

    const-string v13, "rw"

    invoke-direct {v7, v5, v13}, Ljava/io/RandomAccessFile;-><init>(Ljava/io/File;Ljava/lang/String;)V
    :try_end_d3
    .catch Ljava/io/IOException; {:try_start_cc .. :try_end_d3} :catch_20b
    .catchall {:try_start_cc .. :try_end_d3} :catchall_207

    .line 24
    :try_start_d3
    invoke-virtual {v7, v8, v9}, Ljava/io/RandomAccessFile;->seek(J)V

    const/16 v12, 0x400

    .line 25
    new-array v12, v12, [B

    .line 26
    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v13

    move-wide v14, v13

    const/4 v13, 0x0

    .line 27
    :goto_e0
    invoke-virtual {v2, v12}, Ljava/io/InputStream;->read([B)I

    move-result v3

    const/4 v6, -0x1

    if-eq v3, v6, :cond_176

    .line 28
    iget-boolean v6, v1, Lcom/sandboxol/blockmango/GameResUpdater;->isCanceled:Z
    :try_end_e9
    .catch Ljava/io/IOException; {:try_start_d3 .. :try_end_e9} :catch_204
    .catchall {:try_start_d3 .. :try_end_e9} :catchall_202

    if-eqz v6, :cond_10c

    const/4 v0, 0x3

    .line 29
    :try_start_ec
    invoke-static {v0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v3
    :try_end_f0
    .catch Ljava/io/IOException; {:try_start_ec .. :try_end_f0} :catch_107
    .catchall {:try_start_ec .. :try_end_f0} :catchall_202

    if-eqz v2, :cond_f8

    .line 30
    :try_start_f2
    invoke-virtual {v2}, Ljava/io/InputStream;->close()V

    goto :goto_f8

    :catch_f6
    move-exception v0

    goto :goto_103

    .line 31
    :cond_f8
    :goto_f8
    invoke-virtual {v7}, Ljava/io/RandomAccessFile;->close()V

    .line 32
    iget-boolean v0, v1, Lcom/sandboxol/blockmango/GameResUpdater;->isCanceled:Z

    if-eqz v0, :cond_106

    .line 33
    invoke-virtual {v5}, Ljava/io/File;->delete()Z
    :try_end_102
    .catch Ljava/lang/Exception; {:try_start_f2 .. :try_end_102} :catch_f6

    goto :goto_106

    .line 34
    :goto_103
    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    :cond_106
    :goto_106
    return-object v3

    :catch_107
    move-exception v0

    move-object v12, v2

    move-object v6, v4

    goto/16 :goto_22c

    .line 35
    :cond_10c
    :try_start_10c
    iget-boolean v6, v1, Lcom/sandboxol/blockmango/GameResUpdater;->isPaused:Z
    :try_end_10e
    .catch Ljava/io/IOException; {:try_start_10c .. :try_end_10e} :catch_204
    .catchall {:try_start_10c .. :try_end_10e} :catchall_202

    if-eqz v6, :cond_12c

    const/4 v0, 0x2

    .line 36
    :try_start_111
    invoke-static {v0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v3
    :try_end_115
    .catch Ljava/io/IOException; {:try_start_111 .. :try_end_115} :catch_107
    .catchall {:try_start_111 .. :try_end_115} :catchall_202

    if-eqz v2, :cond_11d

    .line 37
    :try_start_117
    invoke-virtual {v2}, Ljava/io/InputStream;->close()V

    goto :goto_11d

    :catch_11b
    move-exception v0

    goto :goto_128

    .line 38
    :cond_11d
    :goto_11d
    invoke-virtual {v7}, Ljava/io/RandomAccessFile;->close()V

    .line 39
    iget-boolean v0, v1, Lcom/sandboxol/blockmango/GameResUpdater;->isCanceled:Z

    if-eqz v0, :cond_12b

    .line 40
    invoke-virtual {v5}, Ljava/io/File;->delete()Z
    :try_end_127
    .catch Ljava/lang/Exception; {:try_start_117 .. :try_end_127} :catch_11b

    goto :goto_12b

    .line 41
    :goto_128
    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    :cond_12b
    :goto_12b
    return-object v3

    :cond_12c
    add-int/2addr v13, v3

    const/4 v6, 0x0

    .line 42
    :try_start_12e
    invoke-virtual {v7, v12, v6, v3}, Ljava/io/RandomAccessFile;->write([BII)V
    :try_end_131
    .catch Ljava/io/IOException; {:try_start_12e .. :try_end_131} :catch_204
    .catchall {:try_start_12e .. :try_end_131} :catchall_202

    move-object v6, v4

    int-to-long v3, v13

    add-long/2addr v3, v8

    const-wide/16 v16, 0x64

    mul-long v16, v16, v3

    move-wide/from16 v18, v8

    .line 43
    :try_start_13a
    div-long v8, v16, v10

    long-to-int v9, v8

    .line 44
    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v16

    sub-long v16, v16, v14

    const-wide/16 v20, 0x3e8

    cmp-long v8, v16, v20

    if-lez v8, :cond_16f

    .line 45
    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v14

    .line 46
    new-instance v8, Lcom/sandboxol/blockmango/GameResUpdater$DownloadProgress;

    invoke-direct {v8, v1}, Lcom/sandboxol/blockmango/GameResUpdater$DownloadProgress;-><init>(Lcom/sandboxol/blockmango/GameResUpdater;)V

    .line 47
    iput v9, v8, Lcom/sandboxol/blockmango/GameResUpdater$DownloadProgress;->progress:I

    .line 48
    iput-wide v10, v8, Lcom/sandboxol/blockmango/GameResUpdater$DownloadProgress;->totalSize:J

    .line 49
    iput-wide v3, v8, Lcom/sandboxol/blockmango/GameResUpdater$DownloadProgress;->currentSize:J

    .line 50
    invoke-static {}, Lcom/sandboxol/common/messenger/Messenger;->getDefault()Lcom/sandboxol/common/messenger/Messenger;

    move-result-object v3

    sget-object v4, Lcom/sandboxol/blockmango/GameResUpdater;->MSG_DOWNLOAD_PROGRESS:Ljava/lang/String;

    invoke-virtual {v3, v8, v4}, Lcom/sandboxol/common/messenger/Messenger;->send(Ljava/lang/Object;Ljava/lang/Object;)V

    const/4 v3, 0x1

    .line 51
    new-array v4, v3, [Ljava/lang/Integer;

    invoke-static {v9}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v8

    const/4 v9, 0x0

    aput-object v8, v4, v9

    invoke-virtual {v1, v4}, Landroid/os/AsyncTask;->publishProgress([Ljava/lang/Object;)V

    goto :goto_170

    :cond_16f
    const/4 v3, 0x1

    :goto_170
    move-object v4, v6

    move-wide/from16 v8, v18

    const/4 v6, 0x0

    goto/16 :goto_e0

    :cond_176
    move-object v6, v4

    .line 52
    invoke-virtual {v0}, Lokhttp3/H;->b()Lokhttp3/J;

    move-result-object v0

    invoke-virtual {v0}, Lokhttp3/J;->close()V

    .line 53
    invoke-virtual {v7}, Ljava/io/RandomAccessFile;->close()V

    .line 54
    iget-object v0, v1, Lcom/sandboxol/blockmango/GameResUpdater;->mSignature:Ljava/lang/String;

    if-eqz v0, :cond_1de

    .line 55
    invoke-virtual {v5}, Ljava/io/File;->exists()Z

    move-result v0

    if-eqz v0, :cond_1bc

    iget-object v0, v1, Lcom/sandboxol/blockmango/GameResUpdater;->mSignature:Ljava/lang/String;

    invoke-static {v5}, Lcom/sandboxol/common/utils/MD5Util;->getFileMD5String(Ljava/io/File;)Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/String;->toLowerCase()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v0, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-nez v0, :cond_1bc

    .line 56
    invoke-virtual {v5}, Ljava/io/File;->delete()Z

    const-string v0, "Error"

    const-string v3, "\u6587\u4ef6\u4e0b\u8f7d\u5931\u8d25 md5 error"

    .line 57
    invoke-static {v0, v3}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
    :try_end_1a5
    .catch Ljava/io/IOException; {:try_start_13a .. :try_end_1a5} :catch_200
    .catchall {:try_start_13a .. :try_end_1a5} :catchall_202

    if-eqz v2, :cond_1ad

    .line 58
    :try_start_1a7
    invoke-virtual {v2}, Ljava/io/InputStream;->close()V

    goto :goto_1ad

    :catch_1ab
    move-exception v0

    goto :goto_1b8

    .line 59
    :cond_1ad
    :goto_1ad
    invoke-virtual {v7}, Ljava/io/RandomAccessFile;->close()V

    .line 60
    iget-boolean v0, v1, Lcom/sandboxol/blockmango/GameResUpdater;->isCanceled:Z

    if-eqz v0, :cond_1bb

    .line 61
    invoke-virtual {v5}, Ljava/io/File;->delete()Z
    :try_end_1b7
    .catch Ljava/lang/Exception; {:try_start_1a7 .. :try_end_1b7} :catch_1ab

    goto :goto_1bb

    .line 62
    :goto_1b8
    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    :cond_1bb
    :goto_1bb
    return-object v6

    .line 63
    :cond_1bc
    :try_start_1bc
    invoke-virtual {v5}, Ljava/io/File;->exists()Z

    move-result v0

    if-eqz v0, :cond_213

    const/4 v3, 0x0

    .line 64
    invoke-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v3
    :try_end_1c7
    .catch Ljava/io/IOException; {:try_start_1bc .. :try_end_1c7} :catch_200
    .catchall {:try_start_1bc .. :try_end_1c7} :catchall_202

    if-eqz v2, :cond_1cf

    .line 65
    :try_start_1c9
    invoke-virtual {v2}, Ljava/io/InputStream;->close()V

    goto :goto_1cf

    :catch_1cd
    move-exception v0

    goto :goto_1da

    .line 66
    :cond_1cf
    :goto_1cf
    invoke-virtual {v7}, Ljava/io/RandomAccessFile;->close()V

    .line 67
    iget-boolean v0, v1, Lcom/sandboxol/blockmango/GameResUpdater;->isCanceled:Z

    if-eqz v0, :cond_1dd

    .line 68
    invoke-virtual {v5}, Ljava/io/File;->delete()Z
    :try_end_1d9
    .catch Ljava/lang/Exception; {:try_start_1c9 .. :try_end_1d9} :catch_1cd

    goto :goto_1dd

    .line 69
    :goto_1da
    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    :cond_1dd
    :goto_1dd
    return-object v3

    .line 70
    :cond_1de
    :try_start_1de
    invoke-virtual {v5}, Ljava/io/File;->exists()Z

    move-result v0

    if-eqz v0, :cond_213

    const/4 v3, 0x0

    .line 71
    invoke-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v3
    :try_end_1e9
    .catch Ljava/io/IOException; {:try_start_1de .. :try_end_1e9} :catch_200
    .catchall {:try_start_1de .. :try_end_1e9} :catchall_202

    if-eqz v2, :cond_1f1

    .line 72
    :try_start_1eb
    invoke-virtual {v2}, Ljava/io/InputStream;->close()V

    goto :goto_1f1

    :catch_1ef
    move-exception v0

    goto :goto_1fc

    .line 73
    :cond_1f1
    :goto_1f1
    invoke-virtual {v7}, Ljava/io/RandomAccessFile;->close()V

    .line 74
    iget-boolean v0, v1, Lcom/sandboxol/blockmango/GameResUpdater;->isCanceled:Z

    if-eqz v0, :cond_1ff

    .line 75
    invoke-virtual {v5}, Ljava/io/File;->delete()Z
    :try_end_1fb
    .catch Ljava/lang/Exception; {:try_start_1eb .. :try_end_1fb} :catch_1ef

    goto :goto_1ff

    .line 76
    :goto_1fc
    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    :cond_1ff
    :goto_1ff
    return-object v3

    :catch_200
    move-exception v0

    goto :goto_20e

    :catchall_202
    move-exception v0

    goto :goto_209

    :catch_204
    move-exception v0

    move-object v6, v4

    goto :goto_20e

    :catchall_207
    move-exception v0

    move-object v7, v12

    :goto_209
    move-object v12, v2

    goto :goto_252

    :catch_20b
    move-exception v0

    move-object v6, v4

    move-object v7, v12

    :goto_20e
    move-object v12, v2

    goto :goto_22c

    :cond_210
    move-object v6, v4

    move-object v2, v12

    move-object v7, v2

    :cond_213
    if-eqz v2, :cond_218

    .line 77
    :try_start_215
    invoke-virtual {v2}, Ljava/io/InputStream;->close()V

    :cond_218
    if-eqz v7, :cond_21d

    .line 78
    invoke-virtual {v7}, Ljava/io/RandomAccessFile;->close()V

    .line 79
    :cond_21d
    iget-boolean v0, v1, Lcom/sandboxol/blockmango/GameResUpdater;->isCanceled:Z

    if-eqz v0, :cond_250

    .line 80
    invoke-virtual {v5}, Ljava/io/File;->delete()Z
    :try_end_224
    .catch Ljava/lang/Exception; {:try_start_215 .. :try_end_224} :catch_23e

    goto :goto_250

    :catchall_225
    move-exception v0

    move-object v2, v0

    move-object v7, v12

    goto :goto_253

    :catch_229
    move-exception v0

    move-object v6, v4

    move-object v7, v12

    .line 81
    :goto_22c
    :try_start_22c
    invoke-virtual {v0}, Ljava/io/IOException;->printStackTrace()V

    .line 82
    invoke-virtual {v5}, Ljava/io/File;->isFile()Z

    move-result v0

    if-eqz v0, :cond_238

    .line 83
    invoke-virtual {v5}, Ljava/io/File;->delete()Z
    :try_end_238
    .catchall {:try_start_22c .. :try_end_238} :catchall_251

    :cond_238
    if-eqz v12, :cond_240

    .line 84
    :try_start_23a
    invoke-virtual {v12}, Ljava/io/InputStream;->close()V

    goto :goto_240

    :catch_23e
    move-exception v0

    goto :goto_24d

    :cond_240
    :goto_240
    if-eqz v7, :cond_245

    .line 85
    invoke-virtual {v7}, Ljava/io/RandomAccessFile;->close()V

    .line 86
    :cond_245
    iget-boolean v0, v1, Lcom/sandboxol/blockmango/GameResUpdater;->isCanceled:Z

    if-eqz v0, :cond_250

    .line 87
    invoke-virtual {v5}, Ljava/io/File;->delete()Z
    :try_end_24c
    .catch Ljava/lang/Exception; {:try_start_23a .. :try_end_24c} :catch_23e

    goto :goto_250

    .line 88
    :goto_24d
    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    :cond_250
    :goto_250
    return-object v6

    :catchall_251
    move-exception v0

    :goto_252
    move-object v2, v0

    :goto_253
    if-eqz v12, :cond_25b

    .line 89
    :try_start_255
    invoke-virtual {v12}, Ljava/io/InputStream;->close()V

    goto :goto_25b

    :catch_259
    move-exception v0

    goto :goto_268

    :cond_25b
    :goto_25b
    if-eqz v7, :cond_260

    .line 90
    invoke-virtual {v7}, Ljava/io/RandomAccessFile;->close()V

    .line 91
    :cond_260
    iget-boolean v0, v1, Lcom/sandboxol/blockmango/GameResUpdater;->isCanceled:Z

    if-eqz v0, :cond_26b

    .line 92
    invoke-virtual {v5}, Ljava/io/File;->delete()Z
    :try_end_267
    .catch Ljava/lang/Exception; {:try_start_255 .. :try_end_267} :catch_259

    goto :goto_26b

    .line 93
    :goto_268
    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    .line 94
    :cond_26b
    :goto_26b
    goto :goto_26d

    :goto_26c
    throw v2

    :goto_26d
    goto :goto_26c
.end method

.method protected bridge synthetic doInBackground([Ljava/lang/Object;)Ljava/lang/Object;
    .registers 2

    .line 1
    check-cast p1, [Ljava/lang/String;

    invoke-virtual {p0, p1}, Lcom/sandboxol/blockmango/GameResUpdater;->doInBackground([Ljava/lang/String;)Ljava/lang/Integer;

    move-result-object p1

    return-object p1
.end method

.method public mergeZip(Ljava/util/zip/ZipOutputStream;Ljava/util/zip/ZipFile;Ljava/util/zip/ZipFile;Ljava/util/Map;)V
    .registers 12
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/zip/ZipOutputStream;",
            "Ljava/util/zip/ZipFile;",
            "Ljava/util/zip/ZipFile;",
            "Ljava/util/Map<",
            "Ljava/lang/String;",
            "Ljava/lang/String;",
            ">;)V"
        }
    .end annotation

    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/lang/Exception;
        }
    .end annotation

    .line 1
    invoke-virtual {p2}, Ljava/util/zip/ZipFile;->entries()Ljava/util/Enumeration;

    move-result-object v0

    .line 2
    :goto_4
    invoke-interface {v0}, Ljava/util/Enumeration;->hasMoreElements()Z

    move-result v1

    if-eqz v1, :cond_54

    .line 3
    invoke-interface {v0}, Ljava/util/Enumeration;->nextElement()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Ljava/util/zip/ZipEntry;

    if-eqz p3, :cond_1d

    .line 4
    invoke-virtual {v1}, Ljava/util/zip/ZipEntry;->getName()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {p3, v2}, Ljava/util/zip/ZipFile;->getEntry(Ljava/lang/String;)Ljava/util/zip/ZipEntry;

    move-result-object v2

    if-eqz v2, :cond_1d

    goto :goto_4

    :cond_1d
    if-eqz p4, :cond_2a

    .line 5
    invoke-virtual {v1}, Ljava/util/zip/ZipEntry;->getName()Ljava/lang/String;

    move-result-object v2

    invoke-interface {p4, v2}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v2

    if-nez v2, :cond_2a

    goto :goto_4

    .line 6
    :cond_2a
    new-instance v2, Ljava/util/zip/ZipEntry;

    invoke-virtual {v1}, Ljava/util/zip/ZipEntry;->getName()Ljava/lang/String;

    move-result-object v3

    invoke-direct {v2, v3}, Ljava/util/zip/ZipEntry;-><init>(Ljava/lang/String;)V

    invoke-virtual {p1, v2}, Ljava/util/zip/ZipOutputStream;->putNextEntry(Ljava/util/zip/ZipEntry;)V

    .line 7
    invoke-virtual {v1}, Ljava/util/zip/ZipEntry;->isDirectory()Z

    move-result v2

    if-nez v2, :cond_50

    const/16 v2, 0x400

    .line 8
    new-array v3, v2, [B

    .line 9
    invoke-virtual {p2, v1}, Ljava/util/zip/ZipFile;->getInputStream(Ljava/util/zip/ZipEntry;)Ljava/io/InputStream;

    move-result-object v1

    :goto_44
    const/4 v4, 0x0

    .line 10
    invoke-virtual {v1, v3, v4, v2}, Ljava/io/InputStream;->read([BII)I

    move-result v5

    const/4 v6, -0x1

    if-eq v5, v6, :cond_50

    .line 11
    invoke-virtual {p1, v3, v4, v5}, Ljava/util/zip/ZipOutputStream;->write([BII)V

    goto :goto_44

    .line 12
    :cond_50
    invoke-virtual {p1}, Ljava/util/zip/ZipOutputStream;->closeEntry()V

    goto :goto_4

    :cond_54
    return-void
.end method

.method public mergeZip(Ljava/lang/String;Ljava/lang/String;)Z
    .registers 6

    .line 13
    new-instance v0, Ljava/lang/StringBuilder;

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

    invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string v1, ".tmp"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    .line 14
    :try_start_11
    new-instance v1, Ljava/io/File;

    invoke-direct {v1, p1}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    new-instance v2, Ljava/io/File;

    invoke-direct {v2, v0}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    invoke-virtual {v1, v2}, Ljava/io/File;->renameTo(Ljava/io/File;)Z

    .line 15
    new-instance v1, Ljava/util/zip/ZipOutputStream;

    new-instance v2, Ljava/io/FileOutputStream;

    invoke-direct {v2, p1}, Ljava/io/FileOutputStream;-><init>(Ljava/lang/String;)V

    invoke-direct {v1, v2}, Ljava/util/zip/ZipOutputStream;-><init>(Ljava/io/OutputStream;)V

    .line 16
    new-instance p1, Ljava/util/zip/ZipFile;

    invoke-direct {p1, v0}, Ljava/util/zip/ZipFile;-><init>(Ljava/lang/String;)V

    .line 17
    new-instance v2, Ljava/util/zip/ZipFile;

    invoke-direct {v2, p2}, Ljava/util/zip/ZipFile;-><init>(Ljava/lang/String;)V

    const-string p2, "checksums.md5"

    .line 18
    invoke-virtual {v2, p2}, Ljava/util/zip/ZipFile;->getEntry(Ljava/lang/String;)Ljava/util/zip/ZipEntry;

    move-result-object p2

    invoke-virtual {v2, p2}, Ljava/util/zip/ZipFile;->getInputStream(Ljava/util/zip/ZipEntry;)Ljava/io/InputStream;

    move-result-object p2

    .line 19
    invoke-direct {p0, p2}, Lcom/sandboxol/blockmango/GameResUpdater;->getGameResFilesMd5Reg(Ljava/io/InputStream;)Ljava/util/Map;

    move-result-object p2

    .line 20
    invoke-virtual {p0, v1, p1, v2, p2}, Lcom/sandboxol/blockmango/GameResUpdater;->mergeZip(Ljava/util/zip/ZipOutputStream;Ljava/util/zip/ZipFile;Ljava/util/zip/ZipFile;Ljava/util/Map;)V

    .line 21
    invoke-virtual {p1}, Ljava/util/zip/ZipFile;->close()V

    const/4 p1, 0x0

    .line 22
    invoke-virtual {p0, v1, v2, p1, p1}, Lcom/sandboxol/blockmango/GameResUpdater;->mergeZip(Ljava/util/zip/ZipOutputStream;Ljava/util/zip/ZipFile;Ljava/util/zip/ZipFile;Ljava/util/Map;)V

    .line 23
    invoke-virtual {v2}, Ljava/util/zip/ZipFile;->close()V

    .line 24
    invoke-virtual {v1}, Ljava/util/zip/ZipOutputStream;->close()V
    :try_end_50
    .catch Ljava/lang/Exception; {:try_start_11 .. :try_end_50} :catch_5c
    .catchall {:try_start_11 .. :try_end_50} :catchall_5a

    .line 25
    new-instance p1, Ljava/io/File;

    invoke-direct {p1, v0}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    invoke-virtual {p1}, Ljava/io/File;->delete()Z

    const/4 p1, 0x1

    goto :goto_6f

    :catchall_5a
    move-exception p1

    goto :goto_70

    :catch_5c
    move-exception p1

    :try_start_5d
    const-string p2, "ZipUtil error "

    .line 26
    invoke-virtual {p1}, Ljava/lang/Exception;->getMessage()Ljava/lang/String;

    move-result-object p1

    invoke-static {p2, p1}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I
    :try_end_66
    .catchall {:try_start_5d .. :try_end_66} :catchall_5a

    const/4 p1, 0x0

    .line 27
    new-instance p2, Ljava/io/File;

    invoke-direct {p2, v0}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    invoke-virtual {p2}, Ljava/io/File;->delete()Z

    :goto_6f
    return p1

    :goto_70
    new-instance p2, Ljava/io/File;

    invoke-direct {p2, v0}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    invoke-virtual {p2}, Ljava/io/File;->delete()Z

    .line 28
    throw p1
.end method

.method protected onPostExecute(Ljava/lang/Integer;)V
    .registers 3

    .line 2
    invoke-virtual {p1}, Ljava/lang/Integer;->intValue()I

    move-result p1

    if-eqz p1, :cond_18

    const/4 v0, 0x1

    if-eq p1, v0, :cond_e

    const/4 v0, 0x2

    if-eq p1, v0, :cond_21

    const/4 v0, 0x3

    goto :goto_21

    .line 3
    :cond_e
    invoke-static {}, Lcom/sandboxol/common/messenger/Messenger;->getDefault()Lcom/sandboxol/common/messenger/Messenger;

    move-result-object p1

    sget-object v0, Lcom/sandboxol/blockmango/GameResUpdater;->MSG_DOWNLOAD_FAILED:Ljava/lang/String;

    invoke-virtual {p1, v0}, Lcom/sandboxol/common/messenger/Messenger;->sendNoMsg(Ljava/lang/Object;)V

    goto :goto_21

    .line 4
    :cond_18
    invoke-static {}, Lcom/sandboxol/common/messenger/Messenger;->getDefault()Lcom/sandboxol/common/messenger/Messenger;

    move-result-object p1

    sget-object v0, Lcom/sandboxol/blockmango/GameResUpdater;->MSG_DOWNLOAD_SUCESS:Ljava/lang/String;

    invoke-virtual {p1, v0}, Lcom/sandboxol/common/messenger/Messenger;->sendNoMsg(Ljava/lang/Object;)V

    :cond_21
    :goto_21
    return-void
.end method

.method protected bridge synthetic onPostExecute(Ljava/lang/Object;)V
    .registers 2

    .line 1
    check-cast p1, Ljava/lang/Integer;

    invoke-virtual {p0, p1}, Lcom/sandboxol/blockmango/GameResUpdater;->onPostExecute(Ljava/lang/Integer;)V

    return-void
.end method

.method protected varargs onProgressUpdate([Ljava/lang/Integer;)V
    .registers 3

    const/4 v0, 0x0

    .line 2
    aget-object p1, p1, v0

    invoke-virtual {p1}, Ljava/lang/Integer;->intValue()I

    move-result p1

    .line 3
    iget v0, p0, Lcom/sandboxol/blockmango/GameResUpdater;->lastProgress:I

    if-le p1, v0, :cond_d

    .line 4
    iput p1, p0, Lcom/sandboxol/blockmango/GameResUpdater;->lastProgress:I

    :cond_d
    return-void
.end method

.method protected bridge synthetic onProgressUpdate([Ljava/lang/Object;)V
    .registers 2

    .line 1
    check-cast p1, [Ljava/lang/Integer;

    invoke-virtual {p0, p1}, Lcom/sandboxol/blockmango/GameResUpdater;->onProgressUpdate([Ljava/lang/Integer;)V

    return-void
.end method

.method public pauseDownload()V
    .registers 2

    const/4 v0, 0x1

    .line 1
    iput-boolean v0, p0, Lcom/sandboxol/blockmango/GameResUpdater;->isPaused:Z

    return-void
.end method