.class public Lcom/moji/appwidget/image/AWTimePicDrawable;
.super Ljava/lang/Object;
.source "AWTimePicDrawable.java"


# instance fields
.field private a:Lcom/moji/appwidget/skin/SkinInfo$DrawPicture$DrawPictureType;

.field private b:[I


# direct methods
.method public constructor <init>(Lcom/moji/appwidget/skin/SkinInfo$DrawPicture$DrawPictureType;)V
    .locals 3

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

    const/16 v0, 0xa

    .line 25
    new-array v0, v0, [I

    sget v1, Lcom/moji/appwidget/R$drawable;->org4_widget_nw0:I

    const/4 v2, 0x0

    aput v1, v0, v2

    sget v1, Lcom/moji/appwidget/R$drawable;->org4_widget_nw1:I

    const/4 v2, 0x1

    aput v1, v0, v2

    sget v1, Lcom/moji/appwidget/R$drawable;->org4_widget_nw2:I

    const/4 v2, 0x2

    aput v1, v0, v2

    sget v1, Lcom/moji/appwidget/R$drawable;->org4_widget_nw3:I

    const/4 v2, 0x3

    aput v1, v0, v2

    sget v1, Lcom/moji/appwidget/R$drawable;->org4_widget_nw4:I

    const/4 v2, 0x4

    aput v1, v0, v2

    sget v1, Lcom/moji/appwidget/R$drawable;->org4_widget_nw5:I

    const/4 v2, 0x5

    aput v1, v0, v2

    sget v1, Lcom/moji/appwidget/R$drawable;->org4_widget_nw6:I

    const/4 v2, 0x6

    aput v1, v0, v2

    sget v1, Lcom/moji/appwidget/R$drawable;->org4_widget_nw7:I

    const/4 v2, 0x7

    aput v1, v0, v2

    sget v1, Lcom/moji/appwidget/R$drawable;->org4_widget_nw8:I

    const/16 v2, 0x8

    aput v1, v0, v2

    sget v1, Lcom/moji/appwidget/R$drawable;->org4_widget_nw9:I

    const/16 v2, 0x9

    aput v1, v0, v2

    iput-object v0, p0, Lcom/moji/appwidget/image/AWTimePicDrawable;->b:[I

    .line 22
    iput-object p1, p0, Lcom/moji/appwidget/image/AWTimePicDrawable;->a:Lcom/moji/appwidget/skin/SkinInfo$DrawPicture$DrawPictureType;

    return-void
.end method

.method private a(Ljava/io/File;)V
    .locals 3

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

    move-result v0

    if-nez v0, :cond_0

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

    new-instance v1, Ljava/lang/StringBuilder;

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

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

    move-result-object v2

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

    const-string v2, ".png"

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

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

    move-result-object v1

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

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

    move-result v1

    if-eqz v1, :cond_0

    .line 59
    invoke-virtual {v0}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;

    move-result-object v0

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

    move-result-object p1

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

    move-result p1

    if-eqz p1, :cond_0

    .line 61
    invoke-static {v0}, Lcom/moji/tool/FileTool;->d(Ljava/lang/String;)Z

    :cond_0
    return-void
.end method


# virtual methods
.method public a(Landroid/content/Context;Lcom/moji/appwidget/image/TimeInfo;Z)Landroid/graphics/Bitmap;
    .locals 4
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    .line 30
    sget-object v0, Lcom/moji/appwidget/image/AWTimePicDrawable$1;->a:[I

    iget-object v1, p0, Lcom/moji/appwidget/image/AWTimePicDrawable;->a:Lcom/moji/appwidget/skin/SkinInfo$DrawPicture$DrawPictureType;

    invoke-virtual {v1}, Lcom/moji/appwidget/skin/SkinInfo$DrawPicture$DrawPictureType;->ordinal()I

    move-result v1

    aget v0, v0, v1

    const/4 v1, 0x0

    packed-switch v0, :pswitch_data_0

    goto :goto_0

    :pswitch_0
    const/4 v1, 0x3

    goto :goto_0

    :pswitch_1
    const/4 v1, 0x2

    goto :goto_0

    :pswitch_2
    const/4 v1, 0x1

    :goto_0
    :pswitch_3
    if-eqz p3, :cond_0

    .line 45
    invoke-static {p1}, Lcom/squareup/picasso/Picasso;->a(Landroid/content/Context;)Lcom/squareup/picasso/Picasso;

    move-result-object p1

    iget-object p3, p0, Lcom/moji/appwidget/image/AWTimePicDrawable;->b:[I

    invoke-virtual {p2, v1}, Lcom/moji/appwidget/image/TimeInfo;->getTimeNum(I)I

    move-result p2

    aget p2, p3, p2

    invoke-virtual {p1, p2}, Lcom/squareup/picasso/Picasso;->a(I)Lcom/squareup/picasso/RequestCreator;

    move-result-object p1

    invoke-virtual {p1}, Lcom/squareup/picasso/RequestCreator;->i()Landroid/graphics/Bitmap;

    move-result-object p1

    goto :goto_1

    .line 47
    :cond_0
    invoke-static {p1}, Lcom/moji/appwidget/skin/SkinFolder;->c(Landroid/content/Context;)Ljava/io/File;

    move-result-object p3

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

    new-instance v2, Ljava/lang/StringBuilder;

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

    const-string v3, "n"

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

    invoke-virtual {p2, v1}, Lcom/moji/appwidget/image/TimeInfo;->getTimeNum(I)I

    move-result p2

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

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

    move-result-object p2

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

    .line 49
    invoke-direct {p0, v0}, Lcom/moji/appwidget/image/AWTimePicDrawable;->a(Ljava/io/File;)V

    .line 50
    invoke-static {p1}, Lcom/squareup/picasso/Picasso;->a(Landroid/content/Context;)Lcom/squareup/picasso/Picasso;

    move-result-object p1

    invoke-virtual {p1, v0}, Lcom/squareup/picasso/Picasso;->a(Ljava/io/File;)Lcom/squareup/picasso/RequestCreator;

    move-result-object p1

    invoke-virtual {p1}, Lcom/squareup/picasso/RequestCreator;->i()Landroid/graphics/Bitmap;

    move-result-object p1

    :goto_1
    return-object p1

    nop

    :pswitch_data_0
    .packed-switch 0x1
        :pswitch_3
        :pswitch_2
        :pswitch_1
        :pswitch_0
    .end packed-switch
.end method
