1414 lines
33 KiB
Smali
1414 lines
33 KiB
Smali
.class public Lcom/moji/tool/ImageUtils;
|
|
.super Ljava/lang/Object;
|
|
.source "ImageUtils.java"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lcom/moji/tool/ImageUtils$MyHander;,
|
|
Lcom/moji/tool/ImageUtils$RoundCornerTransform;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field public static a:I = 0x1
|
|
|
|
.field public static b:I = 0x2
|
|
|
|
.field public static c:I = 0x3
|
|
|
|
.field public static d:I = 0x4
|
|
|
|
.field private static e:Ljava/util/Random;
|
|
|
|
|
|
# direct methods
|
|
.method static constructor <clinit>()V
|
|
.locals 0
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>()V
|
|
.locals 0
|
|
|
|
.line 38
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static a()I
|
|
.locals 2
|
|
|
|
.line 232
|
|
sget-object v0, Lcom/moji/tool/ImageUtils;->e:Ljava/util/Random;
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
.line 233
|
|
new-instance v0, Ljava/util/Random;
|
|
|
|
invoke-direct {v0}, Ljava/util/Random;-><init>()V
|
|
|
|
sput-object v0, Lcom/moji/tool/ImageUtils;->e:Ljava/util/Random;
|
|
|
|
.line 235
|
|
:cond_0
|
|
sget-object v0, Lcom/moji/tool/ImageUtils;->e:Ljava/util/Random;
|
|
|
|
const/4 v1, 0x5
|
|
|
|
invoke-virtual {v0, v1}, Ljava/util/Random;->nextInt(I)I
|
|
|
|
move-result v0
|
|
|
|
packed-switch v0, :pswitch_data_0
|
|
|
|
.line 251
|
|
sget v0, Lcom/moji/tool/R$drawable;->waterfall_item_default_5:I
|
|
|
|
goto :goto_0
|
|
|
|
.line 248
|
|
:pswitch_0
|
|
sget v0, Lcom/moji/tool/R$drawable;->waterfall_item_default_4:I
|
|
|
|
goto :goto_0
|
|
|
|
.line 245
|
|
:pswitch_1
|
|
sget v0, Lcom/moji/tool/R$drawable;->waterfall_item_default_3:I
|
|
|
|
goto :goto_0
|
|
|
|
.line 242
|
|
:pswitch_2
|
|
sget v0, Lcom/moji/tool/R$drawable;->waterfall_item_default_2:I
|
|
|
|
goto :goto_0
|
|
|
|
.line 239
|
|
:pswitch_3
|
|
sget v0, Lcom/moji/tool/R$drawable;->waterfall_item_default_1:I
|
|
|
|
:goto_0
|
|
return v0
|
|
|
|
:pswitch_data_0
|
|
.packed-switch 0x0
|
|
:pswitch_3
|
|
:pswitch_2
|
|
:pswitch_1
|
|
:pswitch_0
|
|
.end packed-switch
|
|
.end method
|
|
|
|
.method public static a(Landroid/graphics/Bitmap;DD)Landroid/graphics/Bitmap;
|
|
.locals 9
|
|
|
|
.line 627
|
|
invoke-virtual {p0}, Landroid/graphics/Bitmap;->getWidth()I
|
|
|
|
move-result v0
|
|
|
|
int-to-float v0, v0
|
|
|
|
.line 628
|
|
invoke-virtual {p0}, Landroid/graphics/Bitmap;->getHeight()I
|
|
|
|
move-result v1
|
|
|
|
int-to-float v1, v1
|
|
|
|
.line 630
|
|
new-instance v7, Landroid/graphics/Matrix;
|
|
|
|
invoke-direct {v7}, Landroid/graphics/Matrix;-><init>()V
|
|
|
|
double-to-float p1, p1
|
|
|
|
div-float/2addr p1, v0
|
|
|
|
double-to-float p2, p3
|
|
|
|
div-float/2addr p2, v1
|
|
|
|
.line 635
|
|
invoke-virtual {v7, p1, p2}, Landroid/graphics/Matrix;->postScale(FF)Z
|
|
|
|
float-to-int v5, v0
|
|
|
|
float-to-int v6, v1
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/4 v4, 0x0
|
|
|
|
const/4 v8, 0x1
|
|
|
|
move-object v2, p0
|
|
|
|
.line 636
|
|
invoke-static/range {v2 .. v8}, Landroid/graphics/Bitmap;->createBitmap(Landroid/graphics/Bitmap;IIIILandroid/graphics/Matrix;Z)Landroid/graphics/Bitmap;
|
|
|
|
move-result-object p1
|
|
|
|
.line 638
|
|
invoke-virtual {p0}, Landroid/graphics/Bitmap;->recycle()V
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public static a(Landroid/graphics/Bitmap;Landroid/graphics/Bitmap;ILjava/lang/String;)Landroid/graphics/Bitmap;
|
|
.locals 1
|
|
|
|
const/4 p1, 0x0
|
|
|
|
if-nez p0, :cond_0
|
|
|
|
return-object p1
|
|
|
|
.line 408
|
|
:cond_0
|
|
invoke-virtual {p0}, Landroid/graphics/Bitmap;->getWidth()I
|
|
|
|
move-result v0
|
|
|
|
div-int/lit8 v0, v0, 0x3c
|
|
|
|
.line 409
|
|
sget v0, Lcom/moji/tool/ImageUtils;->a:I
|
|
|
|
if-ne p2, v0, :cond_1
|
|
|
|
.line 410
|
|
invoke-static {p0, p3}, Lcom/moji/tool/ImageUtils;->a(Landroid/graphics/Bitmap;Ljava/lang/String;)Landroid/graphics/Bitmap;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
|
|
.line 411
|
|
:cond_1
|
|
sget v0, Lcom/moji/tool/ImageUtils;->b:I
|
|
|
|
if-ne p2, v0, :cond_2
|
|
|
|
.line 412
|
|
invoke-static {p0, p3}, Lcom/moji/tool/ImageUtils;->a(Landroid/graphics/Bitmap;Ljava/lang/String;)Landroid/graphics/Bitmap;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
|
|
.line 413
|
|
:cond_2
|
|
sget v0, Lcom/moji/tool/ImageUtils;->c:I
|
|
|
|
if-ne p2, v0, :cond_3
|
|
|
|
.line 414
|
|
invoke-static {p0, p3}, Lcom/moji/tool/ImageUtils;->a(Landroid/graphics/Bitmap;Ljava/lang/String;)Landroid/graphics/Bitmap;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
|
|
.line 415
|
|
:cond_3
|
|
sget v0, Lcom/moji/tool/ImageUtils;->d:I
|
|
|
|
if-ne p2, v0, :cond_4
|
|
|
|
.line 416
|
|
invoke-static {p0, p3}, Lcom/moji/tool/ImageUtils;->a(Landroid/graphics/Bitmap;Ljava/lang/String;)Landroid/graphics/Bitmap;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
|
|
:cond_4
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public static a(Landroid/graphics/Bitmap;Landroid/graphics/Bitmap;Ljava/lang/String;)Landroid/graphics/Bitmap;
|
|
.locals 13
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p0, :cond_5
|
|
|
|
if-nez p2, :cond_0
|
|
|
|
goto/16 :goto_0
|
|
|
|
.line 573
|
|
:cond_0
|
|
invoke-virtual {p0}, Landroid/graphics/Bitmap;->getWidth()I
|
|
|
|
move-result v1
|
|
|
|
.line 574
|
|
invoke-virtual {p0}, Landroid/graphics/Bitmap;->getHeight()I
|
|
|
|
move-result v2
|
|
|
|
.line 576
|
|
invoke-virtual {p0}, Landroid/graphics/Bitmap;->getWidth()I
|
|
|
|
move-result v3
|
|
|
|
div-int/lit8 v3, v3, 0x46
|
|
|
|
.line 577
|
|
invoke-virtual {p0}, Landroid/graphics/Bitmap;->getWidth()I
|
|
|
|
move-result v4
|
|
|
|
div-int/lit8 v4, v4, 0x19
|
|
|
|
.line 578
|
|
div-int/lit8 v5, v1, 0x3c
|
|
|
|
.line 583
|
|
:try_start_0
|
|
sget-object v6, Landroid/graphics/Bitmap$Config;->RGB_565:Landroid/graphics/Bitmap$Config;
|
|
|
|
invoke-static {v1, v2, v6}, Landroid/graphics/Bitmap;->createBitmap(IILandroid/graphics/Bitmap$Config;)Landroid/graphics/Bitmap;
|
|
|
|
move-result-object v6
|
|
:try_end_0
|
|
.catch Ljava/lang/OutOfMemoryError; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
if-nez v6, :cond_1
|
|
|
|
return-object v0
|
|
|
|
.line 591
|
|
:cond_1
|
|
new-instance v7, Landroid/graphics/Canvas;
|
|
|
|
invoke-direct {v7, v6}, Landroid/graphics/Canvas;-><init>(Landroid/graphics/Bitmap;)V
|
|
|
|
const/4 v8, 0x0
|
|
|
|
.line 593
|
|
invoke-virtual {v7, p0, v8, v8, v0}, Landroid/graphics/Canvas;->drawBitmap(Landroid/graphics/Bitmap;FFLandroid/graphics/Paint;)V
|
|
|
|
.line 595
|
|
new-instance p0, Landroid/graphics/Paint;
|
|
|
|
invoke-direct {p0}, Landroid/graphics/Paint;-><init>()V
|
|
|
|
const/4 v9, -0x1
|
|
|
|
.line 596
|
|
invoke-virtual {p0, v9}, Landroid/graphics/Paint;->setColor(I)V
|
|
|
|
.line 597
|
|
sget v9, Lcom/moji/tool/R$color;->black_50p:I
|
|
|
|
const/high16 v10, 0x3f800000 # 1.0f
|
|
|
|
invoke-virtual {p0, v10, v8, v10, v9}, Landroid/graphics/Paint;->setShadowLayer(FFFI)V
|
|
|
|
.line 598
|
|
div-int/lit8 v8, v1, 0x32
|
|
|
|
int-to-float v8, v8
|
|
|
|
invoke-virtual {p0, v8}, Landroid/graphics/Paint;->setTextSize(F)V
|
|
|
|
.line 599
|
|
invoke-virtual {p0, p2}, Landroid/graphics/Paint;->measureText(Ljava/lang/String;)F
|
|
|
|
move-result v8
|
|
|
|
.line 601
|
|
div-int/lit8 v9, v1, 0x1e
|
|
|
|
int-to-double v9, v9
|
|
|
|
div-int/lit8 v11, v2, 0x1e
|
|
|
|
int-to-double v11, v11
|
|
|
|
invoke-static {p1, v9, v10, v11, v12}, Lcom/moji/tool/ImageUtils;->a(Landroid/graphics/Bitmap;DD)Landroid/graphics/Bitmap;
|
|
|
|
move-result-object v9
|
|
|
|
.line 602
|
|
invoke-virtual {v9}, Landroid/graphics/Bitmap;->isRecycled()Z
|
|
|
|
move-result v10
|
|
|
|
if-eqz v10, :cond_2
|
|
|
|
return-object v0
|
|
|
|
:cond_2
|
|
int-to-float v10, v1
|
|
|
|
.line 606
|
|
invoke-virtual {v9}, Landroid/graphics/Bitmap;->getWidth()I
|
|
|
|
move-result v11
|
|
|
|
sub-int v11, v1, v11
|
|
|
|
int-to-float v11, v11
|
|
|
|
sub-float/2addr v11, v8
|
|
|
|
int-to-float v4, v4
|
|
|
|
sub-float/2addr v11, v4
|
|
|
|
cmpl-float v10, v10, v11
|
|
|
|
if-ltz v10, :cond_3
|
|
|
|
invoke-virtual {v9}, Landroid/graphics/Bitmap;->getWidth()I
|
|
|
|
move-result v10
|
|
|
|
sub-int/2addr v1, v10
|
|
|
|
int-to-float v1, v1
|
|
|
|
sub-float/2addr v1, v8
|
|
|
|
int-to-float v8, v5
|
|
|
|
sub-float/2addr v1, v8
|
|
|
|
sub-float/2addr v1, v4
|
|
|
|
float-to-int v1, v1
|
|
|
|
:cond_3
|
|
sub-int v4, v2, v3
|
|
|
|
if-lt v3, v4, :cond_4
|
|
|
|
.line 607
|
|
invoke-virtual {v9}, Landroid/graphics/Bitmap;->getHeight()I
|
|
|
|
move-result v4
|
|
|
|
sub-int/2addr v2, v4
|
|
|
|
sub-int v3, v2, v3
|
|
|
|
:cond_4
|
|
int-to-float v2, v1
|
|
|
|
int-to-float v4, v3
|
|
|
|
.line 609
|
|
invoke-virtual {v7, v9, v2, v4, v0}, Landroid/graphics/Canvas;->drawBitmap(Landroid/graphics/Bitmap;FFLandroid/graphics/Paint;)V
|
|
|
|
.line 611
|
|
invoke-virtual {v9}, Landroid/graphics/Bitmap;->getWidth()I
|
|
|
|
move-result v0
|
|
|
|
add-int/2addr v1, v0
|
|
|
|
add-int/2addr v1, v5
|
|
|
|
int-to-float v0, v1
|
|
|
|
invoke-virtual {v9}, Landroid/graphics/Bitmap;->getHeight()I
|
|
|
|
move-result v1
|
|
|
|
mul-int/lit8 v1, v1, 0x4
|
|
|
|
div-int/lit8 v1, v1, 0x5
|
|
|
|
add-int/2addr v3, v1
|
|
|
|
int-to-float v1, v3
|
|
|
|
invoke-virtual {v7, p2, v0, v1, p0}, Landroid/graphics/Canvas;->drawText(Ljava/lang/String;FFLandroid/graphics/Paint;)V
|
|
|
|
.line 613
|
|
invoke-virtual {v7}, Landroid/graphics/Canvas;->save()I
|
|
|
|
.line 615
|
|
invoke-virtual {v7}, Landroid/graphics/Canvas;->restore()V
|
|
|
|
.line 617
|
|
invoke-virtual {p1}, Landroid/graphics/Bitmap;->recycle()V
|
|
|
|
.line 618
|
|
invoke-virtual {v9}, Landroid/graphics/Bitmap;->recycle()V
|
|
|
|
return-object v6
|
|
|
|
:catch_0
|
|
return-object v0
|
|
|
|
:cond_5
|
|
:goto_0
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public static a(Landroid/graphics/Bitmap;Ljava/lang/String;)Landroid/graphics/Bitmap;
|
|
.locals 13
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p0, :cond_4
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
goto/16 :goto_1
|
|
|
|
.line 426
|
|
:cond_0
|
|
invoke-virtual {p0}, Landroid/graphics/Bitmap;->getWidth()I
|
|
|
|
move-result v1
|
|
|
|
.line 427
|
|
invoke-virtual {p0}, Landroid/graphics/Bitmap;->getHeight()I
|
|
|
|
move-result v2
|
|
|
|
.line 432
|
|
:try_start_0
|
|
sget-object v3, Landroid/graphics/Bitmap$Config;->RGB_565:Landroid/graphics/Bitmap$Config;
|
|
|
|
invoke-static {v1, v2, v3}, Landroid/graphics/Bitmap;->createBitmap(IILandroid/graphics/Bitmap$Config;)Landroid/graphics/Bitmap;
|
|
|
|
move-result-object v2
|
|
:try_end_0
|
|
.catch Ljava/lang/OutOfMemoryError; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
if-nez v2, :cond_1
|
|
|
|
return-object v0
|
|
|
|
.line 440
|
|
:cond_1
|
|
new-instance v3, Landroid/graphics/Canvas;
|
|
|
|
invoke-direct {v3, v2}, Landroid/graphics/Canvas;-><init>(Landroid/graphics/Bitmap;)V
|
|
|
|
const/4 v4, 0x0
|
|
|
|
.line 442
|
|
invoke-virtual {v3, p0, v4, v4, v0}, Landroid/graphics/Canvas;->drawBitmap(Landroid/graphics/Bitmap;FFLandroid/graphics/Paint;)V
|
|
|
|
.line 444
|
|
new-instance p0, Landroid/graphics/Paint;
|
|
|
|
invoke-direct {p0}, Landroid/graphics/Paint;-><init>()V
|
|
|
|
const/4 v5, -0x1
|
|
|
|
.line 445
|
|
invoke-virtual {p0, v5}, Landroid/graphics/Paint;->setColor(I)V
|
|
|
|
.line 446
|
|
sget v5, Lcom/moji/tool/R$color;->black_50p:I
|
|
|
|
const/high16 v6, 0x3f800000 # 1.0f
|
|
|
|
invoke-virtual {p0, v6, v4, v6, v5}, Landroid/graphics/Paint;->setShadowLayer(FFFI)V
|
|
|
|
.line 447
|
|
div-int/lit8 v4, v1, 0x1e
|
|
|
|
int-to-float v4, v4
|
|
|
|
invoke-virtual {p0, v4}, Landroid/graphics/Paint;->setTextSize(F)V
|
|
|
|
const/16 v4, 0x20
|
|
|
|
.line 448
|
|
invoke-virtual {p0, v4}, Landroid/graphics/Paint;->setFlags(I)V
|
|
|
|
const/4 v4, 0x1
|
|
|
|
.line 449
|
|
invoke-virtual {p0, v4}, Landroid/graphics/Paint;->setAntiAlias(Z)V
|
|
|
|
.line 450
|
|
div-int/lit8 v4, v1, 0xf
|
|
|
|
.line 451
|
|
invoke-virtual {p0, p1}, Landroid/graphics/Paint;->measureText(Ljava/lang/String;)F
|
|
|
|
move-result v5
|
|
|
|
const/high16 v6, 0x41a00000 # 20.0f
|
|
|
|
.line 452
|
|
invoke-static {v6}, Lcom/moji/tool/DeviceTool;->a(F)I
|
|
|
|
move-result v6
|
|
|
|
int-to-float v6, v6
|
|
|
|
add-float/2addr v6, v5
|
|
|
|
const/high16 v7, 0x42680000 # 58.0f
|
|
|
|
invoke-static {v7}, Lcom/moji/tool/DeviceTool;->a(F)I
|
|
|
|
move-result v7
|
|
|
|
int-to-float v7, v7
|
|
|
|
invoke-static {v6, v7}, Ljava/lang/Math;->max(FF)F
|
|
|
|
move-result v6
|
|
|
|
.line 454
|
|
sget v7, Lcom/moji/tool/R$drawable;->water_mark_moji_logo_v3:I
|
|
|
|
invoke-static {v7}, Lcom/moji/tool/DeviceTool;->d(I)Landroid/graphics/Bitmap;
|
|
|
|
move-result-object v7
|
|
|
|
int-to-double v8, v4
|
|
|
|
invoke-static {v7, v8, v9, v8, v9}, Lcom/moji/tool/ImageUtils;->a(Landroid/graphics/Bitmap;DD)Landroid/graphics/Bitmap;
|
|
|
|
move-result-object v7
|
|
|
|
.line 455
|
|
sget v10, Lcom/moji/tool/R$drawable;->water_mark_frame:I
|
|
|
|
invoke-static {v10}, Lcom/moji/tool/DeviceTool;->d(I)Landroid/graphics/Bitmap;
|
|
|
|
move-result-object v10
|
|
|
|
float-to-double v11, v6
|
|
|
|
invoke-static {v10, v11, v12, v8, v9}, Lcom/moji/tool/ImageUtils;->a(Landroid/graphics/Bitmap;DD)Landroid/graphics/Bitmap;
|
|
|
|
move-result-object v8
|
|
|
|
.line 456
|
|
invoke-virtual {v7}, Landroid/graphics/Bitmap;->isRecycled()Z
|
|
|
|
move-result v9
|
|
|
|
if-nez v9, :cond_3
|
|
|
|
invoke-virtual {v8}, Landroid/graphics/Bitmap;->isRecycled()Z
|
|
|
|
move-result v9
|
|
|
|
if-eqz v9, :cond_2
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
int-to-float v9, v1
|
|
|
|
sub-float v10, v9, v6
|
|
|
|
const/high16 v11, 0x41200000 # 10.0f
|
|
|
|
.line 461
|
|
invoke-static {v11}, Lcom/moji/tool/DeviceTool;->a(F)I
|
|
|
|
move-result v11
|
|
|
|
int-to-float v11, v11
|
|
|
|
sub-float/2addr v10, v11
|
|
|
|
int-to-float v4, v4
|
|
|
|
sub-float v4, v10, v4
|
|
|
|
const/high16 v11, 0x42180000 # 38.0f
|
|
|
|
div-float/2addr v9, v11
|
|
|
|
sub-float/2addr v6, v5
|
|
|
|
const/high16 v5, 0x40000000 # 2.0f
|
|
|
|
div-float/2addr v6, v5
|
|
|
|
add-float/2addr v6, v10
|
|
|
|
const/high16 v5, 0x40400000 # 3.0f
|
|
|
|
.line 464
|
|
invoke-static {v5}, Lcom/moji/tool/DeviceTool;->a(F)I
|
|
|
|
move-result v11
|
|
|
|
int-to-float v11, v11
|
|
|
|
sub-float/2addr v6, v11
|
|
|
|
.line 465
|
|
invoke-virtual {p0}, Landroid/graphics/Paint;->getTextSize()F
|
|
|
|
move-result v11
|
|
|
|
add-float/2addr v11, v9
|
|
|
|
const/high16 v12, 0x40a00000 # 5.0f
|
|
|
|
invoke-static {v12}, Lcom/moji/tool/DeviceTool;->a(F)I
|
|
|
|
move-result v12
|
|
|
|
int-to-float v12, v12
|
|
|
|
add-float/2addr v11, v12
|
|
|
|
.line 467
|
|
invoke-virtual {v3, v7, v4, v9, v0}, Landroid/graphics/Canvas;->drawBitmap(Landroid/graphics/Bitmap;FFLandroid/graphics/Paint;)V
|
|
|
|
.line 468
|
|
invoke-virtual {v3, v8, v10, v9, v0}, Landroid/graphics/Canvas;->drawBitmap(Landroid/graphics/Bitmap;FFLandroid/graphics/Paint;)V
|
|
|
|
.line 469
|
|
invoke-virtual {v3, p1, v6, v11, p0}, Landroid/graphics/Canvas;->drawText(Ljava/lang/String;FFLandroid/graphics/Paint;)V
|
|
|
|
.line 470
|
|
div-int/lit8 v1, v1, 0x28
|
|
|
|
int-to-float p1, v1
|
|
|
|
invoke-virtual {p0, p1}, Landroid/graphics/Paint;->setTextSize(F)V
|
|
|
|
.line 471
|
|
invoke-static {v5}, Lcom/moji/tool/DeviceTool;->a(F)I
|
|
|
|
move-result p1
|
|
|
|
int-to-float p1, p1
|
|
|
|
add-float/2addr v4, p1
|
|
|
|
.line 472
|
|
invoke-virtual {p0}, Landroid/graphics/Paint;->getTextSize()F
|
|
|
|
move-result p1
|
|
|
|
add-float/2addr v11, p1
|
|
|
|
const/high16 p1, 0x40800000 # 4.0f
|
|
|
|
invoke-static {p1}, Lcom/moji/tool/DeviceTool;->a(F)I
|
|
|
|
move-result p1
|
|
|
|
int-to-float p1, p1
|
|
|
|
add-float/2addr v11, p1
|
|
|
|
const-string p1, "moji\u00b7scenery"
|
|
|
|
.line 473
|
|
invoke-virtual {v3, p1, v4, v11, p0}, Landroid/graphics/Canvas;->drawText(Ljava/lang/String;FFLandroid/graphics/Paint;)V
|
|
|
|
.line 476
|
|
invoke-virtual {v3}, Landroid/graphics/Canvas;->save()I
|
|
|
|
.line 477
|
|
invoke-virtual {v3}, Landroid/graphics/Canvas;->restore()V
|
|
|
|
.line 479
|
|
invoke-virtual {v7}, Landroid/graphics/Bitmap;->recycle()V
|
|
|
|
.line 480
|
|
invoke-virtual {v8}, Landroid/graphics/Bitmap;->recycle()V
|
|
|
|
return-object v2
|
|
|
|
:cond_3
|
|
:goto_0
|
|
return-object v0
|
|
|
|
:catch_0
|
|
return-object v0
|
|
|
|
:cond_4
|
|
:goto_1
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public static a(Landroid/content/Context;Ljava/lang/String;Landroid/widget/ImageView;)V
|
|
.locals 1
|
|
|
|
.line 146
|
|
invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
return-void
|
|
|
|
.line 149
|
|
:cond_0
|
|
invoke-static {p0}, Lcom/squareup/picasso/Picasso;->a(Landroid/content/Context;)Lcom/squareup/picasso/Picasso;
|
|
|
|
move-result-object p0
|
|
|
|
.line 150
|
|
invoke-virtual {p0, p1}, Lcom/squareup/picasso/Picasso;->a(Ljava/lang/String;)Lcom/squareup/picasso/RequestCreator;
|
|
|
|
move-result-object p0
|
|
|
|
.line 151
|
|
invoke-virtual {p0}, Lcom/squareup/picasso/RequestCreator;->b()Lcom/squareup/picasso/RequestCreator;
|
|
|
|
move-result-object p0
|
|
|
|
.line 152
|
|
invoke-virtual {p0, p2}, Lcom/squareup/picasso/RequestCreator;->a(Landroid/widget/ImageView;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static a(Landroid/content/Context;Ljava/lang/String;Landroid/widget/ImageView;I)V
|
|
.locals 1
|
|
.param p3 # I
|
|
.annotation build Landroid/support/annotation/DrawableRes;
|
|
.end annotation
|
|
.end param
|
|
|
|
.line 70
|
|
invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 71
|
|
invoke-virtual {p2, p3}, Landroid/widget/ImageView;->setImageResource(I)V
|
|
|
|
return-void
|
|
|
|
.line 74
|
|
:cond_0
|
|
invoke-static {p0}, Lcom/squareup/picasso/Picasso;->a(Landroid/content/Context;)Lcom/squareup/picasso/Picasso;
|
|
|
|
move-result-object p0
|
|
|
|
.line 75
|
|
invoke-virtual {p0, p1}, Lcom/squareup/picasso/Picasso;->a(Ljava/lang/String;)Lcom/squareup/picasso/RequestCreator;
|
|
|
|
move-result-object p0
|
|
|
|
.line 76
|
|
invoke-virtual {p0, p3}, Lcom/squareup/picasso/RequestCreator;->a(I)Lcom/squareup/picasso/RequestCreator;
|
|
|
|
move-result-object p0
|
|
|
|
.line 77
|
|
invoke-virtual {p0, p3}, Lcom/squareup/picasso/RequestCreator;->b(I)Lcom/squareup/picasso/RequestCreator;
|
|
|
|
move-result-object p0
|
|
|
|
.line 78
|
|
invoke-virtual {p0, p2}, Lcom/squareup/picasso/RequestCreator;->a(Landroid/widget/ImageView;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static a(Landroid/content/Context;Ljava/lang/String;Landroid/widget/ImageView;II)V
|
|
.locals 1
|
|
|
|
.line 157
|
|
invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
return-void
|
|
|
|
.line 160
|
|
:cond_0
|
|
invoke-static {p0}, Lcom/squareup/picasso/Picasso;->a(Landroid/content/Context;)Lcom/squareup/picasso/Picasso;
|
|
|
|
move-result-object p0
|
|
|
|
.line 161
|
|
invoke-virtual {p0, p1}, Lcom/squareup/picasso/Picasso;->a(Ljava/lang/String;)Lcom/squareup/picasso/RequestCreator;
|
|
|
|
move-result-object p0
|
|
|
|
.line 162
|
|
invoke-virtual {p0, p3, p4}, Lcom/squareup/picasso/RequestCreator;->a(II)Lcom/squareup/picasso/RequestCreator;
|
|
|
|
move-result-object p0
|
|
|
|
sget-object p1, Landroid/graphics/Bitmap$Config;->RGB_565:Landroid/graphics/Bitmap$Config;
|
|
|
|
.line 163
|
|
invoke-virtual {p0, p1}, Lcom/squareup/picasso/RequestCreator;->a(Landroid/graphics/Bitmap$Config;)Lcom/squareup/picasso/RequestCreator;
|
|
|
|
move-result-object p0
|
|
|
|
.line 164
|
|
invoke-virtual {p0, p2}, Lcom/squareup/picasso/RequestCreator;->a(Landroid/widget/ImageView;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static a(Landroid/content/Context;Ljava/lang/String;Landroid/widget/ImageView;III)V
|
|
.locals 1
|
|
.param p5 # I
|
|
.annotation build Landroid/support/annotation/DrawableRes;
|
|
.end annotation
|
|
.end param
|
|
|
|
.line 43
|
|
invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 44
|
|
invoke-virtual {p2, p5}, Landroid/widget/ImageView;->setImageResource(I)V
|
|
|
|
return-void
|
|
|
|
.line 47
|
|
:cond_0
|
|
invoke-static {p0}, Lcom/squareup/picasso/Picasso;->a(Landroid/content/Context;)Lcom/squareup/picasso/Picasso;
|
|
|
|
move-result-object p0
|
|
|
|
.line 48
|
|
invoke-virtual {p0, p1}, Lcom/squareup/picasso/Picasso;->a(Ljava/lang/String;)Lcom/squareup/picasso/RequestCreator;
|
|
|
|
move-result-object p0
|
|
|
|
.line 49
|
|
invoke-virtual {p0, p3, p4}, Lcom/squareup/picasso/RequestCreator;->a(II)Lcom/squareup/picasso/RequestCreator;
|
|
|
|
move-result-object p0
|
|
|
|
.line 50
|
|
invoke-virtual {p0}, Lcom/squareup/picasso/RequestCreator;->f()Lcom/squareup/picasso/RequestCreator;
|
|
|
|
move-result-object p0
|
|
|
|
sget-object p1, Landroid/graphics/Bitmap$Config;->RGB_565:Landroid/graphics/Bitmap$Config;
|
|
|
|
.line 51
|
|
invoke-virtual {p0, p1}, Lcom/squareup/picasso/RequestCreator;->a(Landroid/graphics/Bitmap$Config;)Lcom/squareup/picasso/RequestCreator;
|
|
|
|
move-result-object p0
|
|
|
|
.line 52
|
|
invoke-virtual {p0, p5}, Lcom/squareup/picasso/RequestCreator;->b(I)Lcom/squareup/picasso/RequestCreator;
|
|
|
|
move-result-object p0
|
|
|
|
.line 53
|
|
invoke-virtual {p0, p5}, Lcom/squareup/picasso/RequestCreator;->a(I)Lcom/squareup/picasso/RequestCreator;
|
|
|
|
move-result-object p0
|
|
|
|
.line 54
|
|
invoke-virtual {p0, p2}, Lcom/squareup/picasso/RequestCreator;->a(Landroid/widget/ImageView;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static a(Landroid/content/Context;Ljava/lang/String;Landroid/widget/ImageView;IIILcom/squareup/picasso/Callback;)V
|
|
.locals 1
|
|
.param p5 # I
|
|
.annotation build Landroid/support/annotation/DrawableRes;
|
|
.end annotation
|
|
.end param
|
|
|
|
.line 58
|
|
invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
return-void
|
|
|
|
.line 61
|
|
:cond_0
|
|
invoke-static {p0}, Lcom/squareup/picasso/Picasso;->a(Landroid/content/Context;)Lcom/squareup/picasso/Picasso;
|
|
|
|
move-result-object p0
|
|
|
|
.line 62
|
|
invoke-virtual {p0, p1}, Lcom/squareup/picasso/Picasso;->a(Ljava/lang/String;)Lcom/squareup/picasso/RequestCreator;
|
|
|
|
move-result-object p0
|
|
|
|
.line 63
|
|
invoke-virtual {p0, p3, p4}, Lcom/squareup/picasso/RequestCreator;->a(II)Lcom/squareup/picasso/RequestCreator;
|
|
|
|
move-result-object p0
|
|
|
|
.line 64
|
|
invoke-virtual {p0}, Lcom/squareup/picasso/RequestCreator;->f()Lcom/squareup/picasso/RequestCreator;
|
|
|
|
move-result-object p0
|
|
|
|
.line 65
|
|
invoke-virtual {p0, p5}, Lcom/squareup/picasso/RequestCreator;->a(I)Lcom/squareup/picasso/RequestCreator;
|
|
|
|
move-result-object p0
|
|
|
|
.line 66
|
|
invoke-virtual {p0, p2, p6}, Lcom/squareup/picasso/RequestCreator;->a(Landroid/widget/ImageView;Lcom/squareup/picasso/Callback;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static a(Landroid/content/Context;Ljava/lang/String;Landroid/widget/ImageView;ILcom/squareup/picasso/Callback;)V
|
|
.locals 1
|
|
.param p3 # I
|
|
.annotation build Landroid/support/annotation/DrawableRes;
|
|
.end annotation
|
|
.end param
|
|
|
|
.line 82
|
|
invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 83
|
|
invoke-virtual {p2, p3}, Landroid/widget/ImageView;->setImageResource(I)V
|
|
|
|
return-void
|
|
|
|
.line 86
|
|
:cond_0
|
|
invoke-static {p0}, Lcom/squareup/picasso/Picasso;->a(Landroid/content/Context;)Lcom/squareup/picasso/Picasso;
|
|
|
|
move-result-object p0
|
|
|
|
.line 87
|
|
invoke-virtual {p0, p1}, Lcom/squareup/picasso/Picasso;->a(Ljava/lang/String;)Lcom/squareup/picasso/RequestCreator;
|
|
|
|
move-result-object p0
|
|
|
|
.line 88
|
|
invoke-virtual {p0, p3}, Lcom/squareup/picasso/RequestCreator;->a(I)Lcom/squareup/picasso/RequestCreator;
|
|
|
|
move-result-object p0
|
|
|
|
.line 89
|
|
invoke-virtual {p0, p3}, Lcom/squareup/picasso/RequestCreator;->b(I)Lcom/squareup/picasso/RequestCreator;
|
|
|
|
move-result-object p0
|
|
|
|
.line 90
|
|
invoke-virtual {p0, p2, p4}, Lcom/squareup/picasso/RequestCreator;->a(Landroid/widget/ImageView;Lcom/squareup/picasso/Callback;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method static synthetic a(Ljava/io/File;)V
|
|
.locals 0
|
|
|
|
.line 38
|
|
invoke-static {p0}, Lcom/moji/tool/ImageUtils;->b(Ljava/io/File;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static a(Ljava/lang/String;IILjava/lang/String;Ljava/lang/Runnable;)V
|
|
.locals 0
|
|
.param p1 # I
|
|
.annotation build Landroid/support/annotation/DrawableRes;
|
|
.end annotation
|
|
.end param
|
|
|
|
.line 344
|
|
invoke-static {p1}, Lcom/moji/tool/DeviceTool;->d(I)Landroid/graphics/Bitmap;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-static {p0, p1, p2, p3, p4}, Lcom/moji/tool/ImageUtils;->a(Ljava/lang/String;Landroid/graphics/Bitmap;ILjava/lang/String;Ljava/lang/Runnable;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static a(Ljava/lang/String;Landroid/graphics/Bitmap;ILjava/lang/String;Ljava/lang/Runnable;)V
|
|
.locals 9
|
|
|
|
.line 349
|
|
invoke-static {p0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
return-void
|
|
|
|
.line 352
|
|
:cond_0
|
|
new-instance v7, Lcom/moji/tool/ImageUtils$MyHander;
|
|
|
|
const/4 v0, 0x0
|
|
|
|
invoke-direct {v7, v0}, Lcom/moji/tool/ImageUtils$MyHander;-><init>(Lcom/moji/tool/ImageUtils$1;)V
|
|
|
|
.line 353
|
|
new-instance v0, Ljava/io/File;
|
|
|
|
new-instance v1, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
invoke-static {}, Landroid/os/Environment;->getExternalStorageDirectory()Ljava/io/File;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v2}, Ljava/io/File;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
const-string v2, "/DCIM/Camera"
|
|
|
|
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 354
|
|
invoke-virtual {v0}, Ljava/io/File;->exists()Z
|
|
|
|
move-result v1
|
|
|
|
if-nez v1, :cond_1
|
|
|
|
.line 355
|
|
invoke-virtual {v0}, Ljava/io/File;->mkdirs()Z
|
|
|
|
.line 357
|
|
:cond_1
|
|
new-instance v6, Ljava/io/File;
|
|
|
|
new-instance v1, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
invoke-virtual {v0}, Ljava/io/File;->getPath()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
const-string v0, "/"
|
|
|
|
invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
|
|
|
|
move-result-wide v2
|
|
|
|
invoke-virtual {v1, v2, v3}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
|
|
|
|
const-string v0, ".jpg"
|
|
|
|
invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-direct {v6, v0}, Ljava/io/File;-><init>(Ljava/lang/String;)V
|
|
|
|
.line 359
|
|
:try_start_0
|
|
invoke-virtual {v6}, Ljava/io/File;->createNewFile()Z
|
|
:try_end_0
|
|
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
.line 365
|
|
new-instance v0, Lcom/moji/tool/ImageUtils$2;
|
|
|
|
move-object v1, v0
|
|
|
|
move-object v2, p0
|
|
|
|
move-object v3, p1
|
|
|
|
move v4, p2
|
|
|
|
move-object v5, p3
|
|
|
|
move-object v8, p4
|
|
|
|
invoke-direct/range {v1 .. v8}, Lcom/moji/tool/ImageUtils$2;-><init>(Ljava/lang/String;Landroid/graphics/Bitmap;ILjava/lang/String;Ljava/io/File;Landroid/os/Handler;Ljava/lang/Runnable;)V
|
|
|
|
invoke-static {v0}, Lcom/moji/tool/thread/MJPools;->a(Ljava/lang/Runnable;)I
|
|
|
|
return-void
|
|
|
|
:catch_0
|
|
move-exception p0
|
|
|
|
const-string p1, "ImageUtils"
|
|
|
|
.line 361
|
|
invoke-static {p1, p0}, Lcom/moji/tool/log/MJLogger;->a(Ljava/lang/String;Ljava/lang/Throwable;)V
|
|
|
|
.line 362
|
|
sget p0, Lcom/moji/tool/R$string;->pic_save_failed:I
|
|
|
|
invoke-static {p0}, Lcom/moji/tool/ToastTool;->a(I)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static b()I
|
|
.locals 2
|
|
|
|
.line 259
|
|
sget-object v0, Lcom/moji/tool/ImageUtils;->e:Ljava/util/Random;
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
.line 260
|
|
new-instance v0, Ljava/util/Random;
|
|
|
|
invoke-direct {v0}, Ljava/util/Random;-><init>()V
|
|
|
|
sput-object v0, Lcom/moji/tool/ImageUtils;->e:Ljava/util/Random;
|
|
|
|
.line 262
|
|
:cond_0
|
|
sget-object v0, Lcom/moji/tool/ImageUtils;->e:Ljava/util/Random;
|
|
|
|
const/4 v1, 0x5
|
|
|
|
invoke-virtual {v0, v1}, Ljava/util/Random;->nextInt(I)I
|
|
|
|
move-result v0
|
|
|
|
packed-switch v0, :pswitch_data_0
|
|
|
|
.line 278
|
|
sget v0, Lcom/moji/tool/R$drawable;->round_default_5:I
|
|
|
|
goto :goto_0
|
|
|
|
.line 275
|
|
:pswitch_0
|
|
sget v0, Lcom/moji/tool/R$drawable;->round_default_4:I
|
|
|
|
goto :goto_0
|
|
|
|
.line 272
|
|
:pswitch_1
|
|
sget v0, Lcom/moji/tool/R$drawable;->round_default_3:I
|
|
|
|
goto :goto_0
|
|
|
|
.line 269
|
|
:pswitch_2
|
|
sget v0, Lcom/moji/tool/R$drawable;->round_default_2:I
|
|
|
|
goto :goto_0
|
|
|
|
.line 266
|
|
:pswitch_3
|
|
sget v0, Lcom/moji/tool/R$drawable;->round_default_1:I
|
|
|
|
:goto_0
|
|
return v0
|
|
|
|
:pswitch_data_0
|
|
.packed-switch 0x0
|
|
:pswitch_3
|
|
:pswitch_2
|
|
:pswitch_1
|
|
:pswitch_0
|
|
.end packed-switch
|
|
.end method
|
|
|
|
.method public static b(Landroid/content/Context;Ljava/lang/String;Landroid/widget/ImageView;I)V
|
|
.locals 1
|
|
.param p3 # I
|
|
.annotation build Landroid/support/annotation/DrawableRes;
|
|
.end annotation
|
|
.end param
|
|
|
|
.line 94
|
|
invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 95
|
|
invoke-virtual {p2, p3}, Landroid/widget/ImageView;->setImageResource(I)V
|
|
|
|
return-void
|
|
|
|
.line 98
|
|
:cond_0
|
|
invoke-static {p0}, Lcom/squareup/picasso/Picasso;->a(Landroid/content/Context;)Lcom/squareup/picasso/Picasso;
|
|
|
|
move-result-object p0
|
|
|
|
.line 99
|
|
invoke-virtual {p0, p1}, Lcom/squareup/picasso/Picasso;->a(Ljava/lang/String;)Lcom/squareup/picasso/RequestCreator;
|
|
|
|
move-result-object p0
|
|
|
|
.line 100
|
|
invoke-virtual {p0, p3}, Lcom/squareup/picasso/RequestCreator;->a(I)Lcom/squareup/picasso/RequestCreator;
|
|
|
|
move-result-object p0
|
|
|
|
.line 101
|
|
invoke-virtual {p0}, Lcom/squareup/picasso/RequestCreator;->b()Lcom/squareup/picasso/RequestCreator;
|
|
|
|
move-result-object p0
|
|
|
|
.line 102
|
|
invoke-virtual {p0}, Lcom/squareup/picasso/RequestCreator;->f()Lcom/squareup/picasso/RequestCreator;
|
|
|
|
move-result-object p0
|
|
|
|
.line 103
|
|
invoke-virtual {p0, p3}, Lcom/squareup/picasso/RequestCreator;->b(I)Lcom/squareup/picasso/RequestCreator;
|
|
|
|
move-result-object p0
|
|
|
|
.line 104
|
|
invoke-virtual {p0, p2}, Lcom/squareup/picasso/RequestCreator;->a(Landroid/widget/ImageView;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private static b(Ljava/io/File;)V
|
|
.locals 4
|
|
|
|
.line 647
|
|
:try_start_0
|
|
new-instance v0, Landroid/content/ContentValues;
|
|
|
|
const/4 v1, 0x6
|
|
|
|
invoke-direct {v0, v1}, Landroid/content/ContentValues;-><init>(I)V
|
|
|
|
const-string v1, "title"
|
|
|
|
.line 648
|
|
invoke-virtual {p0}, Ljava/io/File;->getName()Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v0, v1, v2}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
const-string v1, "_display_name"
|
|
|
|
.line 649
|
|
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
|
|
|
|
move-result-wide v2
|
|
|
|
invoke-static {v2, v3}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v0, v1, v2}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/Long;)V
|
|
|
|
const-string v1, "datetaken"
|
|
|
|
.line 650
|
|
invoke-virtual {p0}, Ljava/io/File;->lastModified()J
|
|
|
|
move-result-wide v2
|
|
|
|
invoke-static {v2, v3}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v0, v1, v2}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/Long;)V
|
|
|
|
const-string v1, "mime_type"
|
|
|
|
const-string v2, "image/jpeg"
|
|
|
|
.line 651
|
|
invoke-virtual {v0, v1, v2}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
const-string v1, "_data"
|
|
|
|
.line 652
|
|
invoke-virtual {p0}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v0, v1, v2}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
const-string v1, "_size"
|
|
|
|
.line 653
|
|
invoke-virtual {p0}, Ljava/io/File;->length()J
|
|
|
|
move-result-wide v2
|
|
|
|
invoke-static {v2, v3}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {v0, v1, p0}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/Long;)V
|
|
|
|
.line 655
|
|
invoke-static {}, Lcom/moji/tool/AppDelegate;->a()Landroid/content/Context;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {p0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
|
|
|
|
move-result-object p0
|
|
|
|
sget-object v1, Landroid/provider/MediaStore$Images$Media;->EXTERNAL_CONTENT_URI:Landroid/net/Uri;
|
|
|
|
invoke-virtual {p0, v1, v0}, Landroid/content/ContentResolver;->insert(Landroid/net/Uri;Landroid/content/ContentValues;)Landroid/net/Uri;
|
|
:try_end_0
|
|
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
goto :goto_0
|
|
|
|
:catch_0
|
|
move-exception p0
|
|
|
|
const-string v0, "chuan"
|
|
|
|
.line 657
|
|
invoke-virtual {p0}, Ljava/lang/Exception;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-static {v0, p0}, Lcom/moji/tool/log/MJLogger;->e(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
:goto_0
|
|
return-void
|
|
.end method
|