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


# instance fields
.field protected a:Lcom/moji/appwidget/skin/SkinInfo;

.field protected b:Landroid/graphics/Bitmap;

.field protected c:Lcom/moji/appwidget/image/ImageRemoteViews;

.field private d:Ljava/lang/Object;


# direct methods
.method protected constructor <init>(Lcom/moji/appwidget/image/ImageRemoteViews;)V
    .locals 1

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

    .line 43
    new-instance v0, Ljava/lang/Object;

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

    iput-object v0, p0, Lcom/moji/appwidget/image/AWFaceDrawer;->d:Ljava/lang/Object;

    .line 46
    iput-object p1, p0, Lcom/moji/appwidget/image/AWFaceDrawer;->c:Lcom/moji/appwidget/image/ImageRemoteViews;

    return-void
.end method

.method private a(Landroid/content/Context;Ljava/lang/String;)Landroid/graphics/Bitmap;
    .locals 4
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    .line 244
    invoke-virtual {p2}, Ljava/lang/String;->toLowerCase()Ljava/lang/String;

    move-result-object p2

    const-string v0, ".png"

    const-string v1, ""

    invoke-virtual {p2, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;

    move-result-object p2

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

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

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

    move-result v1

    if-nez v1, :cond_0

    .line 247
    new-instance v1, Ljava/io/File;

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

    move-result-object v2

    new-instance v3, Ljava/lang/StringBuilder;

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

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

    const-string p2, ".png"

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

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

    move-result-object p2

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

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

    move-result p2

    if-eqz p2, :cond_0

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

    move-result-object p2

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

    move-result-object v1

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

    move-result v1

    if-eqz v1, :cond_0

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

    .line 255
    :cond_0
    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

    return-object p1
.end method

.method private a(Landroid/content/Context;Landroid/graphics/Canvas;Lcom/moji/appwidget/skin/SkinInfo$DrawPicture;Z)V
    .locals 1

    .line 200
    new-instance v0, Lcom/moji/appwidget/image/AWColonDrawable;

    invoke-direct {v0}, Lcom/moji/appwidget/image/AWColonDrawable;-><init>()V

    .line 202
    :try_start_0
    invoke-virtual {v0, p1, p4}, Lcom/moji/appwidget/image/AWColonDrawable;->a(Landroid/content/Context;Z)Landroid/graphics/Bitmap;

    move-result-object p1

    const/4 p4, 0x0

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

    goto :goto_0

    :catch_0
    move-exception p1

    const-string p2, "AWFaceDrawer"

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

    :goto_0
    return-void
.end method

.method private a(Landroid/graphics/Canvas;Landroid/graphics/Paint;Lcom/moji/appwidget/skin/SkinInfo$DrawText;Ljava/lang/String;)V
    .locals 2

    const-string v0, "Vertical"

    .line 299
    iget-object v1, p3, Lcom/moji/appwidget/skin/SkinInfo$DrawText;->mDirection:Ljava/lang/String;

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_0

    .line 300
    invoke-direct {p0, p1, p2, p3, p4}, Lcom/moji/appwidget/image/AWFaceDrawer;->d(Landroid/graphics/Canvas;Landroid/graphics/Paint;Lcom/moji/appwidget/skin/SkinInfo$DrawText;Ljava/lang/String;)V

    goto :goto_0

    .line 301
    :cond_0
    iget-object v0, p3, Lcom/moji/appwidget/skin/SkinInfo$DrawText;->mRotate:Ljava/lang/String;

    invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v0

    if-nez v0, :cond_1

    .line 302
    invoke-direct {p0, p1, p2, p3, p4}, Lcom/moji/appwidget/image/AWFaceDrawer;->c(Landroid/graphics/Canvas;Landroid/graphics/Paint;Lcom/moji/appwidget/skin/SkinInfo$DrawText;Ljava/lang/String;)V

    goto :goto_0

    .line 304
    :cond_1
    invoke-direct {p0, p1, p2, p3, p4}, Lcom/moji/appwidget/image/AWFaceDrawer;->b(Landroid/graphics/Canvas;Landroid/graphics/Paint;Lcom/moji/appwidget/skin/SkinInfo$DrawText;Ljava/lang/String;)V

    :goto_0
    return-void
.end method

.method private b()Landroid/graphics/Bitmap;
    .locals 3

    .line 77
    iget-object v0, p0, Lcom/moji/appwidget/image/AWFaceDrawer;->b:Landroid/graphics/Bitmap;

    if-eqz v0, :cond_1

    iget-object v0, p0, Lcom/moji/appwidget/image/AWFaceDrawer;->b:Landroid/graphics/Bitmap;

    invoke-virtual {v0}, Landroid/graphics/Bitmap;->isRecycled()Z

    move-result v0

    if-nez v0, :cond_1

    iget-object v0, p0, Lcom/moji/appwidget/image/AWFaceDrawer;->b:Landroid/graphics/Bitmap;

    invoke-virtual {v0}, Landroid/graphics/Bitmap;->getWidth()I

    move-result v0

    iget-object v1, p0, Lcom/moji/appwidget/image/AWFaceDrawer;->a:Lcom/moji/appwidget/skin/SkinInfo;

    iget v1, v1, Lcom/moji/appwidget/skin/SkinInfo;->canvasWidth:I

    if-ne v0, v1, :cond_1

    iget-object v0, p0, Lcom/moji/appwidget/image/AWFaceDrawer;->b:Landroid/graphics/Bitmap;

    invoke-virtual {v0}, Landroid/graphics/Bitmap;->getHeight()I

    move-result v0

    iget-object v1, p0, Lcom/moji/appwidget/image/AWFaceDrawer;->a:Lcom/moji/appwidget/skin/SkinInfo;

    iget v1, v1, Lcom/moji/appwidget/skin/SkinInfo;->canvasHeight:I

    if-eq v0, v1, :cond_0

    goto :goto_0

    .line 85
    :cond_0
    iget-object v0, p0, Lcom/moji/appwidget/image/AWFaceDrawer;->b:Landroid/graphics/Bitmap;

    const/4 v1, 0x0

    invoke-static {v1, v1, v1, v1}, Landroid/graphics/Color;->argb(IIII)I

    move-result v1

    invoke-virtual {v0, v1}, Landroid/graphics/Bitmap;->eraseColor(I)V

    goto :goto_1

    .line 78
    :cond_1
    :goto_0
    iget-object v0, p0, Lcom/moji/appwidget/image/AWFaceDrawer;->b:Landroid/graphics/Bitmap;

    if-eqz v0, :cond_2

    iget-object v0, p0, Lcom/moji/appwidget/image/AWFaceDrawer;->b:Landroid/graphics/Bitmap;

    invoke-virtual {v0}, Landroid/graphics/Bitmap;->isRecycled()Z

    move-result v0

    if-nez v0, :cond_2

    .line 79
    iget-object v0, p0, Lcom/moji/appwidget/image/AWFaceDrawer;->b:Landroid/graphics/Bitmap;

    invoke-virtual {v0}, Landroid/graphics/Bitmap;->recycle()V

    const/4 v0, 0x0

    .line 81
    iput-object v0, p0, Lcom/moji/appwidget/image/AWFaceDrawer;->b:Landroid/graphics/Bitmap;

    .line 83
    :cond_2
    iget-object v0, p0, Lcom/moji/appwidget/image/AWFaceDrawer;->a:Lcom/moji/appwidget/skin/SkinInfo;

    iget v0, v0, Lcom/moji/appwidget/skin/SkinInfo;->canvasWidth:I

    iget-object v1, p0, Lcom/moji/appwidget/image/AWFaceDrawer;->a:Lcom/moji/appwidget/skin/SkinInfo;

    iget v1, v1, Lcom/moji/appwidget/skin/SkinInfo;->canvasHeight:I

    sget-object v2, Landroid/graphics/Bitmap$Config;->ARGB_8888:Landroid/graphics/Bitmap$Config;

    invoke-static {v0, v1, v2}, Landroid/graphics/Bitmap;->createBitmap(IILandroid/graphics/Bitmap$Config;)Landroid/graphics/Bitmap;

    move-result-object v0

    iput-object v0, p0, Lcom/moji/appwidget/image/AWFaceDrawer;->b:Landroid/graphics/Bitmap;

    .line 87
    :goto_1
    iget-object v0, p0, Lcom/moji/appwidget/image/AWFaceDrawer;->b:Landroid/graphics/Bitmap;

    return-object v0
.end method

.method private b(Landroid/graphics/Canvas;Landroid/graphics/Paint;Lcom/moji/appwidget/skin/SkinInfo$DrawText;Ljava/lang/String;)V
    .locals 2

    .line 309
    iget v0, p3, Lcom/moji/appwidget/skin/SkinInfo$DrawText;->mX:I

    iget v1, p3, Lcom/moji/appwidget/skin/SkinInfo$DrawText;->mShadowOffsetX:I

    add-int/2addr v0, v1

    int-to-float v0, v0

    iget v1, p3, Lcom/moji/appwidget/skin/SkinInfo$DrawText;->mY:I

    iget p3, p3, Lcom/moji/appwidget/skin/SkinInfo$DrawText;->mShadowOffsetY:I

    add-int/2addr v1, p3

    int-to-float p3, v1

    invoke-virtual {p1, p4, v0, p3, p2}, Landroid/graphics/Canvas;->drawText(Ljava/lang/String;FFLandroid/graphics/Paint;)V

    return-void
.end method

.method private c(Landroid/graphics/Canvas;Landroid/graphics/Paint;Lcom/moji/appwidget/skin/SkinInfo$DrawText;Ljava/lang/String;)V
    .locals 4

    .line 315
    :try_start_0
    iget-object v0, p3, Lcom/moji/appwidget/skin/SkinInfo$DrawText;->mRotate:Ljava/lang/String;

    invoke-static {v0}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I

    move-result v0
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    :catch_0
    const-string v0, "AWFaceDrawer"

    const-string v1, "rotate to int error"

    .line 317
    invoke-static {v0, v1}, Lcom/moji/tool/log/MJLogger;->e(Ljava/lang/String;Ljava/lang/String;)V

    const/4 v0, 0x0

    :goto_0
    int-to-float v1, v0

    .line 319
    iget v2, p3, Lcom/moji/appwidget/skin/SkinInfo$DrawText;->mX:I

    int-to-float v2, v2

    iget v3, p3, Lcom/moji/appwidget/skin/SkinInfo$DrawText;->mY:I

    int-to-float v3, v3

    invoke-virtual {p1, v1, v2, v3}, Landroid/graphics/Canvas;->rotate(FFF)V

    .line 320
    iget v1, p3, Lcom/moji/appwidget/skin/SkinInfo$DrawText;->mX:I

    iget v2, p3, Lcom/moji/appwidget/skin/SkinInfo$DrawText;->mShadowOffsetX:I

    add-int/2addr v1, v2

    int-to-float v1, v1

    iget v2, p3, Lcom/moji/appwidget/skin/SkinInfo$DrawText;->mY:I

    iget v3, p3, Lcom/moji/appwidget/skin/SkinInfo$DrawText;->mShadowOffsetY:I

    add-int/2addr v2, v3

    int-to-float v2, v2

    invoke-virtual {p1, p4, v1, v2, p2}, Landroid/graphics/Canvas;->drawText(Ljava/lang/String;FFLandroid/graphics/Paint;)V

    neg-int p2, v0

    int-to-float p2, p2

    .line 321
    iget p4, p3, Lcom/moji/appwidget/skin/SkinInfo$DrawText;->mX:I

    int-to-float p4, p4

    iget p3, p3, Lcom/moji/appwidget/skin/SkinInfo$DrawText;->mY:I

    int-to-float p3, p3

    invoke-virtual {p1, p2, p4, p3}, Landroid/graphics/Canvas;->rotate(FFF)V

    return-void
.end method

.method private d(Landroid/graphics/Canvas;Landroid/graphics/Paint;Lcom/moji/appwidget/skin/SkinInfo$DrawText;Ljava/lang/String;)V
    .locals 8

    .line 326
    new-instance v2, Landroid/text/TextPaint;

    invoke-direct {v2, p2}, Landroid/text/TextPaint;-><init>(Landroid/graphics/Paint;)V

    .line 327
    sget-object p2, Landroid/graphics/Paint$Align;->CENTER:Landroid/graphics/Paint$Align;

    invoke-virtual {v2, p2}, Landroid/text/TextPaint;->setTextAlign(Landroid/graphics/Paint$Align;)V

    .line 328
    sget-object p2, Landroid/text/Layout$Alignment;->ALIGN_NORMAL:Landroid/text/Layout$Alignment;

    .line 329
    sget-object v0, Lcom/moji/appwidget/image/AWFaceDrawer$1;->b:[I

    iget-object v1, p3, Lcom/moji/appwidget/skin/SkinInfo$DrawText;->mAlign:Landroid/graphics/Paint$Align;

    invoke-virtual {v1}, Landroid/graphics/Paint$Align;->ordinal()I

    move-result v1

    aget v0, v0, v1

    packed-switch v0, :pswitch_data_0

    :goto_0
    move-object v4, p2

    goto :goto_1

    .line 334
    :pswitch_0
    sget-object p2, Landroid/text/Layout$Alignment;->ALIGN_CENTER:Landroid/text/Layout$Alignment;

    goto :goto_0

    .line 331
    :pswitch_1
    sget-object p2, Landroid/text/Layout$Alignment;->ALIGN_OPPOSITE:Landroid/text/Layout$Alignment;

    goto :goto_0

    .line 337
    :goto_1
    new-instance p2, Landroid/text/StaticLayout;

    const-string v0, "1"

    invoke-virtual {p0, v2, v0}, Lcom/moji/appwidget/image/AWFaceDrawer;->a(Landroid/graphics/Paint;Ljava/lang/String;)I

    move-result v3

    const/high16 v5, 0x3f800000    # 1.0f

    const/4 v6, 0x0

    const/4 v7, 0x1

    move-object v0, p2

    move-object v1, p4

    invoke-direct/range {v0 .. v7}, Landroid/text/StaticLayout;-><init>(Ljava/lang/CharSequence;Landroid/text/TextPaint;ILandroid/text/Layout$Alignment;FFZ)V

    .line 338
    iget p4, p3, Lcom/moji/appwidget/skin/SkinInfo$DrawText;->mX:I

    iget v0, p3, Lcom/moji/appwidget/skin/SkinInfo$DrawText;->mShadowOffsetX:I

    add-int/2addr p4, v0

    int-to-float p4, p4

    iget v0, p3, Lcom/moji/appwidget/skin/SkinInfo$DrawText;->mY:I

    iget v1, p3, Lcom/moji/appwidget/skin/SkinInfo$DrawText;->mShadowOffsetY:I

    add-int/2addr v0, v1

    int-to-float v0, v0

    invoke-virtual {p1, p4, v0}, Landroid/graphics/Canvas;->translate(FF)V

    .line 339
    invoke-virtual {p2, p1}, Landroid/text/StaticLayout;->draw(Landroid/graphics/Canvas;)V

    .line 340
    iget p2, p3, Lcom/moji/appwidget/skin/SkinInfo$DrawText;->mX:I

    iget p4, p3, Lcom/moji/appwidget/skin/SkinInfo$DrawText;->mShadowOffsetX:I

    add-int/2addr p2, p4

    neg-int p2, p2

    int-to-float p2, p2

    iget p4, p3, Lcom/moji/appwidget/skin/SkinInfo$DrawText;->mY:I

    iget p3, p3, Lcom/moji/appwidget/skin/SkinInfo$DrawText;->mShadowOffsetY:I

    add-int/2addr p4, p3

    neg-int p3, p4

    int-to-float p3, p3

    invoke-virtual {p1, p2, p3}, Landroid/graphics/Canvas;->translate(FF)V

    return-void

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


# virtual methods
.method public a(Landroid/graphics/Paint;Ljava/lang/String;)I
    .locals 5

    const/4 v0, 0x0

    if-eqz p2, :cond_0

    .line 383
    invoke-virtual {p2}, Ljava/lang/String;->length()I

    move-result v1

    if-lez v1, :cond_0

    .line 384
    invoke-virtual {p2}, Ljava/lang/String;->length()I

    move-result v1

    .line 385
    new-array v2, v1, [F

    .line 386
    invoke-virtual {p1, p2, v2}, Landroid/graphics/Paint;->getTextWidths(Ljava/lang/String;[F)I

    const/4 p1, 0x0

    :goto_0
    if-ge v0, v1, :cond_1

    .line 388
    aget p2, v2, v0

    float-to-double v3, p2

    invoke-static {v3, v4}, Ljava/lang/Math;->ceil(D)D

    move-result-wide v3

    double-to-int p2, v3

    add-int/2addr p1, p2

    add-int/lit8 v0, v0, 0x1

    goto :goto_0

    :cond_0
    const/4 p1, 0x0

    :cond_1
    return p1
.end method

.method public a()Lcom/moji/appwidget/core/MJRemoteViews;
    .locals 1

    .line 374
    iget-object v0, p0, Lcom/moji/appwidget/image/AWFaceDrawer;->c:Lcom/moji/appwidget/image/ImageRemoteViews;

    return-object v0
.end method

.method protected a(Landroid/content/Context;)V
    .locals 4

    .line 91
    iget-object v0, p0, Lcom/moji/appwidget/image/AWFaceDrawer;->d:Ljava/lang/Object;

    monitor-enter v0

    .line 92
    :try_start_0
    new-instance v1, Lcom/moji/appwidget/WeatherRepeater;

    invoke-direct {v1}, Lcom/moji/appwidget/WeatherRepeater;-><init>()V

    .line 93
    invoke-virtual {v1}, Lcom/moji/appwidget/WeatherRepeater;->a()Lcom/moji/weatherprovider/data/Weather;

    move-result-object v1

    .line 94
    invoke-virtual {p0, p1, v1}, Lcom/moji/appwidget/image/AWFaceDrawer;->a(Landroid/content/Context;Lcom/moji/weatherprovider/data/Weather;)Z

    move-result v2

    if-eqz v2, :cond_2

    const-string v2, "AWFaceDrawer"

    const-string v3, "updateView:"

    .line 95
    invoke-static {v2, v3}, Lcom/moji/tool/log/MJLogger;->c(Ljava/lang/String;Ljava/lang/String;)V

    .line 96
    iget-object v2, p0, Lcom/moji/appwidget/image/AWFaceDrawer;->b:Landroid/graphics/Bitmap;

    if-eqz v2, :cond_0

    iget-object v2, p0, Lcom/moji/appwidget/image/AWFaceDrawer;->b:Landroid/graphics/Bitmap;

    invoke-virtual {v2}, Landroid/graphics/Bitmap;->isRecycled()Z

    move-result v2

    if-eqz v2, :cond_1

    .line 97
    :cond_0
    invoke-direct {p0}, Lcom/moji/appwidget/image/AWFaceDrawer;->b()Landroid/graphics/Bitmap;

    move-result-object v2

    iput-object v2, p0, Lcom/moji/appwidget/image/AWFaceDrawer;->b:Landroid/graphics/Bitmap;

    .line 99
    :cond_1
    new-instance v2, Landroid/graphics/Canvas;

    iget-object v3, p0, Lcom/moji/appwidget/image/AWFaceDrawer;->b:Landroid/graphics/Bitmap;

    invoke-direct {v2, v3}, Landroid/graphics/Canvas;-><init>(Landroid/graphics/Bitmap;)V

    .line 100
    iget-object v3, p0, Lcom/moji/appwidget/image/AWFaceDrawer;->a:Lcom/moji/appwidget/skin/SkinInfo;

    invoke-virtual {p0, v3, p1, v2, v1}, Lcom/moji/appwidget/image/AWFaceDrawer;->a(Lcom/moji/appwidget/skin/SkinInfo;Landroid/content/Context;Landroid/graphics/Canvas;Lcom/moji/weatherprovider/data/Weather;)V

    .line 101
    iget-object v3, p0, Lcom/moji/appwidget/image/AWFaceDrawer;->a:Lcom/moji/appwidget/skin/SkinInfo;

    invoke-virtual {p0, v3, p1, v2, v1}, Lcom/moji/appwidget/image/AWFaceDrawer;->b(Lcom/moji/appwidget/skin/SkinInfo;Landroid/content/Context;Landroid/graphics/Canvas;Lcom/moji/weatherprovider/data/Weather;)V

    .line 102
    iget-object v1, p0, Lcom/moji/appwidget/image/AWFaceDrawer;->b:Landroid/graphics/Bitmap;

    invoke-virtual {p0, p1, v1}, Lcom/moji/appwidget/image/AWFaceDrawer;->a(Landroid/content/Context;Landroid/graphics/Bitmap;)V

    .line 103
    iget-object p1, p0, Lcom/moji/appwidget/image/AWFaceDrawer;->b:Landroid/graphics/Bitmap;

    const/4 v1, 0x0

    invoke-static {v1, v1, v1, v1}, Landroid/graphics/Color;->argb(IIII)I

    move-result v1

    invoke-virtual {p1, v1}, Landroid/graphics/Bitmap;->eraseColor(I)V

    .line 105
    :cond_2
    monitor-exit v0

    return-void

    :catchall_0
    move-exception p1

    monitor-exit v0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    throw p1
.end method

.method protected a(Landroid/content/Context;Landroid/graphics/Bitmap;)V
    .locals 3

    const/4 v0, 0x0

    .line 351
    :try_start_0
    sget v1, Landroid/os/Build$VERSION;->SDK_INT:I

    const/16 v2, 0x18

    if-ge v1, v2, :cond_0

    const-string v1, "AWFaceDrawer"

    const-string v2, "blow Android 7.0 using MODE_WORLD_READABLE"

    .line 352
    invoke-static {v1, v2}, Lcom/moji/tool/log/MJLogger;->b(Ljava/lang/String;Ljava/lang/String;)V

    .line 353
    iget-object v1, p0, Lcom/moji/appwidget/image/AWFaceDrawer;->c:Lcom/moji/appwidget/image/ImageRemoteViews;

    invoke-virtual {v1}, Lcom/moji/appwidget/image/ImageRemoteViews;->facePictureName()Ljava/lang/String;

    move-result-object v1

    const/4 v2, 0x1

    invoke-virtual {p1, v1, v2}, Landroid/content/Context;->openFileOutput(Ljava/lang/String;I)Ljava/io/FileOutputStream;

    move-result-object p1

    :goto_0
    move-object v0, p1

    goto :goto_1

    :cond_0
    const-string v1, "AWFaceDrawer"

    const-string v2, "above Android 7.0 using FileProvider"

    .line 355
    invoke-static {v1, v2}, Lcom/moji/tool/log/MJLogger;->b(Ljava/lang/String;Ljava/lang/String;)V

    .line 356
    iget-object v1, p0, Lcom/moji/appwidget/image/AWFaceDrawer;->c:Lcom/moji/appwidget/image/ImageRemoteViews;

    invoke-virtual {v1}, Lcom/moji/appwidget/image/ImageRemoteViews;->facePictureName()Ljava/lang/String;

    move-result-object v1

    const/4 v2, 0x0

    invoke-virtual {p1, v1, v2}, Landroid/content/Context;->openFileOutput(Ljava/lang/String;I)Ljava/io/FileOutputStream;

    move-result-object p1

    goto :goto_0

    :goto_1
    if-eqz p2, :cond_1

    .line 358
    sget-object p1, Landroid/graphics/Bitmap$CompressFormat;->PNG:Landroid/graphics/Bitmap$CompressFormat;

    const/16 v1, 0x50

    invoke-virtual {p2, p1, v1, v0}, Landroid/graphics/Bitmap;->compress(Landroid/graphics/Bitmap$CompressFormat;ILjava/io/OutputStream;)Z

    move-result p1

    if-eqz p1, :cond_1

    .line 359
    invoke-virtual {v0}, Ljava/io/FileOutputStream;->flush()V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    :cond_1
    if-eqz v0, :cond_2

    .line 366
    :goto_2
    :try_start_1
    invoke-virtual {v0}, Ljava/io/FileOutputStream;->close()V
    :try_end_1
    .catch Ljava/io/IOException; {:try_start_1 .. :try_end_1} :catch_1

    goto :goto_3

    :catchall_0
    move-exception p1

    goto :goto_4

    :catch_0
    move-exception p1

    :try_start_2
    const-string p2, "AWFaceDrawer"

    .line 362
    invoke-static {p2, p1}, Lcom/moji/tool/log/MJLogger;->a(Ljava/lang/String;Ljava/lang/Throwable;)V
    :try_end_2
    .catchall {:try_start_2 .. :try_end_2} :catchall_0

    if-eqz v0, :cond_2

    goto :goto_2

    :catch_1
    :cond_2
    :goto_3
    return-void

    :goto_4
    if-eqz v0, :cond_3

    .line 366
    :try_start_3
    invoke-virtual {v0}, Ljava/io/FileOutputStream;->close()V
    :try_end_3
    .catch Ljava/io/IOException; {:try_start_3 .. :try_end_3} :catch_2

    .line 370
    :catch_2
    :cond_3
    throw p1
.end method

.method protected abstract a(Landroid/content/Context;Landroid/graphics/Canvas;Lcom/moji/appwidget/skin/SkinInfo$DrawPicture;)V
.end method

.method protected abstract a(Landroid/content/Context;Landroid/graphics/Canvas;Lcom/moji/appwidget/skin/SkinInfo$DrawPicture;Lcom/moji/appwidget/image/TimeInfo;)V
.end method

.method protected abstract a(Landroid/content/Context;Landroid/graphics/Canvas;Lcom/moji/appwidget/skin/SkinInfo$DrawPicture;ZLcom/moji/weatherprovider/data/Weather;)V
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/lang/Exception;
        }
    .end annotation
.end method

.method protected a(Landroid/graphics/Canvas;Landroid/graphics/Bitmap;Lcom/moji/appwidget/skin/SkinInfo$DrawPicture;Landroid/graphics/Paint;)V
    .locals 4

    .line 229
    invoke-virtual {p2}, Landroid/graphics/Bitmap;->getWidth()I

    move-result v0

    iget v1, p3, Lcom/moji/appwidget/skin/SkinInfo$DrawPicture;->mWidth:I

    if-ne v0, v1, :cond_0

    invoke-virtual {p2}, Landroid/graphics/Bitmap;->getHeight()I

    move-result v0

    iget v1, p3, Lcom/moji/appwidget/skin/SkinInfo$DrawPicture;->mHeight:I

    if-ne v0, v1, :cond_0

    .line 230
    iget v0, p3, Lcom/moji/appwidget/skin/SkinInfo$DrawPicture;->mX:I

    int-to-float v0, v0

    iget p3, p3, Lcom/moji/appwidget/skin/SkinInfo$DrawPicture;->mY:I

    int-to-float p3, p3

    invoke-virtual {p1, p2, v0, p3, p4}, Landroid/graphics/Canvas;->drawBitmap(Landroid/graphics/Bitmap;FFLandroid/graphics/Paint;)V

    goto :goto_0

    .line 232
    :cond_0
    new-instance v0, Landroid/graphics/Matrix;

    invoke-direct {v0}, Landroid/graphics/Matrix;-><init>()V

    .line 233
    iget v1, p3, Lcom/moji/appwidget/skin/SkinInfo$DrawPicture;->mWidth:I

    int-to-float v1, v1

    invoke-virtual {p2}, Landroid/graphics/Bitmap;->getWidth()I

    move-result v2

    int-to-float v2, v2

    div-float/2addr v1, v2

    iget v2, p3, Lcom/moji/appwidget/skin/SkinInfo$DrawPicture;->mHeight:I

    int-to-float v2, v2

    invoke-virtual {p2}, Landroid/graphics/Bitmap;->getHeight()I

    move-result v3

    int-to-float v3, v3

    div-float/2addr v2, v3

    invoke-virtual {v0, v1, v2}, Landroid/graphics/Matrix;->postScale(FF)Z

    .line 234
    iget v1, p3, Lcom/moji/appwidget/skin/SkinInfo$DrawPicture;->mX:I

    int-to-float v1, v1

    iget p3, p3, Lcom/moji/appwidget/skin/SkinInfo$DrawPicture;->mY:I

    int-to-float p3, p3

    invoke-virtual {v0, v1, p3}, Landroid/graphics/Matrix;->postTranslate(FF)Z

    .line 235
    new-instance p3, Landroid/graphics/PaintFlagsDrawFilter;

    const/4 v1, 0x2

    const/4 v2, 0x0

    invoke-direct {p3, v2, v1}, Landroid/graphics/PaintFlagsDrawFilter;-><init>(II)V

    invoke-virtual {p1, p3}, Landroid/graphics/Canvas;->setDrawFilter(Landroid/graphics/DrawFilter;)V

    .line 236
    invoke-virtual {p1, p2, v0, p4}, Landroid/graphics/Canvas;->drawBitmap(Landroid/graphics/Bitmap;Landroid/graphics/Matrix;Landroid/graphics/Paint;)V

    .line 237
    new-instance p2, Landroid/graphics/PaintFlagsDrawFilter;

    invoke-direct {p2, v1, v2}, Landroid/graphics/PaintFlagsDrawFilter;-><init>(II)V

    invoke-virtual {p1, p2}, Landroid/graphics/Canvas;->setDrawFilter(Landroid/graphics/DrawFilter;)V

    :goto_0
    return-void
.end method

.method public a(Lcom/moji/appwidget/image/ImageRemoteViews;)V
    .locals 0

    .line 378
    iput-object p1, p0, Lcom/moji/appwidget/image/AWFaceDrawer;->c:Lcom/moji/appwidget/image/ImageRemoteViews;

    return-void
.end method

.method public a(Lcom/moji/appwidget/skin/SkinInfo;)V
    .locals 1

    .line 50
    iget-object v0, p0, Lcom/moji/appwidget/image/AWFaceDrawer;->d:Ljava/lang/Object;

    monitor-enter v0

    .line 51
    :try_start_0
    iput-object p1, p0, Lcom/moji/appwidget/image/AWFaceDrawer;->a:Lcom/moji/appwidget/skin/SkinInfo;

    .line 52
    iget-object p1, p0, Lcom/moji/appwidget/image/AWFaceDrawer;->a:Lcom/moji/appwidget/skin/SkinInfo;

    if-eqz p1, :cond_0

    .line 53
    invoke-direct {p0}, Lcom/moji/appwidget/image/AWFaceDrawer;->b()Landroid/graphics/Bitmap;

    move-result-object p1

    iput-object p1, p0, Lcom/moji/appwidget/image/AWFaceDrawer;->b:Landroid/graphics/Bitmap;

    .line 55
    :cond_0
    monitor-exit v0

    return-void

    :catchall_0
    move-exception p1

    monitor-exit v0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    throw p1
.end method

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

    .line 110
    :try_start_0
    iget-object v3, p1, Lcom/moji/appwidget/skin/SkinInfo;->mBackgroundPicture:Lcom/moji/appwidget/skin/SkinInfo$DrawPicture;

    iget-boolean v4, p1, Lcom/moji/appwidget/skin/SkinInfo;->useOrgBackground:Z

    move-object v0, p0

    move-object v1, p2

    move-object v2, p3

    move-object v5, p4

    invoke-virtual/range {v0 .. v5}, Lcom/moji/appwidget/image/AWFaceDrawer;->a(Landroid/content/Context;Landroid/graphics/Canvas;Lcom/moji/appwidget/skin/SkinInfo$DrawPicture;ZLcom/moji/weatherprovider/data/Weather;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    :catch_0
    move-exception v0

    const-string v1, "AWFaceDrawer"

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

    .line 114
    :goto_0
    iget-object v0, p1, Lcom/moji/appwidget/skin/SkinInfo;->mCustomPictureArr:Ljava/util/List;

    const/4 v1, 0x0

    const/4 v2, 0x0

    if-eqz v0, :cond_2

    .line 115
    invoke-interface {v0}, Ljava/util/List;->isEmpty()Z

    move-result v3

    if-nez v3, :cond_2

    const/4 v3, 0x0

    .line 116
    :goto_1
    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v4

    if-ge v3, v4, :cond_2

    .line 117
    invoke-interface {v0, v3}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v4

    check-cast v4, Lcom/moji/appwidget/skin/SkinInfo$DrawPicture;

    if-eqz v4, :cond_1

    .line 119
    sget-object v5, Lcom/moji/appwidget/image/AWFaceDrawer$1;->a:[I

    iget-object v6, v4, Lcom/moji/appwidget/skin/SkinInfo$DrawPicture;->mDrawType:Lcom/moji/appwidget/skin/SkinInfo$DrawPicture$DrawPictureType;

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

    move-result v6

    aget v5, v5, v6

    packed-switch v5, :pswitch_data_0

    .line 140
    iget-boolean v5, p1, Lcom/moji/appwidget/skin/SkinInfo;->useOrgWeatherIcon:Z

    if-eqz v5, :cond_0

    .line 141
    new-instance v5, Lcom/moji/appwidget/image/AWWeatherPicDrawable;

    invoke-direct {v5, v4}, Lcom/moji/appwidget/image/AWWeatherPicDrawable;-><init>(Lcom/moji/appwidget/skin/SkinInfo$DrawPicture;)V

    goto :goto_2

    .line 133
    :pswitch_0
    :try_start_1
    iget-object v5, v4, Lcom/moji/appwidget/skin/SkinInfo$DrawPicture;->mPictureName:Ljava/lang/String;

    invoke-direct {p0, p2, v5}, Lcom/moji/appwidget/image/AWFaceDrawer;->a(Landroid/content/Context;Ljava/lang/String;)Landroid/graphics/Bitmap;

    move-result-object v5

    .line 134
    invoke-virtual {p0, p3, v5, v4, v2}, Lcom/moji/appwidget/image/AWFaceDrawer;->a(Landroid/graphics/Canvas;Landroid/graphics/Bitmap;Lcom/moji/appwidget/skin/SkinInfo$DrawPicture;Landroid/graphics/Paint;)V
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_1

    goto :goto_3

    :catch_1
    move-exception v4

    const-string v5, "AWFaceDrawer"

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

    goto :goto_3

    .line 128
    :pswitch_1
    invoke-virtual {p0, p2, p3, v4}, Lcom/moji/appwidget/image/AWFaceDrawer;->a(Landroid/content/Context;Landroid/graphics/Canvas;Lcom/moji/appwidget/skin/SkinInfo$DrawPicture;)V

    goto :goto_3

    .line 124
    :pswitch_2
    invoke-virtual {p0, p2, p3, v4}, Lcom/moji/appwidget/image/AWFaceDrawer;->c(Landroid/content/Context;Landroid/graphics/Canvas;Lcom/moji/appwidget/skin/SkinInfo$DrawPicture;)V

    goto :goto_3

    .line 121
    :pswitch_3
    invoke-virtual {p0, p2, p3, v4}, Lcom/moji/appwidget/image/AWFaceDrawer;->b(Landroid/content/Context;Landroid/graphics/Canvas;Lcom/moji/appwidget/skin/SkinInfo$DrawPicture;)V

    goto :goto_3

    .line 143
    :goto_2
    :try_start_2
    invoke-virtual {v5, p2, p4}, Lcom/moji/appwidget/image/AWWeatherPicDrawable;->a(Landroid/content/Context;Lcom/moji/weatherprovider/data/Weather;)Landroid/graphics/Bitmap;

    move-result-object v5

    .line 144
    invoke-virtual {p0, p3, v5, v4, v2}, Lcom/moji/appwidget/image/AWFaceDrawer;->a(Landroid/graphics/Canvas;Landroid/graphics/Bitmap;Lcom/moji/appwidget/skin/SkinInfo$DrawPicture;Landroid/graphics/Paint;)V
    :try_end_2
    .catch Ljava/lang/Exception; {:try_start_2 .. :try_end_2} :catch_2

    goto :goto_3

    :catch_2
    move-exception v4

    const-string v5, "AWFaceDrawer"

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

    goto :goto_3

    .line 149
    :cond_0
    new-instance v5, Lcom/moji/appwidget/image/AWWeatherCustomPicture;

    invoke-direct {v5, v4}, Lcom/moji/appwidget/image/AWWeatherCustomPicture;-><init>(Lcom/moji/appwidget/skin/SkinInfo$DrawPicture;)V

    .line 151
    :try_start_3
    invoke-virtual {v5, p2, p4}, Lcom/moji/appwidget/image/AWWeatherCustomPicture;->a(Landroid/content/Context;Lcom/moji/weatherprovider/data/Weather;)Landroid/graphics/Bitmap;

    move-result-object v5

    .line 152
    invoke-virtual {p0, p3, v5, v4, v2}, Lcom/moji/appwidget/image/AWFaceDrawer;->a(Landroid/graphics/Canvas;Landroid/graphics/Bitmap;Lcom/moji/appwidget/skin/SkinInfo$DrawPicture;Landroid/graphics/Paint;)V
    :try_end_3
    .catch Ljava/lang/Exception; {:try_start_3 .. :try_end_3} :catch_3

    goto :goto_3

    :catch_3
    move-exception v4

    const-string v5, "AWFaceDrawer"

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

    :cond_1
    :goto_3
    add-int/lit8 v3, v3, 0x1

    goto :goto_1

    .line 163
    :cond_2
    new-instance p4, Lcom/moji/appwidget/image/TimeInfo;

    invoke-direct {p4}, Lcom/moji/appwidget/image/TimeInfo;-><init>()V

    .line 164
    iget-object v0, p1, Lcom/moji/appwidget/skin/SkinInfo;->mTimePictureArr:Ljava/util/List;

    if-eqz v0, :cond_4

    .line 165
    invoke-interface {v0}, Ljava/util/List;->isEmpty()Z

    move-result v3

    if-nez v3, :cond_4

    .line 166
    :goto_4
    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v3

    if-ge v1, v3, :cond_4

    .line 167
    invoke-interface {v0, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Lcom/moji/appwidget/skin/SkinInfo$DrawPicture;

    if-eqz v3, :cond_3

    .line 169
    sget-object v4, Lcom/moji/appwidget/image/AWFaceDrawer$1;->a:[I

    iget-object v5, v3, Lcom/moji/appwidget/skin/SkinInfo$DrawPicture;->mDrawType:Lcom/moji/appwidget/skin/SkinInfo$DrawPicture$DrawPictureType;

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

    move-result v5

    aget v4, v4, v5

    packed-switch v4, :pswitch_data_1

    goto :goto_5

    .line 188
    :pswitch_4
    iget-boolean v4, p4, Lcom/moji/appwidget/image/TimeInfo;->is24HourFormat:Z

    if-nez v4, :cond_3

    .line 190
    invoke-virtual {p0, p2, p3, v3, p4}, Lcom/moji/appwidget/image/AWFaceDrawer;->a(Landroid/content/Context;Landroid/graphics/Canvas;Lcom/moji/appwidget/skin/SkinInfo$DrawPicture;Lcom/moji/appwidget/image/TimeInfo;)V

    goto :goto_5

    .line 185
    :pswitch_5
    iget-boolean v4, p1, Lcom/moji/appwidget/skin/SkinInfo;->useOrgNumberIcon:Z

    invoke-direct {p0, p2, p3, v3, v4}, Lcom/moji/appwidget/image/AWFaceDrawer;->a(Landroid/content/Context;Landroid/graphics/Canvas;Lcom/moji/appwidget/skin/SkinInfo$DrawPicture;Z)V

    goto :goto_5

    .line 174
    :pswitch_6
    new-instance v4, Lcom/moji/appwidget/image/AWTimePicDrawable;

    iget-object v5, v3, Lcom/moji/appwidget/skin/SkinInfo$DrawPicture;->mDrawType:Lcom/moji/appwidget/skin/SkinInfo$DrawPicture$DrawPictureType;

    invoke-direct {v4, v5}, Lcom/moji/appwidget/image/AWTimePicDrawable;-><init>(Lcom/moji/appwidget/skin/SkinInfo$DrawPicture$DrawPictureType;)V

    .line 177
    :try_start_4
    iget-boolean v5, p1, Lcom/moji/appwidget/skin/SkinInfo;->useOrgNumberIcon:Z

    invoke-virtual {v4, p2, p4, v5}, Lcom/moji/appwidget/image/AWTimePicDrawable;->a(Landroid/content/Context;Lcom/moji/appwidget/image/TimeInfo;Z)Landroid/graphics/Bitmap;

    move-result-object v4

    .line 178
    invoke-virtual {p0, p3, v4, v3, v2}, Lcom/moji/appwidget/image/AWFaceDrawer;->a(Landroid/graphics/Canvas;Landroid/graphics/Bitmap;Lcom/moji/appwidget/skin/SkinInfo$DrawPicture;Landroid/graphics/Paint;)V
    :try_end_4
    .catch Ljava/lang/Exception; {:try_start_4 .. :try_end_4} :catch_4

    goto :goto_5

    :catch_4
    move-exception v3

    const-string v4, "AWFaceDrawer"

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

    :cond_3
    :goto_5
    add-int/lit8 v1, v1, 0x1

    goto :goto_4

    :cond_4
    return-void

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

    :pswitch_data_1
    .packed-switch 0x5
        :pswitch_6
        :pswitch_6
        :pswitch_6
        :pswitch_6
        :pswitch_5
        :pswitch_5
        :pswitch_4
    .end packed-switch
.end method

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

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

    move-result v0

    if-nez v0, :cond_0

    .line 219
    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 220
    invoke-virtual {v0}, Ljava/io/File;->exists()Z

    move-result v1

    if-eqz v1, :cond_0

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

    move-result-object v0

    .line 222
    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 223
    invoke-static {v0}, Lcom/moji/tool/FileTool;->d(Ljava/lang/String;)Z

    :cond_0
    return-void
.end method

.method protected a(Landroid/content/Context;Lcom/moji/weatherprovider/data/Weather;)Z
    .locals 2

    .line 60
    invoke-static {}, Lcom/moji/areamanagement/MJAreaManager;->a()Lcom/moji/common/area/AreaInfo;

    move-result-object v0

    const/4 v1, 0x0

    if-nez v0, :cond_0

    .line 63
    iget-object p2, p0, Lcom/moji/appwidget/image/AWFaceDrawer;->c:Lcom/moji/appwidget/image/ImageRemoteViews;

    sget v0, Lcom/moji/appwidget/R$string;->widget_add_city:I

    invoke-virtual {p1, v0}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object p1

    invoke-virtual {p2, p1}, Lcom/moji/appwidget/image/ImageRemoteViews;->showMessage(Ljava/lang/String;)V

    goto :goto_0

    :cond_0
    if-nez p2, :cond_1

    .line 66
    iget-object p2, p0, Lcom/moji/appwidget/image/AWFaceDrawer;->c:Lcom/moji/appwidget/image/ImageRemoteViews;

    sget v0, Lcom/moji/appwidget/R$string;->loading_skin_firsttime:I

    invoke-virtual {p1, v0}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object p1

    invoke-virtual {p2, p1}, Lcom/moji/appwidget/image/ImageRemoteViews;->showMessage(Ljava/lang/String;)V

    goto :goto_0

    .line 67
    :cond_1
    iget-object p2, p0, Lcom/moji/appwidget/image/AWFaceDrawer;->a:Lcom/moji/appwidget/skin/SkinInfo;

    if-nez p2, :cond_2

    .line 69
    iget-object p2, p0, Lcom/moji/appwidget/image/AWFaceDrawer;->c:Lcom/moji/appwidget/image/ImageRemoteViews;

    sget v0, Lcom/moji/appwidget/R$string;->skin_not_support:I

    invoke-virtual {p1, v0}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object p1

    invoke-virtual {p2, p1}, Lcom/moji/appwidget/image/ImageRemoteViews;->showMessage(Ljava/lang/String;)V

    goto :goto_0

    .line 71
    :cond_2
    iget-object p2, p0, Lcom/moji/appwidget/image/AWFaceDrawer;->c:Lcom/moji/appwidget/image/ImageRemoteViews;

    invoke-virtual {p2, p1}, Lcom/moji/appwidget/image/ImageRemoteViews;->showFace(Landroid/content/Context;)V

    const/4 v1, 0x1

    :goto_0
    return v1
.end method

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

.method protected b(Lcom/moji/appwidget/skin/SkinInfo;Landroid/content/Context;Landroid/graphics/Canvas;Lcom/moji/weatherprovider/data/Weather;)V
    .locals 9

    .line 259
    iget-object p1, p1, Lcom/moji/appwidget/skin/SkinInfo;->mDrawTextArr:Ljava/util/List;

    if-eqz p1, :cond_5

    .line 260
    invoke-interface {p1}, Ljava/util/List;->isEmpty()Z

    move-result v0

    if-eqz v0, :cond_0

    goto/16 :goto_1

    .line 263
    :cond_0
    invoke-interface {p1}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object p1

    :goto_0
    invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z

    move-result v0

    if-eqz v0, :cond_4

    invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/moji/appwidget/skin/SkinInfo$DrawText;

    .line 264
    new-instance v1, Lcom/moji/appwidget/image/AWTextDrawable;

    invoke-direct {v1, p2, p4, v0}, Lcom/moji/appwidget/image/AWTextDrawable;-><init>(Landroid/content/Context;Lcom/moji/weatherprovider/data/Weather;Lcom/moji/appwidget/skin/SkinInfo$DrawText;)V

    .line 265
    invoke-virtual {v1}, Lcom/moji/appwidget/image/AWTextDrawable;->a()Ljava/lang/String;

    move-result-object v1

    .line 266
    invoke-static {v1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v2

    if-eqz v2, :cond_1

    goto :goto_0

    .line 269
    :cond_1
    iget-boolean v2, v0, Lcom/moji/appwidget/skin/SkinInfo$DrawText;->mUseShadow:Z

    const/16 v3, 0xff

    const/4 v4, 0x0

    const/4 v5, 0x0

    if-eqz v2, :cond_2

    .line 270
    new-instance v2, Landroid/graphics/Paint;

    invoke-direct {v2}, Landroid/graphics/Paint;-><init>()V

    .line 271
    invoke-virtual {v2, v4}, Landroid/graphics/Paint;->setTextSkewX(F)V

    .line 272
    invoke-virtual {v2, v5}, Landroid/graphics/Paint;->setFakeBoldText(Z)V

    .line 273
    iget v6, v0, Lcom/moji/appwidget/skin/SkinInfo$DrawText;->mShadowColor:I

    invoke-static {v6}, Landroid/graphics/Color;->red(I)I

    move-result v6

    iget v7, v0, Lcom/moji/appwidget/skin/SkinInfo$DrawText;->mShadowColor:I

    invoke-static {v7}, Landroid/graphics/Color;->green(I)I

    move-result v7

    iget v8, v0, Lcom/moji/appwidget/skin/SkinInfo$DrawText;->mShadowColor:I

    invoke-static {v8}, Landroid/graphics/Color;->blue(I)I

    move-result v8

    invoke-static {v3, v6, v7, v8}, Landroid/graphics/Color;->argb(IIII)I

    move-result v6

    invoke-virtual {v2, v6}, Landroid/graphics/Paint;->setColor(I)V

    .line 274
    iget v6, v0, Lcom/moji/appwidget/skin/SkinInfo$DrawText;->mSize:I

    int-to-float v6, v6

    invoke-virtual {v2, v6}, Landroid/graphics/Paint;->setTextSize(F)V

    .line 275
    iget-object v6, v0, Lcom/moji/appwidget/skin/SkinInfo$DrawText;->mAlign:Landroid/graphics/Paint$Align;

    invoke-virtual {v2, v6}, Landroid/graphics/Paint;->setTextAlign(Landroid/graphics/Paint$Align;)V

    .line 276
    new-instance v6, Landroid/graphics/BlurMaskFilter;

    iget v7, v0, Lcom/moji/appwidget/skin/SkinInfo$DrawText;->mShadowBlurSize:I

    int-to-float v7, v7

    sget-object v8, Landroid/graphics/BlurMaskFilter$Blur;->NORMAL:Landroid/graphics/BlurMaskFilter$Blur;

    invoke-direct {v6, v7, v8}, Landroid/graphics/BlurMaskFilter;-><init>(FLandroid/graphics/BlurMaskFilter$Blur;)V

    .line 277
    invoke-virtual {v2, v6}, Landroid/graphics/Paint;->setMaskFilter(Landroid/graphics/MaskFilter;)Landroid/graphics/MaskFilter;

    .line 278
    invoke-direct {p0, p3, v2, v0, v1}, Lcom/moji/appwidget/image/AWFaceDrawer;->a(Landroid/graphics/Canvas;Landroid/graphics/Paint;Lcom/moji/appwidget/skin/SkinInfo$DrawText;Ljava/lang/String;)V

    .line 280
    :cond_2
    new-instance v2, Landroid/graphics/Paint;

    invoke-direct {v2}, Landroid/graphics/Paint;-><init>()V

    const/4 v6, 0x1

    .line 281
    invoke-virtual {v2, v6}, Landroid/graphics/Paint;->setFlags(I)V

    .line 282
    invoke-virtual {v2, v6}, Landroid/graphics/Paint;->setAntiAlias(Z)V

    .line 283
    invoke-virtual {v2, v5}, Landroid/graphics/Paint;->setFakeBoldText(Z)V

    .line 284
    invoke-virtual {v2, v5}, Landroid/graphics/Paint;->setUnderlineText(Z)V

    .line 285
    invoke-virtual {v2, v4}, Landroid/graphics/Paint;->setTextSkewX(F)V

    .line 286
    iget v4, v0, Lcom/moji/appwidget/skin/SkinInfo$DrawText;->mSize:I

    int-to-float v4, v4

    invoke-virtual {v2, v4}, Landroid/graphics/Paint;->setTextSize(F)V

    .line 287
    iget-object v4, v0, Lcom/moji/appwidget/skin/SkinInfo$DrawText;->mAlign:Landroid/graphics/Paint$Align;

    invoke-virtual {v2, v4}, Landroid/graphics/Paint;->setTextAlign(Landroid/graphics/Paint$Align;)V

    .line 288
    iget-boolean v4, v0, Lcom/moji/appwidget/skin/SkinInfo$DrawText;->mBold:Z

    invoke-virtual {v2, v4}, Landroid/graphics/Paint;->setFakeBoldText(Z)V

    .line 289
    iget-boolean v4, v0, Lcom/moji/appwidget/skin/SkinInfo$DrawText;->mItalic:Z

    if-eqz v4, :cond_3

    const/high16 v4, -0x41800000    # -0.25f

    .line 290
    invoke-virtual {v2, v4}, Landroid/graphics/Paint;->setTextSkewX(F)V

    .line 292
    :cond_3
    iget-boolean v4, v0, Lcom/moji/appwidget/skin/SkinInfo$DrawText;->mUnderline:Z

    invoke-virtual {v2, v4}, Landroid/graphics/Paint;->setUnderlineText(Z)V

    .line 293
    iget v4, v0, Lcom/moji/appwidget/skin/SkinInfo$DrawText;->mColorHex:I

    invoke-static {v4}, Landroid/graphics/Color;->red(I)I

    move-result v4

    iget v5, v0, Lcom/moji/appwidget/skin/SkinInfo$DrawText;->mColorHex:I

    invoke-static {v5}, Landroid/graphics/Color;->green(I)I

    move-result v5

    iget v6, v0, Lcom/moji/appwidget/skin/SkinInfo$DrawText;->mColorHex:I

    invoke-static {v6}, Landroid/graphics/Color;->blue(I)I

    move-result v6

    invoke-static {v3, v4, v5, v6}, Landroid/graphics/Color;->argb(IIII)I

    move-result v3

    invoke-virtual {v2, v3}, Landroid/graphics/Paint;->setColor(I)V

    .line 294
    invoke-direct {p0, p3, v2, v0, v1}, Lcom/moji/appwidget/image/AWFaceDrawer;->a(Landroid/graphics/Canvas;Landroid/graphics/Paint;Lcom/moji/appwidget/skin/SkinInfo$DrawText;Ljava/lang/String;)V

    goto/16 :goto_0

    :cond_4
    return-void

    :cond_5
    :goto_1
    return-void
.end method

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