.class Lcom/moji/download/MJDownLoadManager$1;
.super Ljava/lang/Object;
.source "MJDownLoadManager.java"

# interfaces
.implements Lcom/moji/requestcore/DownloadRequest$DownloadCallback;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/moji/download/MJDownLoadManager;->a(Lcom/moji/download/MJDownloadRequest;)V
.end annotation

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


# instance fields
.field final synthetic a:Lcom/moji/download/MJDownloadRequest;

.field final synthetic b:Lcom/moji/download/MJDownLoadManager;


# direct methods
.method constructor <init>(Lcom/moji/download/MJDownLoadManager;Lcom/moji/download/MJDownloadRequest;)V
    .locals 0

    .line 48
    iput-object p1, p0, Lcom/moji/download/MJDownLoadManager$1;->b:Lcom/moji/download/MJDownLoadManager;

    iput-object p2, p0, Lcom/moji/download/MJDownLoadManager$1;->a:Lcom/moji/download/MJDownloadRequest;

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

    return-void
.end method


# virtual methods
.method public a()V
    .locals 2

    .line 51
    iget-object v0, p0, Lcom/moji/download/MJDownLoadManager$1;->a:Lcom/moji/download/MJDownloadRequest;

    invoke-virtual {v0}, Lcom/moji/download/MJDownloadRequest;->i()Z

    move-result v0

    if-eqz v0, :cond_0

    .line 52
    iget-object v0, p0, Lcom/moji/download/MJDownLoadManager$1;->a:Lcom/moji/download/MJDownloadRequest;

    sget-object v1, Lcom/moji/download/MJDownloadRequest$Status;->CANCEL:Lcom/moji/download/MJDownloadRequest$Status;

    invoke-virtual {v0, v1}, Lcom/moji/download/MJDownloadRequest;->a(Lcom/moji/download/MJDownloadRequest$Status;)V

    goto :goto_0

    .line 55
    :cond_0
    new-instance v0, Ljava/lang/StringBuilder;

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

    iget-object v1, p0, Lcom/moji/download/MJDownLoadManager$1;->a:Lcom/moji/download/MJDownloadRequest;

    invoke-virtual {v1}, Lcom/moji/download/MJDownloadRequest;->b()Ljava/lang/String;

    move-result-object v1

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

    iget-object v1, p0, Lcom/moji/download/MJDownLoadManager$1;->a:Lcom/moji/download/MJDownloadRequest;

    invoke-virtual {v1}, Lcom/moji/download/MJDownloadRequest;->b()Ljava/lang/String;

    move-result-object v1

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

    move-result v0

    if-eqz v0, :cond_1

    .line 56
    iget-object v0, p0, Lcom/moji/download/MJDownLoadManager$1;->a:Lcom/moji/download/MJDownloadRequest;

    sget-object v1, Lcom/moji/download/MJDownloadRequest$Status;->COMPLETE:Lcom/moji/download/MJDownloadRequest$Status;

    invoke-virtual {v0, v1}, Lcom/moji/download/MJDownloadRequest;->a(Lcom/moji/download/MJDownloadRequest$Status;)V

    goto :goto_0

    .line 58
    :cond_1
    iget-object v0, p0, Lcom/moji/download/MJDownLoadManager$1;->a:Lcom/moji/download/MJDownloadRequest;

    sget-object v1, Lcom/moji/download/MJDownloadRequest$Status;->FAIL:Lcom/moji/download/MJDownloadRequest$Status;

    invoke-virtual {v0, v1}, Lcom/moji/download/MJDownloadRequest;->a(Lcom/moji/download/MJDownloadRequest$Status;)V

    :goto_0
    return-void
.end method

.method public b()V
    .locals 2

    .line 66
    iget-object v0, p0, Lcom/moji/download/MJDownLoadManager$1;->a:Lcom/moji/download/MJDownloadRequest;

    sget-object v1, Lcom/moji/download/MJDownloadRequest$Status;->FAIL:Lcom/moji/download/MJDownloadRequest$Status;

    invoke-virtual {v0, v1}, Lcom/moji/download/MJDownloadRequest;->a(Lcom/moji/download/MJDownloadRequest$Status;)V

    return-void
.end method
