.class public Lcom/moji/mjweather/assshop/task/AvatarDownloadVoiceTask;
.super Lcom/moji/tool/thread/task/MJAsyncTask;
.source "AvatarDownloadVoiceTask.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/moji/mjweather/assshop/task/AvatarDownloadVoiceTask$OnDownLoadListener;
    }
.end annotation

.annotation system Ldalvik/annotation/Signature;
    value = {
        "Lcom/moji/tool/thread/task/MJAsyncTask<",
        "Ljava/lang/Void;",
        "Ljava/lang/Integer;",
        "Ljava/lang/Boolean;",
        ">;"
    }
.end annotation


# instance fields
.field public a:Z

.field public volatile b:Z

.field private final c:Ljava/lang/String;

.field private final d:Ljava/lang/String;

.field private final e:I

.field private f:I

.field private g:Z

.field private h:Lcom/moji/mjad/avatar/data/AvatarInfo;

.field private i:Lcom/moji/mjweather/assshop/task/AvatarDownloadTask$OnDownLoadListener;


# direct methods
.method public constructor <init>(Lcom/moji/mjad/avatar/data/AvatarInfo;Lcom/moji/mjweather/assshop/task/AvatarDownloadTask$OnDownLoadListener;)V
    .locals 1

    .line 60
    sget-object v0, Lcom/moji/tool/thread/ThreadPriority;->NORMAL:Lcom/moji/tool/thread/ThreadPriority;

    invoke-direct {p0, v0}, Lcom/moji/tool/thread/task/MJAsyncTask;-><init>(Lcom/moji/tool/thread/ThreadPriority;)V

    .line 40
    const-class v0, Lcom/moji/mjweather/assshop/task/AvatarDownloadSuitTask;

    invoke-virtual {v0}, Ljava/lang/Class;->getSimpleName()Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/moji/mjweather/assshop/task/AvatarDownloadVoiceTask;->c:Ljava/lang/String;

    const-string v0, "/"

    .line 41
    iput-object v0, p0, Lcom/moji/mjweather/assshop/task/AvatarDownloadVoiceTask;->d:Ljava/lang/String;

    const/16 v0, 0x400

    .line 43
    iput v0, p0, Lcom/moji/mjweather/assshop/task/AvatarDownloadVoiceTask;->e:I

    const/4 v0, 0x1

    .line 45
    iput-boolean v0, p0, Lcom/moji/mjweather/assshop/task/AvatarDownloadVoiceTask;->g:Z

    const/4 v0, 0x0

    .line 46
    iput-boolean v0, p0, Lcom/moji/mjweather/assshop/task/AvatarDownloadVoiceTask;->a:Z

    .line 48
    iput-boolean v0, p0, Lcom/moji/mjweather/assshop/task/AvatarDownloadVoiceTask;->b:Z

    .line 61
    iput-object p1, p0, Lcom/moji/mjweather/assshop/task/AvatarDownloadVoiceTask;->h:Lcom/moji/mjad/avatar/data/AvatarInfo;

    .line 62
    iput-object p2, p0, Lcom/moji/mjweather/assshop/task/AvatarDownloadVoiceTask;->i:Lcom/moji/mjweather/assshop/task/AvatarDownloadTask$OnDownLoadListener;

    return-void
.end method

.method private b()Z
    .locals 11

    .line 162
    invoke-static {}, Lcom/moji/statistics/EventManager;->a()Lcom/moji/statistics/EventManager;

    move-result-object v0

    sget-object v1, Lcom/moji/statistics/EVENT_TAG;->VOICE_DOWNLOAD_CLOCK_CLICK:Lcom/moji/statistics/EVENT_TAG;

    iget-object v2, p0, Lcom/moji/mjweather/assshop/task/AvatarDownloadVoiceTask;->h:Lcom/moji/mjad/avatar/data/AvatarInfo;

    iget v2, v2, Lcom/moji/mjad/avatar/data/AvatarInfo;->voiceId:I

    invoke-static {v2}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v1, v2}, Lcom/moji/statistics/EventManager;->a(Lcom/moji/statistics/EVENT_TAG;Ljava/lang/String;)Lcom/moji/statistics/EventManager;

    .line 163
    iget-object v0, p0, Lcom/moji/mjweather/assshop/task/AvatarDownloadVoiceTask;->h:Lcom/moji/mjad/avatar/data/AvatarInfo;

    iget-object v0, v0, Lcom/moji/mjad/avatar/data/AvatarInfo;->voiceUrl:Ljava/lang/String;

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

    move-result v0

    const/4 v1, 0x1

    const/4 v2, 0x0

    if-eqz v0, :cond_0

    .line 164
    new-array v0, v1, [Ljava/lang/Integer;

    const/16 v3, 0xc8

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

    move-result-object v3

    aput-object v3, v0, v2

    invoke-virtual {p0, v0}, Lcom/moji/mjweather/assshop/task/AvatarDownloadVoiceTask;->c([Ljava/lang/Object;)V

    return v1

    .line 168
    :cond_0
    iget-object v0, p0, Lcom/moji/mjweather/assshop/task/AvatarDownloadVoiceTask;->h:Lcom/moji/mjad/avatar/data/AvatarInfo;

    iget v0, v0, Lcom/moji/mjad/avatar/data/AvatarInfo;->voiceId:I

    if-nez v0, :cond_1

    .line 169
    new-array v0, v1, [Ljava/lang/Integer;

    const/16 v3, 0x1f4

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

    move-result-object v3

    aput-object v3, v0, v2

    invoke-virtual {p0, v0}, Lcom/moji/mjweather/assshop/task/AvatarDownloadVoiceTask;->c([Ljava/lang/Object;)V

    return v1

    .line 173
    :cond_1
    iget-object v0, p0, Lcom/moji/mjweather/assshop/task/AvatarDownloadVoiceTask;->h:Lcom/moji/mjad/avatar/data/AvatarInfo;

    iget-object v0, v0, Lcom/moji/mjad/avatar/data/AvatarInfo;->voiceUrl:Ljava/lang/String;

    .line 174
    new-instance v3, Lcom/moji/mjweather/assshop/voice/VoicePathManger;

    invoke-direct {v3}, Lcom/moji/mjweather/assshop/voice/VoicePathManger;-><init>()V

    iget-object v4, p0, Lcom/moji/mjweather/assshop/task/AvatarDownloadVoiceTask;->h:Lcom/moji/mjad/avatar/data/AvatarInfo;

    iget v4, v4, Lcom/moji/mjad/avatar/data/AvatarInfo;->voiceId:I

    invoke-virtual {v3, v4}, Lcom/moji/mjweather/assshop/voice/VoicePathManger;->a(I)Ljava/lang/String;

    move-result-object v3

    const-string v4, "voice.zip"

    const/16 v5, 0x1000

    .line 176
    new-array v5, v5, [B

    const/4 v6, 0x0

    .line 181
    :try_start_0
    new-instance v7, Ljava/io/File;

    new-instance v8, Ljava/lang/StringBuilder;

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

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

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

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

    move-result-object v4

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

    .line 182
    new-instance v4, Ljava/net/URL;

    invoke-direct {v4, v0}, Ljava/net/URL;-><init>(Ljava/lang/String;)V

    .line 183
    new-instance v0, Lokhttp3/OkUrlFactory;

    invoke-static {}, Lcom/moji/requestcore/RequestManagerCenter;->b()Lcom/moji/requestcore/RequestManagerCenter;

    move-result-object v8

    invoke-virtual {v8}, Lcom/moji/requestcore/RequestManagerCenter;->d()Lokhttp3/OkHttpClient;

    move-result-object v8

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

    invoke-virtual {v0, v4}, Lokhttp3/OkUrlFactory;->a(Ljava/net/URL;)Ljava/net/HttpURLConnection;

    move-result-object v0

    const/16 v4, 0x7d0

    .line 184
    invoke-virtual {v0, v4}, Ljava/net/HttpURLConnection;->setConnectTimeout(I)V

    .line 185
    invoke-virtual {v0, v4}, Ljava/net/HttpURLConnection;->setReadTimeout(I)V

    .line 186
    invoke-virtual {v0}, Ljava/net/HttpURLConnection;->getContentLength()I

    move-result v4

    .line 187
    new-instance v8, Ljava/io/FileOutputStream;

    invoke-direct {v8, v7}, Ljava/io/FileOutputStream;-><init>(Ljava/io/File;)V
    :try_end_0
    .catch Ljava/net/MalformedURLException; {:try_start_0 .. :try_end_0} :catch_9
    .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_6
    .catchall {:try_start_0 .. :try_end_0} :catchall_1

    .line 188
    :try_start_1
    invoke-virtual {v0}, Ljava/net/HttpURLConnection;->getInputStream()Ljava/io/InputStream;

    move-result-object v0
    :try_end_1
    .catch Ljava/net/MalformedURLException; {:try_start_1 .. :try_end_1} :catch_5
    .catch Ljava/io/IOException; {:try_start_1 .. :try_end_1} :catch_4
    .catchall {:try_start_1 .. :try_end_1} :catchall_2

    const/4 v6, 0x0

    .line 191
    :goto_0
    :try_start_2
    invoke-virtual {v0, v5}, Ljava/io/InputStream;->read([B)I

    move-result v9

    const/4 v10, -0x1

    if-eq v9, v10, :cond_4

    add-int/2addr v6, v1

    .line 193
    invoke-virtual {v8, v5, v2, v9}, Ljava/io/OutputStream;->write([BII)V

    const/16 v9, 0x64

    if-lez v4, :cond_2

    .line 196
    array-length v10, v5

    mul-int v10, v10, v6

    mul-int/lit8 v10, v10, 0x64

    div-int/2addr v10, v4

    goto :goto_1

    :cond_2
    const/4 v10, 0x0

    :goto_1
    if-le v10, v9, :cond_3

    goto :goto_2

    :cond_3
    move v9, v10

    .line 201
    :goto_2
    new-array v10, v1, [Ljava/lang/Integer;

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

    move-result-object v9

    aput-object v9, v10, v2

    invoke-virtual {p0, v10}, Lcom/moji/mjweather/assshop/task/AvatarDownloadVoiceTask;->c([Ljava/lang/Object;)V

    goto :goto_0

    .line 203
    :cond_4
    invoke-virtual {v7}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;

    move-result-object v1

    int-to-long v4, v4

    invoke-virtual {p0, v1, v3, v4, v5}, Lcom/moji/mjweather/assshop/task/AvatarDownloadVoiceTask;->a(Ljava/lang/String;Ljava/lang/String;J)Z

    move-result v1
    :try_end_2
    .catch Ljava/net/MalformedURLException; {:try_start_2 .. :try_end_2} :catch_3
    .catch Ljava/io/IOException; {:try_start_2 .. :try_end_2} :catch_2
    .catchall {:try_start_2 .. :try_end_2} :catchall_0

    if-eqz v0, :cond_5

    .line 213
    :try_start_3
    invoke-virtual {v0}, Ljava/io/InputStream;->close()V
    :try_end_3
    .catch Ljava/io/IOException; {:try_start_3 .. :try_end_3} :catch_0

    goto :goto_3

    :catch_0
    move-exception v0

    .line 215
    iget-object v2, p0, Lcom/moji/mjweather/assshop/task/AvatarDownloadVoiceTask;->c:Ljava/lang/String;

    invoke-static {v2, v0}, Lcom/moji/tool/log/MJLogger;->a(Ljava/lang/String;Ljava/lang/Throwable;)V

    .line 220
    :cond_5
    :goto_3
    :try_start_4
    invoke-virtual {v8}, Ljava/io/OutputStream;->close()V
    :try_end_4
    .catch Ljava/io/IOException; {:try_start_4 .. :try_end_4} :catch_1

    goto :goto_4

    :catch_1
    move-exception v0

    .line 222
    iget-object v2, p0, Lcom/moji/mjweather/assshop/task/AvatarDownloadVoiceTask;->c:Ljava/lang/String;

    invoke-static {v2, v0}, Lcom/moji/tool/log/MJLogger;->a(Ljava/lang/String;Ljava/lang/Throwable;)V

    :goto_4
    return v1

    :catchall_0
    move-exception v1

    move-object v6, v0

    goto :goto_b

    :catch_2
    move-exception v1

    move-object v6, v0

    goto :goto_5

    :catch_3
    move-exception v1

    move-object v6, v0

    goto :goto_8

    :catch_4
    move-exception v1

    goto :goto_5

    :catch_5
    move-exception v1

    goto :goto_8

    :catchall_1
    move-exception v1

    move-object v8, v6

    goto :goto_b

    :catch_6
    move-exception v1

    move-object v8, v6

    .line 208
    :goto_5
    :try_start_5
    iget-object v0, p0, Lcom/moji/mjweather/assshop/task/AvatarDownloadVoiceTask;->c:Ljava/lang/String;

    invoke-static {v0, v1}, Lcom/moji/tool/log/MJLogger;->a(Ljava/lang/String;Ljava/lang/Throwable;)V
    :try_end_5
    .catchall {:try_start_5 .. :try_end_5} :catchall_2

    if-eqz v6, :cond_6

    .line 213
    :try_start_6
    invoke-virtual {v6}, Ljava/io/InputStream;->close()V
    :try_end_6
    .catch Ljava/io/IOException; {:try_start_6 .. :try_end_6} :catch_7

    goto :goto_6

    :catch_7
    move-exception v0

    .line 215
    iget-object v1, p0, Lcom/moji/mjweather/assshop/task/AvatarDownloadVoiceTask;->c:Ljava/lang/String;

    invoke-static {v1, v0}, Lcom/moji/tool/log/MJLogger;->a(Ljava/lang/String;Ljava/lang/Throwable;)V

    :cond_6
    :goto_6
    if-eqz v8, :cond_7

    .line 220
    :try_start_7
    invoke-virtual {v8}, Ljava/io/OutputStream;->close()V
    :try_end_7
    .catch Ljava/io/IOException; {:try_start_7 .. :try_end_7} :catch_8

    goto :goto_7

    :catch_8
    move-exception v0

    .line 222
    iget-object v1, p0, Lcom/moji/mjweather/assshop/task/AvatarDownloadVoiceTask;->c:Ljava/lang/String;

    invoke-static {v1, v0}, Lcom/moji/tool/log/MJLogger;->a(Ljava/lang/String;Ljava/lang/Throwable;)V

    :cond_7
    :goto_7
    return v2

    :catch_9
    move-exception v1

    move-object v8, v6

    .line 205
    :goto_8
    :try_start_8
    iget-object v0, p0, Lcom/moji/mjweather/assshop/task/AvatarDownloadVoiceTask;->c:Ljava/lang/String;

    invoke-static {v0, v1}, Lcom/moji/tool/log/MJLogger;->a(Ljava/lang/String;Ljava/lang/Throwable;)V
    :try_end_8
    .catchall {:try_start_8 .. :try_end_8} :catchall_2

    if-eqz v6, :cond_8

    .line 213
    :try_start_9
    invoke-virtual {v6}, Ljava/io/InputStream;->close()V
    :try_end_9
    .catch Ljava/io/IOException; {:try_start_9 .. :try_end_9} :catch_a

    goto :goto_9

    :catch_a
    move-exception v0

    .line 215
    iget-object v1, p0, Lcom/moji/mjweather/assshop/task/AvatarDownloadVoiceTask;->c:Ljava/lang/String;

    invoke-static {v1, v0}, Lcom/moji/tool/log/MJLogger;->a(Ljava/lang/String;Ljava/lang/Throwable;)V

    :cond_8
    :goto_9
    if-eqz v8, :cond_9

    .line 220
    :try_start_a
    invoke-virtual {v8}, Ljava/io/OutputStream;->close()V
    :try_end_a
    .catch Ljava/io/IOException; {:try_start_a .. :try_end_a} :catch_b

    goto :goto_a

    :catch_b
    move-exception v0

    .line 222
    iget-object v1, p0, Lcom/moji/mjweather/assshop/task/AvatarDownloadVoiceTask;->c:Ljava/lang/String;

    invoke-static {v1, v0}, Lcom/moji/tool/log/MJLogger;->a(Ljava/lang/String;Ljava/lang/Throwable;)V

    :cond_9
    :goto_a
    return v2

    :catchall_2
    move-exception v1

    :goto_b
    if-eqz v6, :cond_a

    .line 213
    :try_start_b
    invoke-virtual {v6}, Ljava/io/InputStream;->close()V
    :try_end_b
    .catch Ljava/io/IOException; {:try_start_b .. :try_end_b} :catch_c

    goto :goto_c

    :catch_c
    move-exception v0

    .line 215
    iget-object v2, p0, Lcom/moji/mjweather/assshop/task/AvatarDownloadVoiceTask;->c:Ljava/lang/String;

    invoke-static {v2, v0}, Lcom/moji/tool/log/MJLogger;->a(Ljava/lang/String;Ljava/lang/Throwable;)V

    :cond_a
    :goto_c
    if-eqz v8, :cond_b

    .line 220
    :try_start_c
    invoke-virtual {v8}, Ljava/io/OutputStream;->close()V
    :try_end_c
    .catch Ljava/io/IOException; {:try_start_c .. :try_end_c} :catch_d

    goto :goto_d

    :catch_d
    move-exception v0

    .line 222
    iget-object v2, p0, Lcom/moji/mjweather/assshop/task/AvatarDownloadVoiceTask;->c:Ljava/lang/String;

    invoke-static {v2, v0}, Lcom/moji/tool/log/MJLogger;->a(Ljava/lang/String;Ljava/lang/Throwable;)V

    .line 225
    :cond_b
    :goto_d
    throw v1
.end method


# virtual methods
.method protected varargs a([Ljava/lang/Void;)Ljava/lang/Boolean;
    .locals 2

    .line 94
    iget-object p1, p0, Lcom/moji/mjweather/assshop/task/AvatarDownloadVoiceTask;->h:Lcom/moji/mjad/avatar/data/AvatarInfo;

    const/4 v0, 0x0

    if-eqz p1, :cond_1

    .line 95
    invoke-direct {p0}, Lcom/moji/mjweather/assshop/task/AvatarDownloadVoiceTask;->b()Z

    move-result p1

    .line 96
    iput-boolean v0, p0, Lcom/moji/mjweather/assshop/task/AvatarDownloadVoiceTask;->g:Z

    if-eqz p1, :cond_0

    const-string v0, "ad_suit_avatar"

    .line 98
    iget-object v1, p0, Lcom/moji/mjweather/assshop/task/AvatarDownloadVoiceTask;->h:Lcom/moji/mjad/avatar/data/AvatarInfo;

    iget-object v1, v1, Lcom/moji/mjad/avatar/data/AvatarInfo;->strartDate:Ljava/lang/String;

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

    move-result v0

    if-nez v0, :cond_0

    .line 99
    new-instance v0, Lcom/moji/mjweather/assshop/db/AvatarDBManager;

    invoke-direct {v0}, Lcom/moji/mjweather/assshop/db/AvatarDBManager;-><init>()V

    .line 100
    iget-object v1, p0, Lcom/moji/mjweather/assshop/task/AvatarDownloadVoiceTask;->h:Lcom/moji/mjad/avatar/data/AvatarInfo;

    invoke-virtual {v0, v1}, Lcom/moji/mjweather/assshop/db/AvatarDBManager;->a(Lcom/moji/mjad/avatar/data/AvatarInfo;)V

    .line 103
    :cond_0
    invoke-static {p1}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object p1

    return-object p1

    .line 105
    :cond_1
    invoke-static {v0}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object p1

    return-object p1
.end method

.method protected bridge synthetic a([Ljava/lang/Object;)Ljava/lang/Object;
    .locals 0

    .line 39
    check-cast p1, [Ljava/lang/Void;

    invoke-virtual {p0, p1}, Lcom/moji/mjweather/assshop/task/AvatarDownloadVoiceTask;->a([Ljava/lang/Void;)Ljava/lang/Boolean;

    move-result-object p1

    return-object p1
.end method

.method protected a()V
    .locals 2

    const/4 v0, 0x1

    .line 85
    iput-boolean v0, p0, Lcom/moji/mjweather/assshop/task/AvatarDownloadVoiceTask;->b:Z

    .line 86
    invoke-super {p0}, Lcom/moji/tool/thread/task/MJAsyncTask;->a()V

    .line 88
    iget-object v0, p0, Lcom/moji/mjweather/assshop/task/AvatarDownloadVoiceTask;->h:Lcom/moji/mjad/avatar/data/AvatarInfo;

    sget-object v1, Lcom/moji/mjad/avatar/data/AVATAR_STATUS;->AVATAR_STATE_UPDATING:Lcom/moji/mjad/avatar/data/AVATAR_STATUS;

    iput-object v1, v0, Lcom/moji/mjad/avatar/data/AvatarInfo;->status:Lcom/moji/mjad/avatar/data/AVATAR_STATUS;

    return-void
.end method

.method protected a(Ljava/lang/Boolean;)V
    .locals 2

    .line 112
    invoke-super {p0, p1}, Lcom/moji/tool/thread/task/MJAsyncTask;->b(Ljava/lang/Object;)V

    .line 113
    iget-object v0, p0, Lcom/moji/mjweather/assshop/task/AvatarDownloadVoiceTask;->h:Lcom/moji/mjad/avatar/data/AvatarInfo;

    const/4 v1, 0x0

    if-eqz v0, :cond_0

    .line 114
    invoke-virtual {p1}, Ljava/lang/Boolean;->booleanValue()Z

    move-result p1

    if-nez p1, :cond_0

    .line 115
    iget-object p1, p0, Lcom/moji/mjweather/assshop/task/AvatarDownloadVoiceTask;->h:Lcom/moji/mjad/avatar/data/AvatarInfo;

    iput v1, p1, Lcom/moji/mjad/avatar/data/AvatarInfo;->progress:I

    :cond_0
    const/4 p1, 0x1

    .line 118
    iput-boolean p1, p0, Lcom/moji/mjweather/assshop/task/AvatarDownloadVoiceTask;->a:Z

    .line 119
    iput v1, p0, Lcom/moji/mjweather/assshop/task/AvatarDownloadVoiceTask;->f:I

    .line 121
    iget-object p1, p0, Lcom/moji/mjweather/assshop/task/AvatarDownloadVoiceTask;->i:Lcom/moji/mjweather/assshop/task/AvatarDownloadTask$OnDownLoadListener;

    if-eqz p1, :cond_1

    .line 122
    iget-object p1, p0, Lcom/moji/mjweather/assshop/task/AvatarDownloadVoiceTask;->i:Lcom/moji/mjweather/assshop/task/AvatarDownloadTask$OnDownLoadListener;

    invoke-interface {p1}, Lcom/moji/mjweather/assshop/task/AvatarDownloadTask$OnDownLoadListener;->a()V

    .line 124
    :cond_1
    iput-boolean v1, p0, Lcom/moji/mjweather/assshop/task/AvatarDownloadVoiceTask;->b:Z

    return-void
.end method

.method protected synthetic a(Ljava/lang/Object;)V
    .locals 0

    .line 39
    check-cast p1, Ljava/lang/Boolean;

    invoke-virtual {p0, p1}, Lcom/moji/mjweather/assshop/task/AvatarDownloadVoiceTask;->b(Ljava/lang/Boolean;)V

    return-void
.end method

.method protected varargs a([Ljava/lang/Integer;)V
    .locals 3

    .line 67
    invoke-super {p0, p1}, Lcom/moji/tool/thread/task/MJAsyncTask;->b([Ljava/lang/Object;)V

    .line 68
    iget-boolean v0, p0, Lcom/moji/mjweather/assshop/task/AvatarDownloadVoiceTask;->a:Z

    if-nez v0, :cond_0

    const/4 v0, 0x0

    .line 75
    aget-object p1, p1, v0

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

    move-result p1

    int-to-float p1, p1

    .line 76
    iget-object v0, p0, Lcom/moji/mjweather/assshop/task/AvatarDownloadVoiceTask;->c:Ljava/lang/String;

    new-instance v1, Ljava/lang/StringBuilder;

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

    const-string v2, "downloadProgress:"

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

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

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

    move-result-object v1

    invoke-static {v0, v1}, Lcom/moji/tool/log/MJLogger;->b(Ljava/lang/String;Ljava/lang/String;)V

    .line 77
    iget-object v0, p0, Lcom/moji/mjweather/assshop/task/AvatarDownloadVoiceTask;->i:Lcom/moji/mjweather/assshop/task/AvatarDownloadTask$OnDownLoadListener;

    if-eqz v0, :cond_0

    .line 78
    iget-object v0, p0, Lcom/moji/mjweather/assshop/task/AvatarDownloadVoiceTask;->i:Lcom/moji/mjweather/assshop/task/AvatarDownloadTask$OnDownLoadListener;

    invoke-interface {v0, p1}, Lcom/moji/mjweather/assshop/task/AvatarDownloadTask$OnDownLoadListener;->a(F)V

    :cond_0
    return-void
.end method

.method public a(Ljava/lang/String;Ljava/lang/String;J)Z
    .locals 15

    move-object v1, p0

    move-object/from16 v2, p2

    const/4 v3, 0x1

    const/4 v4, 0x0

    .line 233
    :try_start_0
    new-instance v5, Ljava/io/FileInputStream;

    move-object/from16 v0, p1

    invoke-direct {v5, v0}, Ljava/io/FileInputStream;-><init>(Ljava/lang/String;)V
    :try_end_0
    .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_8
    .catchall {:try_start_0 .. :try_end_0} :catchall_3

    .line 234
    :try_start_1
    new-instance v6, Ljava/util/zip/ZipInputStream;

    new-instance v0, Ljava/io/BufferedInputStream;

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

    invoke-direct {v6, v0}, Ljava/util/zip/ZipInputStream;-><init>(Ljava/io/InputStream;)V

    .line 235
    new-instance v0, Ljava/io/File;

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

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

    move-result v7

    const/4 v8, 0x0

    if-eqz v7, :cond_0

    invoke-virtual {v0}, Ljava/io/File;->isDirectory()Z

    move-result v7

    if-nez v7, :cond_1

    .line 237
    :cond_0
    invoke-virtual {v0}, Ljava/io/File;->mkdirs()Z

    move-result v0
    :try_end_1
    .catch Ljava/io/IOException; {:try_start_1 .. :try_end_1} :catch_7
    .catchall {:try_start_1 .. :try_end_1} :catchall_2

    if-nez v0, :cond_1

    .line 285
    :try_start_2
    invoke-virtual {v5}, Ljava/io/InputStream;->close()V
    :try_end_2
    .catch Ljava/io/IOException; {:try_start_2 .. :try_end_2} :catch_0

    goto :goto_0

    :catch_0
    move-exception v0

    move-object v2, v0

    .line 288
    iget-object v0, v1, Lcom/moji/mjweather/assshop/task/AvatarDownloadVoiceTask;->c:Ljava/lang/String;

    invoke-static {v0, v2}, Lcom/moji/tool/log/MJLogger;->a(Ljava/lang/String;Ljava/lang/Throwable;)V

    :goto_0
    return v8

    :cond_1
    const/16 v0, 0x400

    .line 242
    :try_start_3
    new-array v7, v0, [B

    const-wide/16 v9, 0x0

    .line 245
    :goto_1
    invoke-virtual {v6}, Ljava/util/zip/ZipInputStream;->getNextEntry()Ljava/util/zip/ZipEntry;

    move-result-object v0

    if-eqz v0, :cond_8

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

    move-result-object v11

    .line 247
    invoke-virtual {v0}, Ljava/util/zip/ZipEntry;->getCompressedSize()J

    move-result-wide v12

    const/4 v14, 0x0

    add-long/2addr v9, v12

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

    move-result v0

    if-eqz v0, :cond_3

    .line 249
    new-instance v0, Ljava/io/File;

    new-instance v12, Ljava/lang/StringBuilder;

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

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

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

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

    move-result-object v11

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

    .line 250
    invoke-virtual {v0}, Ljava/io/File;->mkdirs()Z

    move-result v0
    :try_end_3
    .catch Ljava/io/IOException; {:try_start_3 .. :try_end_3} :catch_7
    .catchall {:try_start_3 .. :try_end_3} :catchall_2

    if-nez v0, :cond_2

    .line 285
    :try_start_4
    invoke-virtual {v5}, Ljava/io/InputStream;->close()V
    :try_end_4
    .catch Ljava/io/IOException; {:try_start_4 .. :try_end_4} :catch_1

    goto :goto_2

    :catch_1
    move-exception v0

    move-object v2, v0

    .line 288
    iget-object v0, v1, Lcom/moji/mjweather/assshop/task/AvatarDownloadVoiceTask;->c:Ljava/lang/String;

    invoke-static {v0, v2}, Lcom/moji/tool/log/MJLogger;->a(Ljava/lang/String;Ljava/lang/Throwable;)V

    :goto_2
    return v8

    :cond_2
    move-wide/from16 v11, p3

    goto :goto_1

    .line 257
    :cond_3
    :try_start_5
    new-instance v12, Ljava/io/FileOutputStream;

    new-instance v0, Ljava/lang/StringBuilder;

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

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

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

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

    move-result-object v0

    invoke-direct {v12, v0, v8}, Ljava/io/FileOutputStream;-><init>(Ljava/lang/String;Z)V
    :try_end_5
    .catch Ljava/io/IOException; {:try_start_5 .. :try_end_5} :catch_4
    .catchall {:try_start_5 .. :try_end_5} :catchall_0

    .line 258
    :goto_3
    :try_start_6
    invoke-virtual {v6, v7}, Ljava/util/zip/ZipInputStream;->read([B)I

    move-result v0

    const/4 v11, -0x1

    if-eq v0, v11, :cond_4

    .line 259
    invoke-virtual {v12, v7, v8, v0}, Ljava/io/FileOutputStream;->write([BII)V
    :try_end_6
    .catch Ljava/io/IOException; {:try_start_6 .. :try_end_6} :catch_3
    .catchall {:try_start_6 .. :try_end_6} :catchall_1

    goto :goto_3

    .line 266
    :cond_4
    :try_start_7
    invoke-virtual {v12}, Ljava/io/FileOutputStream;->close()V

    .line 267
    invoke-virtual {v6}, Ljava/util/zip/ZipInputStream;->closeEntry()V
    :try_end_7
    .catch Ljava/io/IOException; {:try_start_7 .. :try_end_7} :catch_2
    .catchall {:try_start_7 .. :try_end_7} :catchall_2

    goto :goto_6

    :catch_2
    move-exception v0

    .line 269
    :try_start_8
    iget-object v11, v1, Lcom/moji/mjweather/assshop/task/AvatarDownloadVoiceTask;->c:Ljava/lang/String;

    :goto_4
    invoke-static {v11, v0}, Lcom/moji/tool/log/MJLogger;->a(Ljava/lang/String;Ljava/lang/Throwable;)V
    :try_end_8
    .catch Ljava/io/IOException; {:try_start_8 .. :try_end_8} :catch_7
    .catchall {:try_start_8 .. :try_end_8} :catchall_2

    goto :goto_6

    :catch_3
    move-exception v0

    goto :goto_5

    :catchall_0
    move-exception v0

    move-object v2, v0

    goto :goto_8

    :catch_4
    move-exception v0

    move-object v12, v4

    .line 262
    :goto_5
    :try_start_9
    iget-object v11, v1, Lcom/moji/mjweather/assshop/task/AvatarDownloadVoiceTask;->c:Ljava/lang/String;

    invoke-static {v11, v0}, Lcom/moji/tool/log/MJLogger;->a(Ljava/lang/String;Ljava/lang/Throwable;)V
    :try_end_9
    .catchall {:try_start_9 .. :try_end_9} :catchall_1

    if-eqz v12, :cond_5

    .line 266
    :try_start_a
    invoke-virtual {v12}, Ljava/io/FileOutputStream;->close()V

    .line 267
    invoke-virtual {v6}, Ljava/util/zip/ZipInputStream;->closeEntry()V
    :try_end_a
    .catch Ljava/io/IOException; {:try_start_a .. :try_end_a} :catch_5
    .catchall {:try_start_a .. :try_end_a} :catchall_2

    goto :goto_6

    :catch_5
    move-exception v0

    .line 269
    :try_start_b
    iget-object v11, v1, Lcom/moji/mjweather/assshop/task/AvatarDownloadVoiceTask;->c:Ljava/lang/String;

    goto :goto_4

    :cond_5
    :goto_6
    long-to-float v0, v9

    move-wide/from16 v11, p3

    long-to-float v13, v11

    div-float/2addr v0, v13

    const/high16 v13, 0x42c80000    # 100.0f

    mul-float v0, v0, v13

    cmpl-float v14, v0, v13

    if-lez v14, :cond_6

    goto :goto_7

    :cond_6
    move v13, v0

    .line 277
    :goto_7
    new-array v0, v3, [Ljava/lang/Integer;

    float-to-int v13, v13

    add-int/lit8 v13, v13, 0x64

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

    move-result-object v13

    aput-object v13, v0, v8

    invoke-virtual {p0, v0}, Lcom/moji/mjweather/assshop/task/AvatarDownloadVoiceTask;->c([Ljava/lang/Object;)V
    :try_end_b
    .catch Ljava/io/IOException; {:try_start_b .. :try_end_b} :catch_7
    .catchall {:try_start_b .. :try_end_b} :catchall_2

    goto/16 :goto_1

    :catchall_1
    move-exception v0

    move-object v2, v0

    move-object v4, v12

    :goto_8
    if-eqz v4, :cond_7

    .line 266
    :try_start_c
    invoke-virtual {v4}, Ljava/io/FileOutputStream;->close()V

    .line 267
    invoke-virtual {v6}, Ljava/util/zip/ZipInputStream;->closeEntry()V
    :try_end_c
    .catch Ljava/io/IOException; {:try_start_c .. :try_end_c} :catch_6
    .catchall {:try_start_c .. :try_end_c} :catchall_2

    goto :goto_9

    :catch_6
    move-exception v0

    .line 269
    :try_start_d
    iget-object v4, v1, Lcom/moji/mjweather/assshop/task/AvatarDownloadVoiceTask;->c:Ljava/lang/String;

    invoke-static {v4, v0}, Lcom/moji/tool/log/MJLogger;->a(Ljava/lang/String;Ljava/lang/Throwable;)V

    .line 272
    :cond_7
    :goto_9
    throw v2
    :try_end_d
    .catch Ljava/io/IOException; {:try_start_d .. :try_end_d} :catch_7
    .catchall {:try_start_d .. :try_end_d} :catchall_2

    .line 285
    :cond_8
    :try_start_e
    invoke-virtual {v5}, Ljava/io/InputStream;->close()V
    :try_end_e
    .catch Ljava/io/IOException; {:try_start_e .. :try_end_e} :catch_9

    goto :goto_b

    :catchall_2
    move-exception v0

    move-object v2, v0

    goto :goto_c

    :catch_7
    move-exception v0

    move-object v4, v5

    goto :goto_a

    :catchall_3
    move-exception v0

    move-object v2, v0

    move-object v5, v4

    goto :goto_c

    :catch_8
    move-exception v0

    .line 281
    :goto_a
    :try_start_f
    iget-object v2, v1, Lcom/moji/mjweather/assshop/task/AvatarDownloadVoiceTask;->c:Ljava/lang/String;

    invoke-static {v2, v0}, Lcom/moji/tool/log/MJLogger;->a(Ljava/lang/String;Ljava/lang/Throwable;)V
    :try_end_f
    .catchall {:try_start_f .. :try_end_f} :catchall_3

    if-eqz v4, :cond_9

    .line 285
    :try_start_10
    invoke-virtual {v4}, Ljava/io/InputStream;->close()V
    :try_end_10
    .catch Ljava/io/IOException; {:try_start_10 .. :try_end_10} :catch_9

    goto :goto_b

    :catch_9
    move-exception v0

    move-object v2, v0

    .line 288
    iget-object v0, v1, Lcom/moji/mjweather/assshop/task/AvatarDownloadVoiceTask;->c:Ljava/lang/String;

    invoke-static {v0, v2}, Lcom/moji/tool/log/MJLogger;->a(Ljava/lang/String;Ljava/lang/Throwable;)V

    :cond_9
    :goto_b
    return v3

    :goto_c
    if-eqz v5, :cond_a

    .line 285
    :try_start_11
    invoke-virtual {v5}, Ljava/io/InputStream;->close()V
    :try_end_11
    .catch Ljava/io/IOException; {:try_start_11 .. :try_end_11} :catch_a

    goto :goto_d

    :catch_a
    move-exception v0

    move-object v3, v0

    .line 288
    iget-object v0, v1, Lcom/moji/mjweather/assshop/task/AvatarDownloadVoiceTask;->c:Ljava/lang/String;

    invoke-static {v0, v3}, Lcom/moji/tool/log/MJLogger;->a(Ljava/lang/String;Ljava/lang/Throwable;)V

    .line 290
    :cond_a
    :goto_d
    throw v2
.end method

.method protected b(Ljava/lang/Boolean;)V
    .locals 2

    .line 129
    invoke-super {p0, p1}, Lcom/moji/tool/thread/task/MJAsyncTask;->a(Ljava/lang/Object;)V

    .line 130
    invoke-virtual {p1}, Ljava/lang/Boolean;->booleanValue()Z

    move-result v0

    if-nez v0, :cond_0

    const v0, 0x7f0e0588

    .line 131
    invoke-static {v0}, Lcom/moji/tool/ToastTool;->a(I)V

    :cond_0
    const/4 v0, 0x0

    .line 133
    iput v0, p0, Lcom/moji/mjweather/assshop/task/AvatarDownloadVoiceTask;->f:I

    .line 134
    iget-object v1, p0, Lcom/moji/mjweather/assshop/task/AvatarDownloadVoiceTask;->i:Lcom/moji/mjweather/assshop/task/AvatarDownloadTask$OnDownLoadListener;

    if-eqz v1, :cond_1

    .line 135
    iget-object v1, p0, Lcom/moji/mjweather/assshop/task/AvatarDownloadVoiceTask;->i:Lcom/moji/mjweather/assshop/task/AvatarDownloadTask$OnDownLoadListener;

    invoke-virtual {p1}, Ljava/lang/Boolean;->booleanValue()Z

    move-result p1

    invoke-interface {v1, p1}, Lcom/moji/mjweather/assshop/task/AvatarDownloadTask$OnDownLoadListener;->a(Z)V

    .line 137
    :cond_1
    iput-boolean v0, p0, Lcom/moji/mjweather/assshop/task/AvatarDownloadVoiceTask;->b:Z

    return-void
.end method

.method protected synthetic b(Ljava/lang/Object;)V
    .locals 0

    .line 39
    check-cast p1, Ljava/lang/Boolean;

    invoke-virtual {p0, p1}, Lcom/moji/mjweather/assshop/task/AvatarDownloadVoiceTask;->a(Ljava/lang/Boolean;)V

    return-void
.end method

.method protected synthetic b([Ljava/lang/Object;)V
    .locals 0

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

    invoke-virtual {p0, p1}, Lcom/moji/mjweather/assshop/task/AvatarDownloadVoiceTask;->a([Ljava/lang/Integer;)V

    return-void
.end method
