d.smali
.class public Lcom/cleanmaster/ui/notificationtools/util/d;
.super Ljava/lang/Object;
.source "ImageIconUtil.java"
# direct methods
.method public static a(Ljava/lang/String;Ljava/lang/String;IIIIZ)Landroid/graphics/drawable/BitmapDrawable;
.registers 14
.prologue
.line 23
invoke-static {}, Lcom/keniu/security/m;->d()Landroid/content/Context;
move-result-object v0
.line 25
if-eqz p6, :cond_11
move-object v1, p0
move-object v2, p1
move v3, p2
move v4, p3
move v5, p4
move v6, p5
.line 26
invoke-static/range {v0 .. v6}, Lcom/cleanmaster/hpsharelib/base/util/ui/BitmapUtil;->createBitmapDrawableByTypeFaceSafety(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;IIII)Landroid/graphics/drawable/BitmapDrawable;
move-result-object v0
.line 30
:goto_10
return-object v0
:cond_11
move-object v1, p0
move-object v2, p1
move v3, p2
move v4, p3
move v5, p4
move v6, p5
.line 28
invoke-static/range {v0 .. v6}, Lcom/cleanmaster/hpsharelib/base/util/ui/BitmapUtil;->createBitmapDrawableByTypeFace(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;IIII)Landroid/graphics/drawable/BitmapDrawable;
move-result-object v0
goto :goto_10
.end method
.method public static a(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;Landroid/graphics/drawable/BitmapDrawable;Z)Ljava/lang/String;
.registers 12
.prologue
.line 34
const-string v0, ""
.line 36
if-eqz p0, :cond_12
invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v1
if-nez v1, :cond_12
invoke-static {p2}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v1
if-nez v1, :cond_12
if-nez p3, :cond_13
.line 105
:cond_12
:goto_12
return-object v0
.line 40
:cond_13
invoke-static {p0}, Lcom/cleanmaster/hpsharelib/base/util/system/DeviceUtils;->getDataDir(Landroid/content/Context;)Ljava/io/File;
move-result-object v1
.line 41
if-eqz v1, :cond_12
.line 45
new-instance v2, Ljava/io/File;
invoke-direct {v2, v1, p1}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V
.line 46
invoke-virtual {v2}, Ljava/io/File;->exists()Z
move-result v1
if-nez v1, :cond_38
.line 48
:try_start_24
invoke-virtual {v2}, Ljava/io/File;->mkdirs()Z
:try_end_27
.catch Ljava/lang/Exception; {:try_start_24 .. :try_end_27} :catch_85
.line 53
invoke-virtual {v2}, Ljava/io/File;->exists()Z
move-result v1
if-eqz v1, :cond_12
.line 55
const/16 v1, 0x1c1
.line 56
:try_start_2f
invoke-virtual {v2}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;
move-result-object v3
const/4 v4, -0x1
const/4 v5, -0x1
invoke-static {v3, v1, v4, v5}, Landroid/os/FileUtils;->setPermissions(Ljava/lang/String;III)I
:try_end_38
.catch Ljava/lang/Exception; {:try_start_2f .. :try_end_38} :catch_97
.line 65
:cond_38
new-instance v3, Ljava/io/File;
invoke-direct {v3, v2, p2}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V
.line 66
invoke-virtual {v3}, Ljava/io/File;->exists()Z
move-result v1
if-eqz v1, :cond_45
if-eqz p4, :cond_6f
.line 68
:cond_45
:try_start_45
invoke-virtual {v3}, Ljava/io/File;->createNewFile()Z
:try_end_48
.catch Ljava/lang/Exception; {:try_start_45 .. :try_end_48} :catch_87
.line 73
invoke-virtual {v3}, Ljava/io/File;->exists()Z
move-result v1
if-eqz v1, :cond_12
.line 75
const/16 v1, 0x1c4
.line 76
:try_start_50
invoke-virtual {v3}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;
move-result-object v2
const/4 v4, -0x1
const/4 v5, -0x1
invoke-static {v2, v1, v4, v5}, Landroid/os/FileUtils;->setPermissions(Ljava/lang/String;III)I
:try_end_59
.catch Ljava/lang/Exception; {:try_start_50 .. :try_end_59} :catch_94
.line 81
const/4 v2, 0x0
.line 84
:try_start_5a
new-instance v1, Ljava/io/FileOutputStream;
invoke-direct {v1, v3}, Ljava/io/FileOutputStream;-><init>(Ljava/io/File;)V
:try_end_5f
.catch Ljava/lang/Exception; {:try_start_5a .. :try_end_5f} :catch_74
.catchall {:try_start_5a .. :try_end_5f} :catchall_7e
.line 85
:try_start_5f
invoke-virtual {p3}, Landroid/graphics/drawable/BitmapDrawable;->getBitmap()Landroid/graphics/Bitmap;
move-result-object v2
.line 86
sget-object v4, Landroid/graphics/Bitmap$CompressFormat;->PNG:Landroid/graphics/Bitmap$CompressFormat;
const/16 v5, 0x64
invoke-virtual {v2, v4, v5, v1}, Landroid/graphics/Bitmap;->compress(Landroid/graphics/Bitmap$CompressFormat;ILjava/io/OutputStream;)Z
:try_end_6a
.catch Ljava/lang/Exception; {:try_start_5f .. :try_end_6a} :catch_92
.catchall {:try_start_5f .. :try_end_6a} :catchall_8d
.line 90
if-eqz v1, :cond_6f
.line 92
:try_start_6c
invoke-virtual {v1}, Ljava/io/FileOutputStream;->close()V
:try_end_6f
.catch Ljava/lang/Exception; {:try_start_6c .. :try_end_6f} :catch_89
.line 103
:cond_6f
invoke-virtual {v3}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;
move-result-object v0
goto :goto_12
.line 87
:catch_74
move-exception v1
move-object v1, v2
.line 90
:goto_76
if-eqz v1, :cond_12
.line 92
:try_start_78
invoke-virtual {v1}, Ljava/io/FileOutputStream;->close()V
:try_end_7b
.catch Ljava/lang/Exception; {:try_start_78 .. :try_end_7b} :catch_7c
goto :goto_12
.line 93
:catch_7c
move-exception v1
goto :goto_12
.line 90
:catchall_7e
move-exception v1
:goto_7f
if-eqz v2, :cond_84
.line 92
:try_start_81
invoke-virtual {v2}, Ljava/io/FileOutputStream;->close()V
:try_end_84
.catch Ljava/lang/Exception; {:try_start_81 .. :try_end_84} :catch_8b
.line 94
:cond_84
throw v1
.line 49
:catch_85
move-exception v1
goto :goto_12
.line 69
:catch_87
move-exception v1
goto :goto_12
.line 93
:catch_89
move-exception v1
goto :goto_12
:catch_8b
move-exception v1
goto :goto_12
.line 90
:catchall_8d
move-exception v2
move-object v6, v2
move-object v2, v1
move-object v1, v6
goto :goto_7f
.line 87
:catch_92
move-exception v2
goto :goto_76
.line 77
:catch_94
move-exception v1
goto/16 :goto_12
.line 57
:catch_97
move-exception v1
goto/16 :goto_12
.end method