.class Lcom/moji/appupdate/notification/DownloadNotification$1;
.super Landroid/os/Handler;
.source "DownloadNotification.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/moji/appupdate/notification/DownloadNotification;
.end annotation

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


# instance fields
.field final synthetic a:Lcom/moji/appupdate/notification/DownloadNotification;


# direct methods
.method constructor <init>(Lcom/moji/appupdate/notification/DownloadNotification;)V
    .locals 0

    .line 28
    iput-object p1, p0, Lcom/moji/appupdate/notification/DownloadNotification$1;->a:Lcom/moji/appupdate/notification/DownloadNotification;

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

    return-void
.end method


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

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

    .line 32
    iget-object v0, p0, Lcom/moji/appupdate/notification/DownloadNotification$1;->a:Lcom/moji/appupdate/notification/DownloadNotification;

    invoke-static {v0}, Lcom/moji/appupdate/notification/DownloadNotification;->a(Lcom/moji/appupdate/notification/DownloadNotification;)Landroid/widget/RemoteViews;

    move-result-object v0

    sget v1, Lcom/moji/appupdate/R$id;->notificationPercent:I

    new-instance v2, Ljava/lang/StringBuilder;

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

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

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

    const-string v3, "%"

    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-virtual {v0, v1, v2}, Landroid/widget/RemoteViews;->setTextViewText(ILjava/lang/CharSequence;)V

    .line 33
    iget-object v0, p0, Lcom/moji/appupdate/notification/DownloadNotification$1;->a:Lcom/moji/appupdate/notification/DownloadNotification;

    invoke-static {v0}, Lcom/moji/appupdate/notification/DownloadNotification;->a(Lcom/moji/appupdate/notification/DownloadNotification;)Landroid/widget/RemoteViews;

    move-result-object v0

    sget v1, Lcom/moji/appupdate/R$id;->notificationProgress:I

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

    const/16 v3, 0x64

    const/4 v4, 0x0

    invoke-virtual {v0, v1, v3, v2, v4}, Landroid/widget/RemoteViews;->setProgressBar(IIIZ)V

    .line 34
    iget-object v0, p0, Lcom/moji/appupdate/notification/DownloadNotification$1;->a:Lcom/moji/appupdate/notification/DownloadNotification;

    invoke-static {v0}, Lcom/moji/appupdate/notification/DownloadNotification;->b(Lcom/moji/appupdate/notification/DownloadNotification;)Landroid/app/Notification;

    move-result-object v0

    iget-object v1, p0, Lcom/moji/appupdate/notification/DownloadNotification$1;->a:Lcom/moji/appupdate/notification/DownloadNotification;

    invoke-static {v1}, Lcom/moji/appupdate/notification/DownloadNotification;->a(Lcom/moji/appupdate/notification/DownloadNotification;)Landroid/widget/RemoteViews;

    move-result-object v1

    iput-object v1, v0, Landroid/app/Notification;->contentView:Landroid/widget/RemoteViews;

    .line 35
    iget-object v0, p0, Lcom/moji/appupdate/notification/DownloadNotification$1;->a:Lcom/moji/appupdate/notification/DownloadNotification;

    invoke-static {v0}, Lcom/moji/appupdate/notification/DownloadNotification;->c(Lcom/moji/appupdate/notification/DownloadNotification;)Landroid/app/NotificationManager;

    move-result-object v0

    sget v1, Lcom/moji/appupdate/R$layout;->notification_item:I

    iget-object v2, p0, Lcom/moji/appupdate/notification/DownloadNotification$1;->a:Lcom/moji/appupdate/notification/DownloadNotification;

    invoke-static {v2}, Lcom/moji/appupdate/notification/DownloadNotification;->b(Lcom/moji/appupdate/notification/DownloadNotification;)Landroid/app/Notification;

    move-result-object v2

    invoke-virtual {v0, v1, v2}, Landroid/app/NotificationManager;->notify(ILandroid/app/Notification;)V

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

    if-ne p1, v3, :cond_0

    .line 37
    iget-object p1, p0, Lcom/moji/appupdate/notification/DownloadNotification$1;->a:Lcom/moji/appupdate/notification/DownloadNotification;

    invoke-static {p1}, Lcom/moji/appupdate/notification/DownloadNotification;->c(Lcom/moji/appupdate/notification/DownloadNotification;)Landroid/app/NotificationManager;

    move-result-object p1

    sget v0, Lcom/moji/appupdate/R$layout;->notification_item:I

    invoke-virtual {p1, v0}, Landroid/app/NotificationManager;->cancel(I)V

    :cond_0
    return-void
.end method
