.class public Lcom/moji/mjad/background/network/AdBgDownLoadTask;
.super Lcom/moji/tool/thread/task/MJAsyncTask;
.source "AdBgDownLoadTask.java"


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


# static fields
.field private static final a:Ljava/lang/String; = "AdBgDownLoadTask"


# instance fields
.field private b:Ljava/lang/String;

.field private c:Ljava/lang/String;

.field private d:Ljava/lang/String;

.field private e:Ljava/lang/String;

.field private f:J

.field private g:Lcom/moji/mjad/background/interfaces/IBgAdLoadFileCallback;


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

    return-void
.end method

.method public constructor <init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;J)V
    .locals 7

    const/4 v6, 0x0

    move-object v0, p0

    move-object v1, p1

    move-object v2, p2

    move-object v3, p3

    move-wide v4, p4

    .line 39
    invoke-direct/range {v0 .. v6}, Lcom/moji/mjad/background/network/AdBgDownLoadTask;-><init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;JLcom/moji/mjad/background/interfaces/IBgAdLoadFileCallback;)V

    return-void
.end method

.method public constructor <init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;JLcom/moji/mjad/background/interfaces/IBgAdLoadFileCallback;)V
    .locals 1

    .line 43
    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 44
    iput-object p3, p0, Lcom/moji/mjad/background/network/AdBgDownLoadTask;->b:Ljava/lang/String;

    .line 45
    iput-object p2, p0, Lcom/moji/mjad/background/network/AdBgDownLoadTask;->d:Ljava/lang/String;

    .line 46
    iput-wide p4, p0, Lcom/moji/mjad/background/network/AdBgDownLoadTask;->f:J

    .line 47
    new-instance p2, Ljava/lang/StringBuilder;

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

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

    const-string p1, ""

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

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

    move-result-object p1

    iput-object p1, p0, Lcom/moji/mjad/background/network/AdBgDownLoadTask;->e:Ljava/lang/String;

    .line 48
    new-instance p1, Ljava/lang/StringBuilder;

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

    sget-object p2, Lcom/moji/mjad/util/AdUtil;->j:Ljava/lang/String;

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

    iget-object p2, p0, Lcom/moji/mjad/background/network/AdBgDownLoadTask;->e:Ljava/lang/String;

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

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

    move-result-object p1

    iput-object p1, p0, Lcom/moji/mjad/background/network/AdBgDownLoadTask;->c:Ljava/lang/String;

    .line 49
    iput-object p6, p0, Lcom/moji/mjad/background/network/AdBgDownLoadTask;->g:Lcom/moji/mjad/background/interfaces/IBgAdLoadFileCallback;

    return-void
.end method


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

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

    invoke-virtual {p0, p1}, Lcom/moji/mjad/background/network/AdBgDownLoadTask;->a([Ljava/lang/Void;)Ljava/lang/Void;

    move-result-object p1

    return-object p1
.end method

.method protected varargs a([Ljava/lang/Void;)Ljava/lang/Void;
    .locals 9

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

    new-instance v0, Ljava/lang/StringBuilder;

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

    iget-object v1, p0, Lcom/moji/mjad/background/network/AdBgDownLoadTask;->c:Ljava/lang/String;

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

    const-string v1, "/"

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

    iget-object v1, p0, Lcom/moji/mjad/background/network/AdBgDownLoadTask;->d:Ljava/lang/String;

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

    const-string v1, ".zip"

    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

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

    const/4 v0, 0x0

    .line 59
    :try_start_0
    sget-object v1, Lcom/moji/mjad/background/network/AdBgDownLoadTask;->a:Ljava/lang/String;

    new-instance v2, Ljava/lang/StringBuilder;

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

    const-string v3, "\u4e0b\u8f7d\u94fe\u63a5 ->"

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

    iget-object v3, p0, Lcom/moji/mjad/background/network/AdBgDownLoadTask;->b:Ljava/lang/String;

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

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

    move-result-object v2

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

    .line 60
    iget-object v1, p0, Lcom/moji/mjad/background/network/AdBgDownLoadTask;->b:Ljava/lang/String;

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

    move-result v1

    if-nez v1, :cond_b

    .line 61
    new-instance v1, Ljava/io/File;

    iget-object v2, p0, Lcom/moji/mjad/background/network/AdBgDownLoadTask;->c:Ljava/lang/String;

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

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

    move-result v2

    if-nez v2, :cond_0

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

    move-result v1

    if-nez v1, :cond_0

    .line 64
    sget-object v1, Lcom/moji/mjad/background/network/AdBgDownLoadTask;->a:Ljava/lang/String;

    const-string v2, "File mkdirs failed"

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

    .line 68
    :cond_0
    invoke-virtual {p1}, Ljava/io/File;->exists()Z

    move-result v1

    if-eqz v1, :cond_1

    .line 69
    sget-object v1, Lcom/moji/mjad/background/network/AdBgDownLoadTask;->a:Ljava/lang/String;

    new-instance v2, Ljava/lang/StringBuilder;

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

    iget-object v3, p0, Lcom/moji/mjad/background/network/AdBgDownLoadTask;->c:Ljava/lang/String;

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

    const-string v3, "  \u6587\u4ef6\u5df2\u7ecf\u5b58\u5728\uff0c\u6821\u9a8c\u4e00\u81f4\u3002\u65e0\u9700\u4e0b\u8f7d."

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

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

    move-result-object v2

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

    goto/16 :goto_2

    .line 71
    :cond_1
    new-instance v1, Ljava/net/URL;

    iget-object v2, p0, Lcom/moji/mjad/background/network/AdBgDownLoadTask;->b:Ljava/lang/String;

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

    .line 72
    new-instance v2, Lokhttp3/OkUrlFactory;

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

    move-result-object v3

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

    move-result-object v3

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

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

    move-result-object v1
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_5
    .catchall {:try_start_0 .. :try_end_0} :catchall_2

    const/16 v2, 0x1388

    .line 73
    :try_start_1
    invoke-virtual {v1, v2}, Ljava/net/HttpURLConnection;->setConnectTimeout(I)V

    const-string v2, "GET"

    .line 74
    invoke-virtual {v1, v2}, Ljava/net/HttpURLConnection;->setRequestMethod(Ljava/lang/String;)V

    .line 75
    invoke-virtual {v1}, Ljava/net/HttpURLConnection;->getResponseCode()I

    move-result v2

    const/16 v3, 0xc8

    if-ne v2, v3, :cond_9

    .line 76
    sget-object v2, Lcom/moji/mjad/background/network/AdBgDownLoadTask;->a:Ljava/lang/String;

    const-string v3, "HttpURLConnection.HTTP_OK"

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

    .line 77
    invoke-virtual {v1}, Ljava/net/HttpURLConnection;->getInputStream()Ljava/io/InputStream;

    move-result-object v2
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_2
    .catchall {:try_start_1 .. :try_end_1} :catchall_1

    if-eqz v2, :cond_7

    .line 79
    :try_start_2
    invoke-virtual {p1}, Ljava/io/File;->exists()Z

    move-result v3

    if-nez v3, :cond_2

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

    move-result v3

    if-nez v3, :cond_2

    .line 81
    sget-object v3, Lcom/moji/mjad/background/network/AdBgDownLoadTask;->a:Ljava/lang/String;

    new-instance v4, Ljava/lang/StringBuilder;

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

    invoke-virtual {p1}, Ljava/io/File;->getPath()Ljava/lang/String;

    move-result-object v5

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

    const-string v5, " File create failed"

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

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

    move-result-object v4

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

    .line 85
    :cond_2
    new-instance v3, Ljava/io/FileOutputStream;

    invoke-direct {v3, p1}, Ljava/io/FileOutputStream;-><init>(Ljava/io/File;)V
    :try_end_2
    .catch Ljava/lang/Exception; {:try_start_2 .. :try_end_2} :catch_1
    .catchall {:try_start_2 .. :try_end_2} :catchall_0

    const/16 v4, 0x200

    .line 86
    :try_start_3
    new-array v4, v4, [B

    .line 88
    :goto_0
    invoke-virtual {v2, v4}, Ljava/io/InputStream;->read([B)I

    move-result v5

    if-lez v5, :cond_3

    const/4 v6, 0x0

    .line 89
    invoke-virtual {v3, v4, v6, v5}, Ljava/io/FileOutputStream;->write([BII)V

    goto :goto_0

    .line 91
    :cond_3
    invoke-virtual {v3}, Ljava/io/FileOutputStream;->flush()V

    .line 92
    sget-object v4, Lcom/moji/mjad/background/network/AdBgDownLoadTask;->a:Ljava/lang/String;

    new-instance v5, Ljava/lang/StringBuilder;

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

    invoke-virtual {p1}, Ljava/io/File;->getPath()Ljava/lang/String;

    move-result-object v6

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

    const-string v6, " \u52a8\u6001\u5e7f\u544a\u4e0b\u8f7d\u6210\u529f"

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

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

    move-result-object v5

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

    .line 93
    iget-object v4, p0, Lcom/moji/mjad/background/network/AdBgDownLoadTask;->d:Ljava/lang/String;

    invoke-static {p1, v4}, Lcom/moji/mjad/util/AdFileUtil;->a(Ljava/io/File;Ljava/lang/String;)Z

    move-result v4

    if-nez v4, :cond_4

    .line 95
    sget-object v4, Lcom/moji/mjad/background/network/AdBgDownLoadTask;->a:Ljava/lang/String;

    new-instance v5, Ljava/lang/StringBuilder;

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

    invoke-virtual {p1}, Ljava/io/File;->getPath()Ljava/lang/String;

    move-result-object v6

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

    const-string v6, " \u52a8\u6001\u5e7f\u544a\u4e0b\u8f7d\u6210\u529f  \u4f46\u6821\u9a8c\u5931\u8d25"

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

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

    move-result-object v5

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

    .line 96
    invoke-static {p1}, Lcom/moji/mjad/util/AdFileUtil;->b(Ljava/io/File;)V

    goto/16 :goto_4

    .line 98
    :cond_4
    sget-object v4, Lcom/moji/mjad/background/network/AdBgDownLoadTask;->a:Ljava/lang/String;

    new-instance v5, Ljava/lang/StringBuilder;

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

    invoke-virtual {p1}, Ljava/io/File;->getPath()Ljava/lang/String;

    move-result-object v6

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

    const-string v6, " \u52a8\u6001\u5e7f\u544a\u4e0b\u8f7d\u6210\u529f   \u6821\u9a8c\u6210\u529f"

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

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

    move-result-object v5

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

    .line 100
    invoke-virtual {p1}, Ljava/io/File;->getPath()Ljava/lang/String;

    move-result-object v4

    iget-object v5, p0, Lcom/moji/mjad/background/network/AdBgDownLoadTask;->c:Ljava/lang/String;

    iget-object v6, p0, Lcom/moji/mjad/background/network/AdBgDownLoadTask;->d:Ljava/lang/String;

    invoke-static {v4, v5, v6}, Lcom/moji/mjad/util/AdFileUtil;->a(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Z

    move-result v4

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

    new-instance v6, Ljava/lang/StringBuilder;

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

    iget-object v7, p0, Lcom/moji/mjad/background/network/AdBgDownLoadTask;->c:Ljava/lang/String;

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

    const-string v7, "/"

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

    iget-object v7, p0, Lcom/moji/mjad/background/network/AdBgDownLoadTask;->d:Ljava/lang/String;

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

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

    move-result-object v6

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

    if-nez v4, :cond_5

    .line 104
    invoke-static {v5}, Lcom/moji/mjad/util/AdFileUtil;->b(Ljava/io/File;)V

    .line 105
    iget-object v4, p0, Lcom/moji/mjad/background/network/AdBgDownLoadTask;->g:Lcom/moji/mjad/background/interfaces/IBgAdLoadFileCallback;

    if-eqz v4, :cond_6

    .line 106
    iget-object v4, p0, Lcom/moji/mjad/background/network/AdBgDownLoadTask;->g:Lcom/moji/mjad/background/interfaces/IBgAdLoadFileCallback;

    invoke-interface {v4}, Lcom/moji/mjad/background/interfaces/IBgAdLoadFileCallback;->a()V

    goto :goto_1

    .line 110
    :cond_5
    iget-object v4, p0, Lcom/moji/mjad/background/network/AdBgDownLoadTask;->c:Ljava/lang/String;

    iget-wide v5, p0, Lcom/moji/mjad/background/network/AdBgDownLoadTask;->f:J

    invoke-static {v4, v5, v6}, Lcom/moji/mjad/util/AdFileUtil;->a(Ljava/lang/String;J)V

    .line 111
    iget-object v4, p0, Lcom/moji/mjad/background/network/AdBgDownLoadTask;->g:Lcom/moji/mjad/background/interfaces/IBgAdLoadFileCallback;

    if-eqz v4, :cond_6

    .line 112
    iget-object v4, p0, Lcom/moji/mjad/background/network/AdBgDownLoadTask;->g:Lcom/moji/mjad/background/interfaces/IBgAdLoadFileCallback;

    iget-object v5, p0, Lcom/moji/mjad/background/network/AdBgDownLoadTask;->e:Ljava/lang/String;

    invoke-interface {v4, v5}, Lcom/moji/mjad/background/interfaces/IBgAdLoadFileCallback;->a(Ljava/lang/String;)V

    .line 115
    :cond_6
    :goto_1
    invoke-static {p1}, Lcom/moji/mjad/util/AdFileUtil;->b(Ljava/io/File;)V
    :try_end_3
    .catch Ljava/lang/Exception; {:try_start_3 .. :try_end_3} :catch_0
    .catchall {:try_start_3 .. :try_end_3} :catchall_3

    goto :goto_4

    :catch_0
    move-exception v4

    goto/16 :goto_7

    :catchall_0
    move-exception v3

    move-object v8, v3

    move-object v3, v0

    move-object v0, v8

    goto/16 :goto_b

    :catch_1
    move-exception v3

    move-object v4, v3

    move-object v3, v0

    goto/16 :goto_7

    .line 117
    :cond_7
    :try_start_4
    iget-object v3, p0, Lcom/moji/mjad/background/network/AdBgDownLoadTask;->g:Lcom/moji/mjad/background/interfaces/IBgAdLoadFileCallback;

    if-eqz v3, :cond_8

    .line 118
    iget-object v3, p0, Lcom/moji/mjad/background/network/AdBgDownLoadTask;->g:Lcom/moji/mjad/background/interfaces/IBgAdLoadFileCallback;

    invoke-interface {v3}, Lcom/moji/mjad/background/interfaces/IBgAdLoadFileCallback;->a()V
    :try_end_4
    .catch Ljava/lang/Exception; {:try_start_4 .. :try_end_4} :catch_1
    .catchall {:try_start_4 .. :try_end_4} :catchall_0

    :cond_8
    move-object v3, v0

    goto :goto_4

    .line 120
    :cond_9
    :try_start_5
    iget-object v2, p0, Lcom/moji/mjad/background/network/AdBgDownLoadTask;->g:Lcom/moji/mjad/background/interfaces/IBgAdLoadFileCallback;

    if-eqz v2, :cond_a

    .line 121
    iget-object v2, p0, Lcom/moji/mjad/background/network/AdBgDownLoadTask;->g:Lcom/moji/mjad/background/interfaces/IBgAdLoadFileCallback;

    invoke-interface {v2}, Lcom/moji/mjad/background/interfaces/IBgAdLoadFileCallback;->a()V
    :try_end_5
    .catch Ljava/lang/Exception; {:try_start_5 .. :try_end_5} :catch_2
    .catchall {:try_start_5 .. :try_end_5} :catchall_1

    :cond_a
    move-object v2, v0

    goto :goto_3

    :catchall_1
    move-exception v2

    move-object v3, v0

    move-object v0, v2

    move-object v2, v3

    goto/16 :goto_b

    :catch_2
    move-exception v2

    move-object v3, v0

    move-object v4, v2

    move-object v2, v3

    goto :goto_7

    :cond_b
    :goto_2
    move-object v1, v0

    move-object v2, v1

    :goto_3
    move-object v3, v2

    :goto_4
    if-eqz v2, :cond_c

    .line 140
    :try_start_6
    invoke-virtual {v2}, Ljava/io/InputStream;->close()V
    :try_end_6
    .catch Ljava/lang/Exception; {:try_start_6 .. :try_end_6} :catch_3

    goto :goto_5

    :catch_3
    move-exception v2

    .line 142
    invoke-static {p1}, Lcom/moji/mjad/util/AdFileUtil;->b(Ljava/io/File;)V

    .line 143
    sget-object v4, Lcom/moji/mjad/background/network/AdBgDownLoadTask;->a:Ljava/lang/String;

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

    :cond_c
    :goto_5
    if-eqz v3, :cond_d

    .line 149
    :try_start_7
    invoke-virtual {v3}, Ljava/io/FileOutputStream;->close()V
    :try_end_7
    .catch Ljava/lang/Exception; {:try_start_7 .. :try_end_7} :catch_4

    goto :goto_6

    :catch_4
    move-exception v2

    .line 151
    invoke-static {p1}, Lcom/moji/mjad/util/AdFileUtil;->b(Ljava/io/File;)V

    .line 152
    sget-object p1, Lcom/moji/mjad/background/network/AdBgDownLoadTask;->a:Ljava/lang/String;

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

    :cond_d
    :goto_6
    if-eqz v1, :cond_13

    goto :goto_a

    :catchall_2
    move-exception v1

    move-object v2, v0

    move-object v3, v2

    move-object v0, v1

    move-object v1, v3

    goto :goto_b

    :catch_5
    move-exception v1

    move-object v2, v0

    move-object v3, v2

    move-object v4, v1

    move-object v1, v3

    .line 126
    :goto_7
    :try_start_8
    invoke-virtual {p1}, Ljava/io/File;->exists()Z

    move-result v5

    if-eqz v5, :cond_e

    .line 127
    invoke-static {p1}, Lcom/moji/mjad/util/AdFileUtil;->b(Ljava/io/File;)V

    .line 129
    :cond_e
    new-instance v5, Ljava/io/File;

    iget-object v6, p0, Lcom/moji/mjad/background/network/AdBgDownLoadTask;->c:Ljava/lang/String;

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

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

    move-result v5

    if-eqz v5, :cond_f

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

    iget-object v6, p0, Lcom/moji/mjad/background/network/AdBgDownLoadTask;->c:Ljava/lang/String;

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

    invoke-static {v5}, Lcom/moji/mjad/util/AdFileUtil;->b(Ljava/io/File;)V

    .line 133
    :cond_f
    sget-object v5, Lcom/moji/mjad/background/network/AdBgDownLoadTask;->a:Ljava/lang/String;

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

    .line 134
    iget-object v4, p0, Lcom/moji/mjad/background/network/AdBgDownLoadTask;->g:Lcom/moji/mjad/background/interfaces/IBgAdLoadFileCallback;

    if-eqz v4, :cond_10

    .line 135
    iget-object v4, p0, Lcom/moji/mjad/background/network/AdBgDownLoadTask;->g:Lcom/moji/mjad/background/interfaces/IBgAdLoadFileCallback;

    invoke-interface {v4}, Lcom/moji/mjad/background/interfaces/IBgAdLoadFileCallback;->a()V
    :try_end_8
    .catchall {:try_start_8 .. :try_end_8} :catchall_3

    :cond_10
    if-eqz v2, :cond_11

    .line 140
    :try_start_9
    invoke-virtual {v2}, Ljava/io/InputStream;->close()V
    :try_end_9
    .catch Ljava/lang/Exception; {:try_start_9 .. :try_end_9} :catch_6

    goto :goto_8

    :catch_6
    move-exception v2

    .line 142
    invoke-static {p1}, Lcom/moji/mjad/util/AdFileUtil;->b(Ljava/io/File;)V

    .line 143
    sget-object v4, Lcom/moji/mjad/background/network/AdBgDownLoadTask;->a:Ljava/lang/String;

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

    :cond_11
    :goto_8
    if-eqz v3, :cond_12

    .line 149
    :try_start_a
    invoke-virtual {v3}, Ljava/io/FileOutputStream;->close()V
    :try_end_a
    .catch Ljava/lang/Exception; {:try_start_a .. :try_end_a} :catch_7

    goto :goto_9

    :catch_7
    move-exception v2

    .line 151
    invoke-static {p1}, Lcom/moji/mjad/util/AdFileUtil;->b(Ljava/io/File;)V

    .line 152
    sget-object p1, Lcom/moji/mjad/background/network/AdBgDownLoadTask;->a:Ljava/lang/String;

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

    :cond_12
    :goto_9
    if-eqz v1, :cond_13

    .line 156
    :goto_a
    invoke-virtual {v1}, Ljava/net/HttpURLConnection;->disconnect()V

    :cond_13
    return-object v0

    :catchall_3
    move-exception v0

    :goto_b
    if-eqz v2, :cond_14

    .line 140
    :try_start_b
    invoke-virtual {v2}, Ljava/io/InputStream;->close()V
    :try_end_b
    .catch Ljava/lang/Exception; {:try_start_b .. :try_end_b} :catch_8

    goto :goto_c

    :catch_8
    move-exception v2

    .line 142
    invoke-static {p1}, Lcom/moji/mjad/util/AdFileUtil;->b(Ljava/io/File;)V

    .line 143
    sget-object v4, Lcom/moji/mjad/background/network/AdBgDownLoadTask;->a:Ljava/lang/String;

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

    :cond_14
    :goto_c
    if-eqz v3, :cond_15

    .line 149
    :try_start_c
    invoke-virtual {v3}, Ljava/io/FileOutputStream;->close()V
    :try_end_c
    .catch Ljava/lang/Exception; {:try_start_c .. :try_end_c} :catch_9

    goto :goto_d

    :catch_9
    move-exception v2

    .line 151
    invoke-static {p1}, Lcom/moji/mjad/util/AdFileUtil;->b(Ljava/io/File;)V

    .line 152
    sget-object p1, Lcom/moji/mjad/background/network/AdBgDownLoadTask;->a:Ljava/lang/String;

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

    :cond_15
    :goto_d
    if-eqz v1, :cond_16

    .line 156
    invoke-virtual {v1}, Ljava/net/HttpURLConnection;->disconnect()V

    .line 158
    :cond_16
    throw v0
.end method
