.class public Lcom/moji/appwidget/image/CAWFaceDrawer4X2;
.super Lcom/moji/appwidget/image/CAWFaceDrawer;
.source "CAWFaceDrawer4X2.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/moji/appwidget/image/CAWFaceDrawer4X2$SingleHolder;
    }
.end annotation


# direct methods
.method private constructor <init>()V
    .locals 1

    const/4 v0, 0x0

    .line 30
    invoke-direct {p0, v0}, Lcom/moji/appwidget/image/CAWFaceDrawer;-><init>(Lcom/moji/appwidget/image/ImageRemoteViews;)V

    return-void
.end method

.method synthetic constructor <init>(Lcom/moji/appwidget/image/CAWFaceDrawer4X2$1;)V
    .locals 0

    .line 22
    invoke-direct {p0}, Lcom/moji/appwidget/image/CAWFaceDrawer4X2;-><init>()V

    return-void
.end method

.method public static b(Landroid/content/Context;)Lcom/moji/appwidget/image/CAWFaceDrawer4X2;
    .locals 2

    .line 34
    invoke-static {}, Lcom/moji/appwidget/image/CAWFaceDrawer4X2$SingleHolder;->a()Lcom/moji/appwidget/image/CAWFaceDrawer4X2;

    move-result-object v0

    new-instance v1, Lcom/moji/appwidget/image/CImageRemoteViews4X2;

    invoke-direct {v1, p0}, Lcom/moji/appwidget/image/CImageRemoteViews4X2;-><init>(Landroid/content/Context;)V

    invoke-virtual {v0, v1}, Lcom/moji/appwidget/image/CAWFaceDrawer4X2;->a(Lcom/moji/appwidget/image/ImageRemoteViews;)V

    .line 35
    invoke-static {}, Lcom/moji/appwidget/image/CAWFaceDrawer4X2$SingleHolder;->a()Lcom/moji/appwidget/image/CAWFaceDrawer4X2;

    move-result-object p0

    return-object p0
.end method


# virtual methods
.method protected a(Landroid/content/Context;Landroid/graphics/Canvas;Lcom/moji/appwidget/skin/SkinInfo$DrawPicture;)V
    .locals 3

    .line 41
    :try_start_0
    new-instance v0, Ljava/io/File;

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

    move-result-object v1

    const-string v2, "widget_4X2_divideline"

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

    .line 42
    invoke-virtual {p0, v0}, Lcom/moji/appwidget/image/CAWFaceDrawer4X2;->a(Ljava/io/File;)V

    .line 43
    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

    const/4 v0, 0x0

    .line 44
    invoke-virtual {p0, p2, p1, p3, v0}, Lcom/moji/appwidget/image/CAWFaceDrawer4X2;->a(Landroid/graphics/Canvas;Landroid/graphics/Bitmap;Lcom/moji/appwidget/skin/SkinInfo$DrawPicture;Landroid/graphics/Paint;)V
    :try_end_0
    .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    :catch_0
    move-exception p1

    const-string p2, "CAWFaceDrawer4X2"

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

    :goto_0
    return-void
.end method

.method protected a(Landroid/content/Context;Landroid/graphics/Canvas;Lcom/moji/appwidget/skin/SkinInfo$DrawPicture;ZLcom/moji/weatherprovider/data/Weather;)V
    .locals 1

    .line 76
    new-instance p5, Lcom/moji/appwidget/core/AWPrefer;

    invoke-direct {p5, p1}, Lcom/moji/appwidget/core/AWPrefer;-><init>(Landroid/content/Context;)V

    invoke-virtual {p5}, Lcom/moji/appwidget/core/AWPrefer;->c()I

    move-result p5

    const/16 v0, 0x8

    if-nez p5, :cond_1

    if-eqz p4, :cond_0

    .line 78
    iget-object p1, p0, Lcom/moji/appwidget/image/CAWFaceDrawer4X2;->c:Lcom/moji/appwidget/image/ImageRemoteViews;

    sget p2, Lcom/moji/appwidget/R$id;->backgroundLayer:I

    const/4 p3, 0x0

    invoke-virtual {p1, p2, p3}, Lcom/moji/appwidget/image/ImageRemoteViews;->setViewVisibility(II)V

    .line 79
    iget-object p1, p0, Lcom/moji/appwidget/image/CAWFaceDrawer4X2;->c:Lcom/moji/appwidget/image/ImageRemoteViews;

    sget p2, Lcom/moji/appwidget/R$id;->backgroundLayer:I

    sget p3, Lcom/moji/appwidget/R$drawable;->org3_widgetback3:I

    invoke-virtual {p1, p2, p3}, Lcom/moji/appwidget/image/ImageRemoteViews;->setImageViewResource(II)V

    goto :goto_0

    .line 81
    :cond_0
    iget-object p4, p0, Lcom/moji/appwidget/image/CAWFaceDrawer4X2;->c:Lcom/moji/appwidget/image/ImageRemoteViews;

    sget p5, Lcom/moji/appwidget/R$id;->backgroundLayer:I

    invoke-virtual {p4, p5, v0}, Lcom/moji/appwidget/image/ImageRemoteViews;->setViewVisibility(II)V

    .line 83
    :try_start_0
    new-instance p4, Ljava/io/File;

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

    move-result-object p5

    const-string v0, "widget_4X2_bkg"

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

    .line 84
    invoke-virtual {p0, p4}, Lcom/moji/appwidget/image/CAWFaceDrawer4X2;->a(Ljava/io/File;)V

    if-eqz p3, :cond_2

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

    move-result p5

    if-eqz p5, :cond_2

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

    move-result-object p1

    invoke-virtual {p1, p4}, 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

    const/4 p4, 0x0

    .line 87
    invoke-virtual {p0, p2, p1, p3, p4}, Lcom/moji/appwidget/image/CAWFaceDrawer4X2;->a(Landroid/graphics/Canvas;Landroid/graphics/Bitmap;Lcom/moji/appwidget/skin/SkinInfo$DrawPicture;Landroid/graphics/Paint;)V
    :try_end_0
    .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    :catch_0
    move-exception p1

    const-string p2, "CAWFaceDrawer4X2"

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

    goto :goto_0

    .line 94
    :cond_1
    iget-object p1, p0, Lcom/moji/appwidget/image/CAWFaceDrawer4X2;->c:Lcom/moji/appwidget/image/ImageRemoteViews;

    sget p2, Lcom/moji/appwidget/R$id;->backgroundLayer:I

    invoke-virtual {p1, p2, v0}, Lcom/moji/appwidget/image/ImageRemoteViews;->setViewVisibility(II)V

    :cond_2
    :goto_0
    return-void
.end method

.method protected b(Landroid/content/Context;Landroid/graphics/Canvas;Lcom/moji/appwidget/skin/SkinInfo$DrawPicture;)V
    .locals 3

    .line 53
    :try_start_0
    new-instance v0, Ljava/io/File;

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

    move-result-object v1

    const-string v2, "widget_4X2_location"

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

    .line 54
    invoke-virtual {p0, v0}, Lcom/moji/appwidget/image/CAWFaceDrawer4X2;->a(Ljava/io/File;)V

    .line 55
    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

    const/4 v0, 0x0

    .line 56
    invoke-virtual {p0, p2, p1, p3, v0}, Lcom/moji/appwidget/image/CAWFaceDrawer4X2;->a(Landroid/graphics/Canvas;Landroid/graphics/Bitmap;Lcom/moji/appwidget/skin/SkinInfo$DrawPicture;Landroid/graphics/Paint;)V
    :try_end_0
    .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    :catch_0
    move-exception p1

    const-string p2, "CAWFaceDrawer4X2"

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

    :goto_0
    return-void
.end method

.method protected c(Landroid/content/Context;Landroid/graphics/Canvas;Lcom/moji/appwidget/skin/SkinInfo$DrawPicture;)V
    .locals 3

    .line 65
    :try_start_0
    new-instance v0, Ljava/io/File;

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

    move-result-object v1

    const-string v2, "widget_4X2_refresh"

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

    .line 66
    invoke-virtual {p0, v0}, Lcom/moji/appwidget/image/CAWFaceDrawer4X2;->a(Ljava/io/File;)V

    .line 67
    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

    const/4 v0, 0x0

    .line 68
    invoke-virtual {p0, p2, p1, p3, v0}, Lcom/moji/appwidget/image/CAWFaceDrawer4X2;->a(Landroid/graphics/Canvas;Landroid/graphics/Bitmap;Lcom/moji/appwidget/skin/SkinInfo$DrawPicture;Landroid/graphics/Paint;)V
    :try_end_0
    .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    :catch_0
    move-exception p1

    const-string p2, "CAWFaceDrawer4X2"

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

    :goto_0
    return-void
.end method
