.class Lcom/moji/mjweather/voice/DownloadManager$1;
.super Landroid/os/Handler;
.source "DownloadManager.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/moji/mjweather/voice/DownloadManager;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic a:Lcom/moji/mjweather/voice/DownloadManager;


# direct methods
.method constructor <init>(Lcom/moji/mjweather/voice/DownloadManager;)V
    .locals 0

    .line 66
    iput-object p1, p0, Lcom/moji/mjweather/voice/DownloadManager$1;->a:Lcom/moji/mjweather/voice/DownloadManager;

    invoke-direct {p0}, Landroid/os/Handler;-><init>()V

    return-void
.end method


# virtual methods
.method public handleMessage(Landroid/os/Message;)V
    .locals 5

    .line 69
    invoke-super {p0, p1}, Landroid/os/Handler;->handleMessage(Landroid/os/Message;)V

    .line 71
    iget v0, p1, Landroid/os/Message;->what:I

    const/4 v1, 0x3

    const/4 v2, 0x1

    if-eq v0, v2, :cond_0

    iget v0, p1, Landroid/os/Message;->what:I

    if-eq v0, v1, :cond_0

    const-string v0, "MJDownLoadManager"

    .line 72
    new-instance v3, Ljava/lang/StringBuilder;

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

    const-string v4, "msg = "

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

    iget v4, p1, Landroid/os/Message;->what:I

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

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

    move-result-object v3

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

    .line 75
    :cond_0
    iget v0, p1, Landroid/os/Message;->what:I

    packed-switch v0, :pswitch_data_0

    goto/16 :goto_1

    .line 134
    :pswitch_0
    iget-object p1, p0, Lcom/moji/mjweather/voice/DownloadManager$1;->a:Lcom/moji/mjweather/voice/DownloadManager;

    invoke-static {p1}, Lcom/moji/mjweather/voice/DownloadManager;->b(Lcom/moji/mjweather/voice/DownloadManager;)Lcom/moji/dialog/MJDialog;

    move-result-object p1

    if-eqz p1, :cond_1

    iget-object p1, p0, Lcom/moji/mjweather/voice/DownloadManager$1;->a:Lcom/moji/mjweather/voice/DownloadManager;

    invoke-static {p1}, Lcom/moji/mjweather/voice/DownloadManager;->b(Lcom/moji/mjweather/voice/DownloadManager;)Lcom/moji/dialog/MJDialog;

    move-result-object p1

    invoke-virtual {p1}, Lcom/moji/dialog/MJDialog;->isShowing()Z

    move-result p1

    if-eqz p1, :cond_1

    .line 135
    iget-object p1, p0, Lcom/moji/mjweather/voice/DownloadManager$1;->a:Lcom/moji/mjweather/voice/DownloadManager;

    invoke-static {p1}, Lcom/moji/mjweather/voice/DownloadManager;->b(Lcom/moji/mjweather/voice/DownloadManager;)Lcom/moji/dialog/MJDialog;

    move-result-object p1

    invoke-virtual {p1}, Lcom/moji/dialog/MJDialog;->dismiss()V

    .line 136
    iget-object p1, p0, Lcom/moji/mjweather/voice/DownloadManager$1;->a:Lcom/moji/mjweather/voice/DownloadManager;

    const/4 v0, 0x6

    invoke-static {p1, v0}, Lcom/moji/mjweather/voice/DownloadManager;->a(Lcom/moji/mjweather/voice/DownloadManager;I)V

    .line 138
    :cond_1
    iget-object p1, p0, Lcom/moji/mjweather/voice/DownloadManager$1;->a:Lcom/moji/mjweather/voice/DownloadManager;

    invoke-static {p1}, Lcom/moji/mjweather/voice/DownloadManager;->e(Lcom/moji/mjweather/voice/DownloadManager;)V

    goto/16 :goto_1

    .line 142
    :pswitch_1
    iget p1, p1, Landroid/os/Message;->arg1:I

    if-eq p1, v2, :cond_2

    .line 143
    iget-object p1, p0, Lcom/moji/mjweather/voice/DownloadManager$1;->a:Lcom/moji/mjweather/voice/DownloadManager;

    invoke-static {p1}, Lcom/moji/mjweather/voice/DownloadManager;->b(Lcom/moji/mjweather/voice/DownloadManager;)Lcom/moji/dialog/MJDialog;

    move-result-object p1

    if-eqz p1, :cond_2

    iget-object p1, p0, Lcom/moji/mjweather/voice/DownloadManager$1;->a:Lcom/moji/mjweather/voice/DownloadManager;

    invoke-static {p1}, Lcom/moji/mjweather/voice/DownloadManager;->b(Lcom/moji/mjweather/voice/DownloadManager;)Lcom/moji/dialog/MJDialog;

    move-result-object p1

    invoke-virtual {p1}, Lcom/moji/dialog/MJDialog;->isShowing()Z

    move-result p1

    if-eqz p1, :cond_2

    .line 144
    iget-object p1, p0, Lcom/moji/mjweather/voice/DownloadManager$1;->a:Lcom/moji/mjweather/voice/DownloadManager;

    invoke-static {p1}, Lcom/moji/mjweather/voice/DownloadManager;->b(Lcom/moji/mjweather/voice/DownloadManager;)Lcom/moji/dialog/MJDialog;

    move-result-object p1

    invoke-virtual {p1}, Lcom/moji/dialog/MJDialog;->dismiss()V

    .line 145
    iget-object p1, p0, Lcom/moji/mjweather/voice/DownloadManager$1;->a:Lcom/moji/mjweather/voice/DownloadManager;

    const/4 v0, 0x4

    invoke-static {p1, v0}, Lcom/moji/mjweather/voice/DownloadManager;->a(Lcom/moji/mjweather/voice/DownloadManager;I)V

    .line 148
    :cond_2
    iget-object p1, p0, Lcom/moji/mjweather/voice/DownloadManager$1;->a:Lcom/moji/mjweather/voice/DownloadManager;

    invoke-static {p1}, Lcom/moji/mjweather/voice/DownloadManager;->e(Lcom/moji/mjweather/voice/DownloadManager;)V

    goto/16 :goto_1

    .line 127
    :pswitch_2
    iget-object p1, p0, Lcom/moji/mjweather/voice/DownloadManager$1;->a:Lcom/moji/mjweather/voice/DownloadManager;

    invoke-static {p1}, Lcom/moji/mjweather/voice/DownloadManager;->b(Lcom/moji/mjweather/voice/DownloadManager;)Lcom/moji/dialog/MJDialog;

    move-result-object p1

    if-eqz p1, :cond_3

    iget-object p1, p0, Lcom/moji/mjweather/voice/DownloadManager$1;->a:Lcom/moji/mjweather/voice/DownloadManager;

    invoke-static {p1}, Lcom/moji/mjweather/voice/DownloadManager;->b(Lcom/moji/mjweather/voice/DownloadManager;)Lcom/moji/dialog/MJDialog;

    move-result-object p1

    invoke-virtual {p1}, Lcom/moji/dialog/MJDialog;->isShowing()Z

    move-result p1

    if-eqz p1, :cond_3

    .line 128
    iget-object p1, p0, Lcom/moji/mjweather/voice/DownloadManager$1;->a:Lcom/moji/mjweather/voice/DownloadManager;

    invoke-static {p1}, Lcom/moji/mjweather/voice/DownloadManager;->b(Lcom/moji/mjweather/voice/DownloadManager;)Lcom/moji/dialog/MJDialog;

    move-result-object p1

    invoke-virtual {p1}, Lcom/moji/dialog/MJDialog;->dismiss()V

    .line 129
    iget-object p1, p0, Lcom/moji/mjweather/voice/DownloadManager$1;->a:Lcom/moji/mjweather/voice/DownloadManager;

    invoke-static {p1, v1}, Lcom/moji/mjweather/voice/DownloadManager;->a(Lcom/moji/mjweather/voice/DownloadManager;I)V

    .line 131
    :cond_3
    iget-object p1, p0, Lcom/moji/mjweather/voice/DownloadManager$1;->a:Lcom/moji/mjweather/voice/DownloadManager;

    invoke-static {p1}, Lcom/moji/mjweather/voice/DownloadManager;->e(Lcom/moji/mjweather/voice/DownloadManager;)V

    goto/16 :goto_1

    .line 109
    :pswitch_3
    iget p1, p1, Landroid/os/Message;->arg1:I

    if-eq p1, v2, :cond_5

    .line 110
    iget-object p1, p0, Lcom/moji/mjweather/voice/DownloadManager$1;->a:Lcom/moji/mjweather/voice/DownloadManager;

    invoke-static {p1}, Lcom/moji/mjweather/voice/DownloadManager;->d(Lcom/moji/mjweather/voice/DownloadManager;)Landroid/content/Context;

    move-result-object p1

    const v0, 0x7f0e0a22

    const/4 v1, 0x0

    invoke-static {p1, v0, v1}, Landroid/widget/Toast;->makeText(Landroid/content/Context;II)Landroid/widget/Toast;

    move-result-object p1

    invoke-virtual {p1}, Landroid/widget/Toast;->show()V

    .line 111
    iget-object p1, p0, Lcom/moji/mjweather/voice/DownloadManager$1;->a:Lcom/moji/mjweather/voice/DownloadManager;

    invoke-static {p1}, Lcom/moji/mjweather/voice/DownloadManager;->d(Lcom/moji/mjweather/voice/DownloadManager;)Landroid/content/Context;

    move-result-object p1

    instance-of p1, p1, Landroid/app/Activity;

    if-eqz p1, :cond_4

    .line 112
    iget-object p1, p0, Lcom/moji/mjweather/voice/DownloadManager$1;->a:Lcom/moji/mjweather/voice/DownloadManager;

    invoke-static {p1}, Lcom/moji/mjweather/voice/DownloadManager;->d(Lcom/moji/mjweather/voice/DownloadManager;)Landroid/content/Context;

    move-result-object p1

    check-cast p1, Landroid/app/Activity;

    invoke-virtual {p1}, Landroid/app/Activity;->isFinishing()Z

    move-result p1

    if-nez p1, :cond_5

    .line 113
    iget-object p1, p0, Lcom/moji/mjweather/voice/DownloadManager$1;->a:Lcom/moji/mjweather/voice/DownloadManager;

    invoke-static {p1}, Lcom/moji/mjweather/voice/DownloadManager;->b(Lcom/moji/mjweather/voice/DownloadManager;)Lcom/moji/dialog/MJDialog;

    move-result-object p1

    if-eqz p1, :cond_5

    iget-object p1, p0, Lcom/moji/mjweather/voice/DownloadManager$1;->a:Lcom/moji/mjweather/voice/DownloadManager;

    invoke-static {p1}, Lcom/moji/mjweather/voice/DownloadManager;->b(Lcom/moji/mjweather/voice/DownloadManager;)Lcom/moji/dialog/MJDialog;

    move-result-object p1

    invoke-virtual {p1}, Lcom/moji/dialog/MJDialog;->isShowing()Z

    move-result p1

    if-eqz p1, :cond_5

    .line 114
    iget-object p1, p0, Lcom/moji/mjweather/voice/DownloadManager$1;->a:Lcom/moji/mjweather/voice/DownloadManager;

    invoke-static {p1}, Lcom/moji/mjweather/voice/DownloadManager;->b(Lcom/moji/mjweather/voice/DownloadManager;)Lcom/moji/dialog/MJDialog;

    move-result-object p1

    invoke-virtual {p1}, Lcom/moji/dialog/MJDialog;->dismiss()V

    goto :goto_0

    .line 116
    :cond_4
    iget-object p1, p0, Lcom/moji/mjweather/voice/DownloadManager$1;->a:Lcom/moji/mjweather/voice/DownloadManager;

    invoke-static {p1}, Lcom/moji/mjweather/voice/DownloadManager;->b(Lcom/moji/mjweather/voice/DownloadManager;)Lcom/moji/dialog/MJDialog;

    move-result-object p1

    if-eqz p1, :cond_5

    iget-object p1, p0, Lcom/moji/mjweather/voice/DownloadManager$1;->a:Lcom/moji/mjweather/voice/DownloadManager;

    invoke-static {p1}, Lcom/moji/mjweather/voice/DownloadManager;->b(Lcom/moji/mjweather/voice/DownloadManager;)Lcom/moji/dialog/MJDialog;

    move-result-object p1

    invoke-virtual {p1}, Lcom/moji/dialog/MJDialog;->isShowing()Z

    move-result p1

    if-eqz p1, :cond_5

    .line 117
    iget-object p1, p0, Lcom/moji/mjweather/voice/DownloadManager$1;->a:Lcom/moji/mjweather/voice/DownloadManager;

    invoke-static {p1}, Lcom/moji/mjweather/voice/DownloadManager;->b(Lcom/moji/mjweather/voice/DownloadManager;)Lcom/moji/dialog/MJDialog;

    move-result-object p1

    invoke-virtual {p1}, Lcom/moji/dialog/MJDialog;->dismiss()V

    .line 120
    :cond_5
    :goto_0
    iget-object p1, p0, Lcom/moji/mjweather/voice/DownloadManager$1;->a:Lcom/moji/mjweather/voice/DownloadManager;

    invoke-static {p1}, Lcom/moji/mjweather/voice/DownloadManager;->e(Lcom/moji/mjweather/voice/DownloadManager;)V

    .line 121
    iget-object p1, p0, Lcom/moji/mjweather/voice/DownloadManager$1;->a:Lcom/moji/mjweather/voice/DownloadManager;

    invoke-static {p1}, Lcom/moji/mjweather/voice/DownloadManager;->f(Lcom/moji/mjweather/voice/DownloadManager;)Lcom/moji/mjweather/voice/DownloadManager$DownloadListener;

    move-result-object p1

    if-eqz p1, :cond_9

    .line 122
    iget-object p1, p0, Lcom/moji/mjweather/voice/DownloadManager$1;->a:Lcom/moji/mjweather/voice/DownloadManager;

    invoke-static {p1}, Lcom/moji/mjweather/voice/DownloadManager;->f(Lcom/moji/mjweather/voice/DownloadManager;)Lcom/moji/mjweather/voice/DownloadManager$DownloadListener;

    move-result-object p1

    invoke-interface {p1, v2}, Lcom/moji/mjweather/voice/DownloadManager$DownloadListener;->onDownloadDone(Z)V

    goto/16 :goto_1

    .line 95
    :pswitch_4
    iget-object p1, p0, Lcom/moji/mjweather/voice/DownloadManager$1;->a:Lcom/moji/mjweather/voice/DownloadManager;

    invoke-static {p1}, Lcom/moji/mjweather/voice/DownloadManager;->b(Lcom/moji/mjweather/voice/DownloadManager;)Lcom/moji/dialog/MJDialog;

    move-result-object p1

    if-eqz p1, :cond_6

    iget-object p1, p0, Lcom/moji/mjweather/voice/DownloadManager$1;->a:Lcom/moji/mjweather/voice/DownloadManager;

    invoke-static {p1}, Lcom/moji/mjweather/voice/DownloadManager;->b(Lcom/moji/mjweather/voice/DownloadManager;)Lcom/moji/dialog/MJDialog;

    move-result-object p1

    invoke-virtual {p1}, Lcom/moji/dialog/MJDialog;->isShowing()Z

    move-result p1

    if-eqz p1, :cond_6

    .line 96
    iget-object p1, p0, Lcom/moji/mjweather/voice/DownloadManager$1;->a:Lcom/moji/mjweather/voice/DownloadManager;

    invoke-static {p1}, Lcom/moji/mjweather/voice/DownloadManager;->b(Lcom/moji/mjweather/voice/DownloadManager;)Lcom/moji/dialog/MJDialog;

    move-result-object p1

    invoke-virtual {p1}, Lcom/moji/dialog/MJDialog;->dismiss()V

    .line 97
    iget-object p1, p0, Lcom/moji/mjweather/voice/DownloadManager$1;->a:Lcom/moji/mjweather/voice/DownloadManager;

    const/4 v0, 0x2

    invoke-static {p1, v0}, Lcom/moji/mjweather/voice/DownloadManager;->a(Lcom/moji/mjweather/voice/DownloadManager;I)V

    .line 99
    :cond_6
    iget-object p1, p0, Lcom/moji/mjweather/voice/DownloadManager$1;->a:Lcom/moji/mjweather/voice/DownloadManager;

    invoke-static {p1}, Lcom/moji/mjweather/voice/DownloadManager;->a(Lcom/moji/mjweather/voice/DownloadManager;)Landroid/os/Handler;

    move-result-object p1

    if-eqz p1, :cond_9

    .line 100
    iget-object p1, p0, Lcom/moji/mjweather/voice/DownloadManager$1;->a:Lcom/moji/mjweather/voice/DownloadManager;

    invoke-static {p1}, Lcom/moji/mjweather/voice/DownloadManager;->a(Lcom/moji/mjweather/voice/DownloadManager;)Landroid/os/Handler;

    move-result-object p1

    iget-object v0, p0, Lcom/moji/mjweather/voice/DownloadManager$1;->a:Lcom/moji/mjweather/voice/DownloadManager;

    invoke-static {v0}, Lcom/moji/mjweather/voice/DownloadManager;->a(Lcom/moji/mjweather/voice/DownloadManager;)Landroid/os/Handler;

    move-result-object v0

    const/16 v1, 0xb

    invoke-virtual {v0, v1}, Landroid/os/Handler;->obtainMessage(I)Landroid/os/Message;

    move-result-object v0

    invoke-virtual {p1, v0}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z

    goto :goto_1

    .line 89
    :pswitch_5
    iget-object v0, p0, Lcom/moji/mjweather/voice/DownloadManager$1;->a:Lcom/moji/mjweather/voice/DownloadManager;

    invoke-static {v0}, Lcom/moji/mjweather/voice/DownloadManager;->b(Lcom/moji/mjweather/voice/DownloadManager;)Lcom/moji/dialog/MJDialog;

    move-result-object v0

    if-eqz v0, :cond_9

    iget-object v0, p0, Lcom/moji/mjweather/voice/DownloadManager$1;->a:Lcom/moji/mjweather/voice/DownloadManager;

    invoke-static {v0}, Lcom/moji/mjweather/voice/DownloadManager;->b(Lcom/moji/mjweather/voice/DownloadManager;)Lcom/moji/dialog/MJDialog;

    move-result-object v0

    invoke-virtual {v0}, Lcom/moji/dialog/MJDialog;->isShowing()Z

    move-result v0

    if-eqz v0, :cond_9

    iget-object v0, p0, Lcom/moji/mjweather/voice/DownloadManager$1;->a:Lcom/moji/mjweather/voice/DownloadManager;

    invoke-static {v0}, Lcom/moji/mjweather/voice/DownloadManager;->c(Lcom/moji/mjweather/voice/DownloadManager;)Landroid/widget/TextView;

    move-result-object v0

    if-eqz v0, :cond_9

    .line 90
    iget-object v0, p0, Lcom/moji/mjweather/voice/DownloadManager$1;->a:Lcom/moji/mjweather/voice/DownloadManager;

    invoke-static {v0}, Lcom/moji/mjweather/voice/DownloadManager;->c(Lcom/moji/mjweather/voice/DownloadManager;)Landroid/widget/TextView;

    move-result-object v0

    new-instance v1, Ljava/lang/StringBuilder;

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

    iget p1, p1, Landroid/os/Message;->arg1:I

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

    const-string p1, "%"

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

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

    move-result-object p1

    invoke-virtual {v0, p1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    goto :goto_1

    .line 77
    :pswitch_6
    iget-object v0, p1, Landroid/os/Message;->obj:Ljava/lang/Object;

    if-eqz v0, :cond_7

    iget-object v0, p1, Landroid/os/Message;->obj:Ljava/lang/Object;

    instance-of v0, v0, Landroid/os/Handler;

    if-eqz v0, :cond_7

    .line 78
    iget-object v0, p0, Lcom/moji/mjweather/voice/DownloadManager$1;->a:Lcom/moji/mjweather/voice/DownloadManager;

    iget-object v1, p1, Landroid/os/Message;->obj:Ljava/lang/Object;

    check-cast v1, Landroid/os/Handler;

    invoke-static {v0, v1}, Lcom/moji/mjweather/voice/DownloadManager;->a(Lcom/moji/mjweather/voice/DownloadManager;Landroid/os/Handler;)Landroid/os/Handler;

    .line 80
    :cond_7
    iget p1, p1, Landroid/os/Message;->arg1:I

    if-eq p1, v2, :cond_8

    .line 81
    iget-object p1, p0, Lcom/moji/mjweather/voice/DownloadManager$1;->a:Lcom/moji/mjweather/voice/DownloadManager;

    invoke-static {p1, v2}, Lcom/moji/mjweather/voice/DownloadManager;->a(Lcom/moji/mjweather/voice/DownloadManager;I)V

    .line 83
    :cond_8
    iget-object p1, p0, Lcom/moji/mjweather/voice/DownloadManager$1;->a:Lcom/moji/mjweather/voice/DownloadManager;

    invoke-static {p1}, Lcom/moji/mjweather/voice/DownloadManager;->a(Lcom/moji/mjweather/voice/DownloadManager;)Landroid/os/Handler;

    move-result-object p1

    if-eqz p1, :cond_9

    .line 84
    iget-object p1, p0, Lcom/moji/mjweather/voice/DownloadManager$1;->a:Lcom/moji/mjweather/voice/DownloadManager;

    invoke-static {p1}, Lcom/moji/mjweather/voice/DownloadManager;->a(Lcom/moji/mjweather/voice/DownloadManager;)Landroid/os/Handler;

    move-result-object p1

    iget-object v0, p0, Lcom/moji/mjweather/voice/DownloadManager$1;->a:Lcom/moji/mjweather/voice/DownloadManager;

    invoke-static {v0}, Lcom/moji/mjweather/voice/DownloadManager;->a(Lcom/moji/mjweather/voice/DownloadManager;)Landroid/os/Handler;

    move-result-object v0

    const/16 v1, 0xa

    invoke-virtual {v0, v1}, Landroid/os/Handler;->obtainMessage(I)Landroid/os/Message;

    move-result-object v0

    invoke-virtual {p1, v0}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z

    :cond_9
    :goto_1
    :pswitch_7
    return-void

    nop

    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_6
        :pswitch_5
        :pswitch_4
        :pswitch_7
        :pswitch_3
        :pswitch_2
        :pswitch_1
        :pswitch_0
    .end packed-switch
.end method
