ShortCutHelper.smali
.class public Lcom/cleanmaster/base/util/system/ShortCutHelper;
.super Ljava/lang/Object;
.source "ShortCutHelper.java"
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/cleanmaster/base/util/system/ShortCutHelper$ShortCutReceiver;
}
.end annotation
# static fields
.field private static final INSTALL_SHORTCUT_ACTION:Ljava/lang/String; = "com.android.launcher.action.INSTALL_SHORTCUT"
.field private static final IS_SHORTCUT_SUPPORTED:Ljava/lang/String; = "is_shortcut_supported"
.field private static final SCENEID_SHORTCUT:I = 0x40
.field public static final SHORT_CUT_TYPE_GAME:I = 0x2
.field public static final SHORT_CUT_TYPE_NEWS:I = 0x3
.field public static final SHORT_CUT_TYPE_VIDEO:I = 0x1
.field private static mShortCutMsg:Ljava/lang/String;
# direct methods
.method static constructor <clinit>()V
.registers 1
.prologue
.line 57
const-string v0, ""
sput-object v0, Lcom/cleanmaster/base/util/system/ShortCutHelper;->mShortCutMsg:Ljava/lang/String;
return-void
.end method
.method public constructor <init>()V
.registers 1
.prologue
.line 50
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method private static SP2(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
.registers 4
.prologue
.line 312
const-string v0, ""
invoke-static {p0, v0}, Lcom/cleanmaster/ui/notificationtools/util/o;->a(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
move-result-object v0
.line 313
invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v1
if-eqz v1, :cond_e
.line 314
sget-object v0, Landroid/os/Build;->MODEL:Ljava/lang/String;
.line 316
:cond_e
invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v1
if-nez v1, :cond_15
:goto_14
return-object v0
:cond_15
move-object v0, p1
goto :goto_14
.end method
.method static synthetic access$000(Ljava/lang/String;I)Z
.registers 3
.prologue
.line 50
invoke-static {p0, p1}, Lcom/cleanmaster/base/util/system/ShortCutHelper;->isShortCutExist(Ljava/lang/String;I)Z
move-result v0
return v0
.end method
.method static synthetic access$100(Ljava/lang/String;IILjava/lang/String;)V
.registers 4
.prologue
.line 50
invoke-static {p0, p1, p2, p3}, Lcom/cleanmaster/base/util/system/ShortCutHelper;->onResumeCreateShortcut(Ljava/lang/String;IILjava/lang/String;)V
return-void
.end method
.method private static addShortAboveAndroidO(Landroid/content/Context;Landroid/content/Intent;Ljava/lang/String;Landroid/graphics/Bitmap;I)V
.registers 14
.annotation build Landroid/annotation/SuppressLint;
value = {
"InlinedApi"
}
.end annotation
.prologue
.line 183
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
const/16 v1, 0x1a
if-ge v0, v1, :cond_7
.line 233
:cond_6
:goto_6
return-void
.line 187
:cond_7
:try_start_7
invoke-virtual {p0}, Landroid/content/Context;->getApplicationInfo()Landroid/content/pm/ApplicationInfo;
move-result-object v0
iget v0, v0, Landroid/content/pm/ApplicationInfo;->targetSdkVersion:I
const/16 v1, 0x19
if-lt v0, v1, :cond_1a
.line 188
invoke-static {p0, p1, p2, p3, p4}, Lcom/cleanmaster/base/util/system/ShortCutHelper;->addShortAboveAndroidOByTargetO(Landroid/content/Context;Landroid/content/Intent;Ljava/lang/String;Landroid/graphics/Bitmap;I)V
:try_end_14
.catch Ljava/lang/ClassNotFoundException; {:try_start_7 .. :try_end_14} :catch_15
.catch Ljava/lang/NoSuchMethodException; {:try_start_7 .. :try_end_14} :catch_114
.catch Ljava/lang/reflect/InvocationTargetException; {:try_start_7 .. :try_end_14} :catch_11a
.catch Ljava/lang/IllegalAccessException; {:try_start_7 .. :try_end_14} :catch_120
.catch Ljava/lang/InstantiationException; {:try_start_7 .. :try_end_14} :catch_126
.catch Ljava/lang/Exception; {:try_start_7 .. :try_end_14} :catch_12c
goto :goto_6
.line 220
:catch_15
move-exception v0
.line 221
invoke-virtual {v0}, Ljava/lang/ClassNotFoundException;->printStackTrace()V
goto :goto_6
.line 191
:cond_1a
:try_start_1a
const-string v0, "android.content.pm.ShortcutManager"
invoke-static {v0}, Ljava/lang/Class;->forName(Ljava/lang/String;)Ljava/lang/Class;
move-result-object v1
.line 192
const-string v0, "shortcut"
invoke-virtual {p0, v0}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v2
.line 193
const-string v0, "isRequestPinShortcutSupported"
const/4 v3, 0x0
new-array v3, v3, [Ljava/lang/Class;
invoke-virtual {v1, v0, v3}, Ljava/lang/Class;->getDeclaredMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
move-result-object v0
.line 195
const/4 v3, 0x0
new-array v3, v3, [Ljava/lang/Object;
invoke-virtual {v0, v2, v3}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Ljava/lang/Boolean;
invoke-virtual {v0}, Ljava/lang/Boolean;->booleanValue()Z
move-result v0
.line 196
if-eqz v0, :cond_6
.line 199
const-string v0, "android.intent.action.VIEW"
invoke-virtual {p1, v0}, Landroid/content/Intent;->setAction(Ljava/lang/String;)Landroid/content/Intent;
.line 200
const-string v0, "android.content.pm.ShortcutInfo$Builder"
invoke-static {v0}, Ljava/lang/Class;->forName(Ljava/lang/String;)Ljava/lang/Class;
move-result-object v0
.line 201
const/4 v3, 0x2
new-array v3, v3, [Ljava/lang/Class;
const/4 v4, 0x0
const-class v5, Landroid/content/Context;
aput-object v5, v3, v4
const/4 v4, 0x1
const-class v5, Ljava/lang/String;
aput-object v5, v3, v4
invoke-virtual {v0, v3}, Ljava/lang/Class;->getConstructor([Ljava/lang/Class;)Ljava/lang/reflect/Constructor;
move-result-object v3
.line 202
const/4 v4, 0x2
new-array v4, v4, [Ljava/lang/Object;
const/4 v5, 0x0
aput-object p0, v4, v5
const/4 v5, 0x1
invoke-static {p4}, Lcom/cleanmaster/base/util/system/ShortCutHelper;->getShortIdByType(I)Ljava/lang/String;
move-result-object v6
aput-object v6, v4, v5
invoke-virtual {v3, v4}, Ljava/lang/reflect/Constructor;->newInstance([Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v3
.line 203
const-string v4, "android.graphics.drawable.Icon"
invoke-static {v4}, Ljava/lang/Class;->forName(Ljava/lang/String;)Ljava/lang/Class;
move-result-object v4
.line 204
const-string v5, "createWithBitmap"
const/4 v6, 0x1
new-array v6, v6, [Ljava/lang/Class;
const/4 v7, 0x0
const-class v8, Landroid/graphics/Bitmap;
aput-object v8, v6, v7
invoke-virtual {v4, v5, v6}, Ljava/lang/Class;->getMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
move-result-object v5
.line 205
const/4 v6, 0x0
const/4 v7, 0x1
new-array v7, v7, [Ljava/lang/Object;
const/4 v8, 0x0
aput-object p3, v7, v8
invoke-virtual {v5, v6, v7}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v5
.line 206
const-string v6, "setIcon"
const/4 v7, 0x1
new-array v7, v7, [Ljava/lang/Class;
const/4 v8, 0x0
aput-object v4, v7, v8
invoke-virtual {v0, v6, v7}, Ljava/lang/Class;->getMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
move-result-object v4
.line 207
const/4 v6, 0x1
new-array v6, v6, [Ljava/lang/Object;
const/4 v7, 0x0
aput-object v5, v6, v7
invoke-virtual {v4, v3, v6}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
.line 208
const-string v4, "setShortLabel"
const/4 v5, 0x1
new-array v5, v5, [Ljava/lang/Class;
const/4 v6, 0x0
const-class v7, Ljava/lang/CharSequence;
aput-object v7, v5, v6
invoke-virtual {v0, v4, v5}, Ljava/lang/Class;->getMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
move-result-object v4
.line 209
const/4 v5, 0x1
new-array v5, v5, [Ljava/lang/Object;
const/4 v6, 0x0
aput-object p2, v5, v6
invoke-virtual {v4, v3, v5}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
.line 210
const-string v4, "setIntent"
const/4 v5, 0x1
new-array v5, v5, [Ljava/lang/Class;
const/4 v6, 0x0
const-class v7, Landroid/content/Intent;
aput-object v7, v5, v6
invoke-virtual {v0, v4, v5}, Ljava/lang/Class;->getMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
move-result-object v4
.line 211
const/4 v5, 0x1
new-array v5, v5, [Ljava/lang/Object;
const/4 v6, 0x0
aput-object p1, v5, v6
invoke-virtual {v4, v3, v5}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
.line 212
const-string v4, "build"
const/4 v5, 0x0
new-array v5, v5, [Ljava/lang/Class;
invoke-virtual {v0, v4, v5}, Ljava/lang/Class;->getMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
move-result-object v0
.line 213
const/4 v4, 0x0
new-array v4, v4, [Ljava/lang/Object;
invoke-virtual {v0, v3, v4}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v0
.line 215
const/4 v3, 0x0
new-instance v4, Landroid/content/Intent;
const-class v5, Lcom/cleanmaster/base/util/system/ShortCutHelper$ShortCutReceiver;
invoke-direct {v4, p0, v5}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V
const/high16 v5, 0x8000000
invoke-static {p0, v3, v4, v5}, Landroid/app/PendingIntent;->getBroadcast(Landroid/content/Context;ILandroid/content/Intent;I)Landroid/app/PendingIntent;
move-result-object v3
.line 217
const-string v4, "android.content.pm.ShortcutInfo"
invoke-static {v4}, Ljava/lang/Class;->forName(Ljava/lang/String;)Ljava/lang/Class;
move-result-object v4
.line 218
const-string v5, "requestPinShortcut"
const/4 v6, 0x2
new-array v6, v6, [Ljava/lang/Class;
const/4 v7, 0x0
aput-object v4, v6, v7
const/4 v4, 0x1
const-class v7, Landroid/content/IntentSender;
aput-object v7, v6, v4
invoke-virtual {v1, v5, v6}, Ljava/lang/Class;->getMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
move-result-object v1
.line 219
const/4 v4, 0x2
new-array v4, v4, [Ljava/lang/Object;
const/4 v5, 0x0
aput-object v0, v4, v5
const/4 v0, 0x1
invoke-virtual {v3}, Landroid/app/PendingIntent;->getIntentSender()Landroid/content/IntentSender;
move-result-object v3
aput-object v3, v4, v0
invoke-virtual {v1, v2, v4}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
:try_end_112
.catch Ljava/lang/ClassNotFoundException; {:try_start_1a .. :try_end_112} :catch_15
.catch Ljava/lang/NoSuchMethodException; {:try_start_1a .. :try_end_112} :catch_114
.catch Ljava/lang/reflect/InvocationTargetException; {:try_start_1a .. :try_end_112} :catch_11a
.catch Ljava/lang/IllegalAccessException; {:try_start_1a .. :try_end_112} :catch_120
.catch Ljava/lang/InstantiationException; {:try_start_1a .. :try_end_112} :catch_126
.catch Ljava/lang/Exception; {:try_start_1a .. :try_end_112} :catch_12c
goto/16 :goto_6
.line 222
:catch_114
move-exception v0
.line 223
invoke-virtual {v0}, Ljava/lang/NoSuchMethodException;->printStackTrace()V
goto/16 :goto_6
.line 224
:catch_11a
move-exception v0
.line 225
invoke-virtual {v0}, Ljava/lang/reflect/InvocationTargetException;->printStackTrace()V
goto/16 :goto_6
.line 226
:catch_120
move-exception v0
.line 227
invoke-virtual {v0}, Ljava/lang/IllegalAccessException;->printStackTrace()V
goto/16 :goto_6
.line 228
:catch_126
move-exception v0
.line 229
invoke-virtual {v0}, Ljava/lang/InstantiationException;->printStackTrace()V
goto/16 :goto_6
.line 230
:catch_12c
move-exception v0
.line 231
invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V
goto/16 :goto_6
.end method
.method private static addShortAboveAndroidOByTargetO(Landroid/content/Context;Landroid/content/Intent;Ljava/lang/String;Landroid/graphics/Bitmap;I)V
.registers 10
.annotation build Landroid/annotation/SuppressLint;
value = {
"InlinedApi"
}
.end annotation
.prologue
.line 238
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
const/16 v1, 0x1a
if-ge v0, v1, :cond_7
.line 252
:cond_6
:goto_6
return-void
.line 241
:cond_7
const-string v0, "shortcut"
invoke-virtual {p0, v0}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/content/pm/ShortcutManager;
.line 242
invoke-virtual {v0}, Landroid/content/pm/ShortcutManager;->isRequestPinShortcutSupported()Z
move-result v1
if-eqz v1, :cond_6
.line 243
const-string v1, "android.intent.action.VIEW"
invoke-virtual {p1, v1}, Landroid/content/Intent;->setAction(Ljava/lang/String;)Landroid/content/Intent;
.line 244
new-instance v1, Landroid/content/pm/ShortcutInfo$Builder;
invoke-static {p4}, Lcom/cleanmaster/base/util/system/ShortCutHelper;->getShortIdByType(I)Ljava/lang/String;
move-result-object v2
invoke-direct {v1, p0, v2}, Landroid/content/pm/ShortcutInfo$Builder;-><init>(Landroid/content/Context;Ljava/lang/String;)V
.line 245
invoke-static {p3}, Landroid/graphics/drawable/Icon;->createWithBitmap(Landroid/graphics/Bitmap;)Landroid/graphics/drawable/Icon;
move-result-object v2
invoke-virtual {v1, v2}, Landroid/content/pm/ShortcutInfo$Builder;->setIcon(Landroid/graphics/drawable/Icon;)Landroid/content/pm/ShortcutInfo$Builder;
move-result-object v1
.line 246
invoke-virtual {v1, p2}, Landroid/content/pm/ShortcutInfo$Builder;->setShortLabel(Ljava/lang/CharSequence;)Landroid/content/pm/ShortcutInfo$Builder;
move-result-object v1
.line 247
invoke-virtual {v1, p1}, Landroid/content/pm/ShortcutInfo$Builder;->setIntent(Landroid/content/Intent;)Landroid/content/pm/ShortcutInfo$Builder;
move-result-object v1
.line 248
invoke-virtual {v1}, Landroid/content/pm/ShortcutInfo$Builder;->build()Landroid/content/pm/ShortcutInfo;
move-result-object v1
.line 249
const/4 v2, 0x0
new-instance v3, Landroid/content/Intent;
const-class v4, Lcom/cleanmaster/base/util/system/ShortCutHelper$ShortCutReceiver;
invoke-direct {v3, p0, v4}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V
const/high16 v4, 0x8000000
invoke-static {p0, v2, v3, v4}, Landroid/app/PendingIntent;->getBroadcast(Landroid/content/Context;ILandroid/content/Intent;I)Landroid/app/PendingIntent;
move-result-object v2
.line 250
invoke-virtual {v2}, Landroid/app/PendingIntent;->getIntentSender()Landroid/content/IntentSender;
move-result-object v2
invoke-virtual {v0, v1, v2}, Landroid/content/pm/ShortcutManager;->requestPinShortcut(Landroid/content/pm/ShortcutInfo;Landroid/content/IntentSender;)Z
goto :goto_6
.end method
.method private static addShortCut(Landroid/content/Context;Landroid/content/Intent;Ljava/lang/String;Landroid/graphics/Bitmap;I)V
.registers 7
.prologue
.line 147
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
const/16 v1, 0x1a
if-ge v0, v1, :cond_a
.line 148
invoke-static {p0, p1, p2, p3, p4}, Lcom/cleanmaster/base/util/system/ShortCutHelper;->addShortCutNormal(Landroid/content/Context;Landroid/content/Intent;Ljava/lang/String;Landroid/graphics/Bitmap;I)V
.line 153
:goto_9
return-void
.line 150
:cond_a
invoke-static {p0, p1, p2, p3, p4}, Lcom/cleanmaster/base/util/system/ShortCutHelper;->addShortAboveAndroidO(Landroid/content/Context;Landroid/content/Intent;Ljava/lang/String;Landroid/graphics/Bitmap;I)V
.line 151
invoke-static {p2, p4}, Lcom/cleanmaster/base/util/system/ShortCutHelper;->updateShourtCutStatus(Ljava/lang/String;I)V
goto :goto_9
.end method
.method private static addShortCutNormal(Landroid/content/Context;Landroid/content/Intent;Ljava/lang/String;Landroid/graphics/Bitmap;I)V
.registers 8
.prologue
.line 263
new-instance v0, Landroid/content/Intent;
const-string v1, "com.android.launcher.action.INSTALL_SHORTCUT"
invoke-direct {v0, v1}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V
.line 264
const-string v1, "android.intent.extra.shortcut.INTENT"
invoke-virtual {v0, v1, p1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/Parcelable;)Landroid/content/Intent;
.line 265
const-string v1, "android.intent.extra.shortcut.NAME"
invoke-virtual {v0, v1, p2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
.line 266
const-string v1, "android.intent.extra.shortcut.ICON"
invoke-virtual {v0, v1, p3}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/Parcelable;)Landroid/content/Intent;
.line 267
const-string v1, "duplicate"
const/4 v2, 0x0
invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Z)Landroid/content/Intent;
.line 269
invoke-virtual {p0, v0}, Landroid/content/Context;->sendBroadcast(Landroid/content/Intent;)V
.line 270
invoke-static {}, Lcom/cleanmaster/ui/notificationtools/util/i;->a()Z
move-result v0
if-eqz v0, :cond_33
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
const/16 v1, 0x1a
if-ge v0, v1, :cond_33
.line 271
invoke-static {}, Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;->getInstance()Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;
move-result-object v0
const/4 v1, 0x1
invoke-virtual {v0, p4, v1}, Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;->setHomeTabShortCutTypeAlreadyAdd(IZ)V
.line 273
:cond_33
return-void
.end method
.method private static createShortcut(Landroid/content/Context;Ljava/lang/String;II)V
.registers 7
.prologue
.line 81
invoke-virtual {p0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v0
const v1, 0x7f0a161f
invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;
move-result-object v0
const/4 v1, 0x1
new-array v1, v1, [Ljava/lang/Object;
const/4 v2, 0x0
aput-object p1, v1, v2
invoke-static {v0, v1}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
move-result-object v0
.line 82
invoke-static {p1, p2, p3, v0}, Lcom/cleanmaster/base/util/system/ShortCutHelper;->guideShortCutPermission(Ljava/lang/String;IILjava/lang/String;)V
.line 83
return-void
.end method
.method private static createShortcut(Ljava/lang/String;II)V
.registers 5
.prologue
.line 100
invoke-static {p0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_8
if-nez p1, :cond_9
.line 109
:cond_8
:goto_8
return-void
.line 103
:cond_9
invoke-static {}, Lcom/keniu/security/l;->d()Landroid/content/Context;
move-result-object v0
invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v0
invoke-static {v0, p1}, Landroid/graphics/BitmapFactory;->decodeResource(Landroid/content/res/Resources;I)Landroid/graphics/Bitmap;
move-result-object v0
.line 104
if-eqz v0, :cond_8
invoke-virtual {v0}, Landroid/graphics/Bitmap;->isRecycled()Z
move-result v1
if-nez v1, :cond_8
.line 107
invoke-static {}, Lcom/keniu/security/l;->d()Landroid/content/Context;
move-result-object v1
invoke-static {v1, p0, v0, p2}, Lcom/cleanmaster/base/util/system/ShortCutHelper;->createShortcutEx(Landroid/content/Context;Ljava/lang/String;Landroid/graphics/Bitmap;I)V
.line 108
invoke-static {v0}, Lcom/cleanmaster/base/util/system/ShortCutHelper;->recycleBitmap(Landroid/graphics/Bitmap;)V
goto :goto_8
.end method
.method private static createShortcutEx(Landroid/content/Context;Ljava/lang/String;Landroid/graphics/Bitmap;I)V
.registers 7
.prologue
const/high16 v2, 0x42340000 # 45.0f
.line 126
if-eqz p0, :cond_12
invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_12
if-eqz p2, :cond_12
invoke-virtual {p2}, Landroid/graphics/Bitmap;->isRecycled()Z
move-result v0
if-eqz v0, :cond_13
.line 143
:cond_12
:goto_12
return-void
.line 134
:cond_13
const-string v0, "GT-N7100"
.line 135
invoke-static {}, Lcom/cleanmaster/base/util/system/ShortCutHelper;->model()Ljava/lang/String;
move-result-object v0
.line 136
invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v1
if-nez v1, :cond_3c
const-string v1, "GT-N7100"
invoke-virtual {v1, v0}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z
move-result v0
if-eqz v0, :cond_3c
.line 137
invoke-static {}, Lcom/keniu/security/l;->d()Landroid/content/Context;
move-result-object v0
invoke-static {v0, v2}, Lcom/cleanmaster/base/util/system/DimenUtils;->dp2px(Landroid/content/Context;F)I
move-result v0
.line 138
invoke-static {}, Lcom/keniu/security/l;->d()Landroid/content/Context;
move-result-object v1
invoke-static {v1, v2}, Lcom/cleanmaster/base/util/system/DimenUtils;->dp2px(Landroid/content/Context;F)I
move-result v1
const/4 v2, 0x1
.line 137
invoke-static {p2, v0, v1, v2}, Landroid/graphics/Bitmap;->createScaledBitmap(Landroid/graphics/Bitmap;IIZ)Landroid/graphics/Bitmap;
move-result-object p2
.line 141
:cond_3c
invoke-static {p3}, Lcom/cleanmaster/base/util/system/ShortCutHelper;->createShortcutIntentFrom(I)Landroid/content/Intent;
move-result-object v0
.line 142
invoke-static {p0, v0, p1, p2, p3}, Lcom/cleanmaster/base/util/system/ShortCutHelper;->addShortCut(Landroid/content/Context;Landroid/content/Intent;Ljava/lang/String;Landroid/graphics/Bitmap;I)V
goto :goto_12
.end method
.method private static createShortcutIntentFrom(I)Landroid/content/Intent;
.registers 6
.prologue
const/4 v1, 0x3
const/4 v3, 0x0
.line 276
const/4 v0, 0x0
.line 279
const/4 v2, 0x1
if-ne p0, v2, :cond_3d
move v2, v1
.line 286
:goto_7
:try_start_7
const-string v1, "com.keniu.security.main.MainActivity"
invoke-static {v1}, Ljava/lang/Class;->forName(Ljava/lang/String;)Ljava/lang/Class;
:try_end_c
.catch Ljava/lang/ClassNotFoundException; {:try_start_7 .. :try_end_c} :catch_48
move-result-object v0
.line 291
:goto_d
invoke-static {}, Lcom/keniu/security/l;->d()Landroid/content/Context;
move-result-object v1
.line 292
new-instance v4, Landroid/content/Intent;
invoke-direct {v4, v1, v0}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V
.line 294
const-string v0, "android.intent.action.MAIN"
invoke-virtual {v4, v0}, Landroid/content/Intent;->setAction(Ljava/lang/String;)Landroid/content/Intent;
.line 295
const/high16 v0, 0x4000000
invoke-virtual {v4, v0}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;
.line 296
const-string v0, "show_launcher_view"
invoke-virtual {v4, v0, v3}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Z)Landroid/content/Intent;
.line 297
const-string v0, ":FROM"
const/16 v1, 0x78
invoke-virtual {v4, v0, v1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;I)Landroid/content/Intent;
.line 298
const-string v0, ":last_vp"
invoke-virtual {v4, v0, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;I)Landroid/content/Intent;
.line 300
invoke-static {}, Lcom/cleanmaster/ui/notificationtools/util/f;->a()Z
move-result v0
if-eqz v0, :cond_3c
.line 301
const-string v0, "android.intent.category.LAUNCHER"
invoke-virtual {v4, v0}, Landroid/content/Intent;->addCategory(Ljava/lang/String;)Landroid/content/Intent;
.line 304
:cond_3c
return-object v4
.line 281
:cond_3d
const/4 v2, 0x2
if-ne p0, v2, :cond_43
.line 282
const/4 v1, 0x4
move v2, v1
goto :goto_7
.line 283
:cond_43
if-ne p0, v1, :cond_4d
.line 284
const/4 v1, 0x5
move v2, v1
goto :goto_7
.line 287
:catch_48
move-exception v1
.line 288
invoke-virtual {v1}, Ljava/lang/ClassNotFoundException;->printStackTrace()V
goto :goto_d
:cond_4d
move v2, v3
goto :goto_7
.end method
.method public static createShortcutTab(Landroid/content/Context;Ljava/lang/String;II)V
.registers 4
.prologue
.line 73
invoke-static {p0, p1, p2, p3}, Lcom/cleanmaster/base/util/system/ShortCutHelper;->createShortcut(Landroid/content/Context;Ljava/lang/String;II)V
.line 74
return-void
.end method
.method private static getAuthorityFromPermissionDefault(Landroid/content/Context;)Ljava/lang/String;
.registers 2
.prologue
.line 452
const-string v0, "com.android.launcher.permission.READ_SETTINGS"
invoke-static {p0, v0}, Lcom/cleanmaster/base/util/system/ShortCutHelper;->getThirdAuthorityFromPermission(Landroid/content/Context;Ljava/lang/String;)Ljava/lang/String;
move-result-object v0
return-object v0
.end method
.method private static getShortIdByType(I)Ljava/lang/String;
.registers 2
.prologue
.line 60
packed-switch p0, :pswitch_data_10
.line 68
const/4 v0, 0x0
:goto_4
return-object v0
.line 62
:pswitch_5
const-string/jumbo v0, "video"
goto :goto_4
.line 64
:pswitch_9
const-string v0, "game"
goto :goto_4
.line 66
:pswitch_c
const-string v0, "news"
goto :goto_4
.line 60
nop
:pswitch_data_10
.packed-switch 0x1
:pswitch_5
:pswitch_9
:pswitch_c
.end packed-switch
.end method
.method private static getThirdAuthorityFromPermission(Landroid/content/Context;Ljava/lang/String;)Ljava/lang/String;
.registers 9
.prologue
.line 456
invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v0
if-eqz v0, :cond_9
.line 457
const-string v0, ""
.line 480
:goto_8
return-object v0
.line 460
:cond_9
:try_start_9
invoke-virtual {p0}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;
move-result-object v0
const/16 v1, 0x8
invoke-virtual {v0, v1}, Landroid/content/pm/PackageManager;->getInstalledPackages(I)Ljava/util/List;
move-result-object v0
.line 461
if-nez v0, :cond_18
.line 462
const-string v0, ""
goto :goto_8
.line 464
:cond_18
invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;
move-result-object v1
:cond_1c
invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z
move-result v0
if-eqz v0, :cond_4a
invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/content/pm/PackageInfo;
.line 465
iget-object v2, v0, Landroid/content/pm/PackageInfo;->providers:[Landroid/content/pm/ProviderInfo;
.line 466
if-eqz v2, :cond_1c
.line 467
array-length v3, v2
const/4 v0, 0x0
:goto_2e
if-ge v0, v3, :cond_1c
aget-object v4, v2, v0
.line 468
iget-object v5, v4, Landroid/content/pm/ProviderInfo;->readPermission:Ljava/lang/String;
if-nez v5, :cond_39
.line 467
:cond_36
add-int/lit8 v0, v0, 0x1
goto :goto_2e
.line 471
:cond_39
const-string v5, ".*launcher.*READ_SETTINGS"
iget-object v6, v4, Landroid/content/pm/ProviderInfo;->readPermission:Ljava/lang/String;
invoke-static {v5, v6}, Ljava/util/regex/Pattern;->matches(Ljava/lang/String;Ljava/lang/CharSequence;)Z
move-result v5
if-eqz v5, :cond_36
.line 472
iget-object v0, v4, Landroid/content/pm/ProviderInfo;->authority:Ljava/lang/String;
:try_end_45
.catch Ljava/lang/Exception; {:try_start_9 .. :try_end_45} :catch_46
goto :goto_8
.line 477
:catch_46
move-exception v0
.line 478
invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V
.line 480
:cond_4a
const-string v0, ""
goto :goto_8
.end method
.method private static guideShortCutPermission(Ljava/lang/String;IILjava/lang/String;)V
.registers 8
.prologue
.line 321
invoke-static {}, Lcom/cm/plugincluster/accessibility/plugin/AccessibilityPluginDelegate;->getAccessibilityModule()Lcom/cm/plugincluster/accessibility/interfaces/IAccessibilityPluginModule;
move-result-object v0
invoke-static {}, Lcom/keniu/security/l;->d()Landroid/content/Context;
move-result-object v1
const/16 v2, 0x40
new-instance v3, Lcom/cleanmaster/base/util/system/ShortCutHelper$2;
invoke-direct {v3, p0, p1, p2, p3}, Lcom/cleanmaster/base/util/system/ShortCutHelper$2;-><init>(Ljava/lang/String;IILjava/lang/String;)V
invoke-interface {v0, v1, v2, v3}, Lcom/cm/plugincluster/accessibility/interfaces/IAccessibilityPluginModule;->startOpenPermission(Landroid/content/Context;ILcom/cm/plugincluster/accessibility/interfaces/IResultCallback;)V
.line 329
return-void
.end method
.method private static isShortCutExist(Ljava/lang/String;I)Z
.registers 14
.prologue
const/4 v8, 0x0
const/4 v7, 0x1
const/4 v6, 0x0
.line 336
.line 337
invoke-static {}, Lcom/keniu/security/l;->d()Landroid/content/Context;
move-result-object v9
.line 340
:try_start_7
invoke-virtual {v9}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
.line 341
new-instance v2, Ljava/lang/StringBuilder;
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
.line 342
invoke-static {v9}, Lcom/cleanmaster/base/util/system/ShortCutHelper;->getAuthorityFromPermissionDefault(Landroid/content/Context;)Ljava/lang/String;
move-result-object v1
.line 343
if-eqz v1, :cond_22
invoke-virtual {v1}, Ljava/lang/String;->trim()Ljava/lang/String;
move-result-object v3
const-string v4, ""
invoke-virtual {v3, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v3
if-eqz v3, :cond_3d
.line 344
:cond_22
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
invoke-static {v9}, Lcom/cleanmaster/base/util/system/LauncherUtil;->getLaucherPackageNames(Landroid/content/Context;)Ljava/util/Set;
move-result-object v3
invoke-virtual {v1, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
move-result-object v1
const-string v3, ".permission.READ_SETTINGS"
invoke-virtual {v1, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-static {v9, v1}, Lcom/cleanmaster/base/util/system/ShortCutHelper;->getThirdAuthorityFromPermission(Landroid/content/Context;Ljava/lang/String;)Ljava/lang/String;
move-result-object v1
.line 346
:cond_3d
const-string v3, "content://"
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
.line 347
invoke-static {v1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v3
if-eqz v3, :cond_d3
.line 348
sget v1, Landroid/os/Build$VERSION;->SDK_INT:I
.line 349
const/16 v3, 0x8
if-ge v1, v3, :cond_b0
.line 350
const-string v1, "com.android.launcher.settings"
invoke-virtual {v2, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
.line 359
:goto_53
const-string v1, "/favorites?notify=true"
invoke-virtual {v2, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
.line 360
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-static {v1}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;
move-result-object v1
.line 361
invoke-static {p1}, Lcom/cleanmaster/base/util/system/ShortCutHelper;->createShortcutIntentFrom(I)Landroid/content/Intent;
move-result-object v5
.line 362
if-eqz v5, :cond_d8
.line 363
const/4 v2, 0x1
new-array v2, v2, [Ljava/lang/String;
const/4 v3, 0x0
const-string v4, "title"
aput-object v4, v2, v3
const-string v3, "title=? and intent=?"
const/4 v4, 0x2
new-array v4, v4, [Ljava/lang/String;
const/4 v10, 0x0
aput-object p0, v4, v10
const/4 v10, 0x1
const/4 v11, 0x1
invoke-virtual {v5, v11}, Landroid/content/Intent;->toUri(I)Ljava/lang/String;
move-result-object v5
aput-object v5, v4, v10
const/4 v5, 0x0
invoke-virtual/range {v0 .. v5}, Landroid/content/ContentResolver;->query(Landroid/net/Uri;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;
:try_end_82
.catch Ljava/lang/Exception; {:try_start_7 .. :try_end_82} :catch_ba
.catchall {:try_start_7 .. :try_end_82} :catchall_cc
move-result-object v1
.line 367
:goto_83
if-eqz v1, :cond_10d
:try_start_85
invoke-interface {v1}, Landroid/database/Cursor;->getCount()I
move-result v0
if-lez v0, :cond_10d
move v0, v7
.line 370
:goto_8c
if-eqz v1, :cond_97
invoke-interface {v1}, Landroid/database/Cursor;->isClosed()Z
move-result v2
if-nez v2, :cond_97
.line 371
invoke-interface {v1}, Landroid/database/Cursor;->close()V
:try_end_97
.catch Ljava/lang/Exception; {:try_start_85 .. :try_end_97} :catch_109
.catchall {:try_start_85 .. :try_end_97} :catchall_106
.line 377
:cond_97
if-eqz v1, :cond_9c
.line 379
:try_start_99
invoke-interface {v1}, Landroid/database/Cursor;->close()V
:try_end_9c
.catch Ljava/lang/Exception; {:try_start_99 .. :try_end_9c} :catch_ee
.line 385
:cond_9c
:goto_9c
if-nez v0, :cond_ae
invoke-virtual {v9}, Landroid/content/Context;->getApplicationInfo()Landroid/content/pm/ApplicationInfo;
move-result-object v0
iget v0, v0, Landroid/content/pm/ApplicationInfo;->targetSdkVersion:I
const/16 v1, 0x19
if-lt v0, v1, :cond_fe
invoke-static {v9, p1}, Lcom/cleanmaster/base/util/system/ShortCutHelper;->isShortCutExistAboveAndroidNByTargetO(Landroid/content/Context;I)Z
move-result v0
if-eqz v0, :cond_104
:cond_ae
move v0, v7
:goto_af
return v0
.line 351
:cond_b0
const/16 v3, 0x13
if-ge v1, v3, :cond_c6
.line 352
:try_start_b4
const-string v1, "com.android.launcher2.settings"
invoke-virtual {v2, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
:try_end_b9
.catch Ljava/lang/Exception; {:try_start_b4 .. :try_end_b9} :catch_ba
.catchall {:try_start_b4 .. :try_end_b9} :catchall_cc
goto :goto_53
.line 373
:catch_ba
move-exception v0
move-object v1, v8
.line 374
:goto_bc
:try_start_bc
invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V
:try_end_bf
.catchall {:try_start_bc .. :try_end_bf} :catchall_106
.line 377
if-eqz v1, :cond_10b
.line 379
:try_start_c1
invoke-interface {v1}, Landroid/database/Cursor;->close()V
:try_end_c4
.catch Ljava/lang/Exception; {:try_start_c1 .. :try_end_c4} :catch_f3
move v0, v6
.line 382
goto :goto_9c
.line 354
:cond_c6
:try_start_c6
const-string v1, "com.android.launcher3.settings"
invoke-virtual {v2, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
:try_end_cb
.catch Ljava/lang/Exception; {:try_start_c6 .. :try_end_cb} :catch_ba
.catchall {:try_start_c6 .. :try_end_cb} :catchall_cc
goto :goto_53
.line 377
:catchall_cc
move-exception v0
:goto_cd
if-eqz v8, :cond_d2
.line 379
:try_start_cf
invoke-interface {v8}, Landroid/database/Cursor;->close()V
:try_end_d2
.catch Ljava/lang/Exception; {:try_start_cf .. :try_end_d2} :catch_f9
.line 382
:cond_d2
:goto_d2
throw v0
.line 357
:cond_d3
:try_start_d3
invoke-virtual {v2, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
goto/16 :goto_53
.line 365
:cond_d8
const/4 v2, 0x1
new-array v2, v2, [Ljava/lang/String;
const/4 v3, 0x0
const-string v4, "title"
aput-object v4, v2, v3
const-string v3, "title=?"
const/4 v4, 0x1
new-array v4, v4, [Ljava/lang/String;
const/4 v5, 0x0
aput-object p0, v4, v5
const/4 v5, 0x0
invoke-virtual/range {v0 .. v5}, Landroid/content/ContentResolver;->query(Landroid/net/Uri;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;
:try_end_ec
.catch Ljava/lang/Exception; {:try_start_d3 .. :try_end_ec} :catch_ba
.catchall {:try_start_d3 .. :try_end_ec} :catchall_cc
move-result-object v1
goto :goto_83
.line 380
:catch_ee
move-exception v1
.line 381
invoke-virtual {v1}, Ljava/lang/Exception;->printStackTrace()V
goto :goto_9c
.line 380
:catch_f3
move-exception v0
.line 381
invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V
move v0, v6
.line 382
goto :goto_9c
.line 380
:catch_f9
move-exception v1
.line 381
invoke-virtual {v1}, Ljava/lang/Exception;->printStackTrace()V
goto :goto_d2
.line 385
:cond_fe
invoke-static {v9, p1}, Lcom/cleanmaster/base/util/system/ShortCutHelper;->isShortCutExistAboveAndroidN(Landroid/content/Context;I)Z
move-result v0
if-nez v0, :cond_ae
:cond_104
move v0, v6
goto :goto_af
.line 377
:catchall_106
move-exception v0
move-object v8, v1
goto :goto_cd
.line 373
:catch_109
move-exception v0
goto :goto_bc
:cond_10b
move v0, v6
goto :goto_9c
:cond_10d
move v0, v6
goto/16 :goto_8c
.end method
.method private static isShortCutExistAboveAndroidN(Landroid/content/Context;I)Z
.registers 11
.annotation build Landroid/annotation/SuppressLint;
value = {
"InlinedApi"
}
.end annotation
.prologue
const/4 v2, 0x1
const/4 v1, 0x0
.line 408
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
const/16 v3, 0x1a
if-ge v0, v3, :cond_a
move v0, v1
.line 448
:goto_9
return v0
.line 412
:cond_a
:try_start_a
const-string v0, "android.content.pm.ShortcutManager"
invoke-static {v0}, Ljava/lang/Class;->forName(Ljava/lang/String;)Ljava/lang/Class;
move-result-object v0
.line 413
const-string v3, "shortcut"
invoke-virtual {p0, v3}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v3
.line 415
const-string v4, "android.content.pm.ShortcutInfo$Builder"
invoke-static {v4}, Ljava/lang/Class;->forName(Ljava/lang/String;)Ljava/lang/Class;
move-result-object v4
.line 416
const/4 v5, 0x2
new-array v5, v5, [Ljava/lang/Class;
const/4 v6, 0x0
const-class v7, Landroid/content/Context;
aput-object v7, v5, v6
const/4 v6, 0x1
const-class v7, Ljava/lang/String;
aput-object v7, v5, v6
invoke-virtual {v4, v5}, Ljava/lang/Class;->getConstructor([Ljava/lang/Class;)Ljava/lang/reflect/Constructor;
move-result-object v5
.line 417
const/4 v6, 0x2
new-array v6, v6, [Ljava/lang/Object;
const/4 v7, 0x0
aput-object p0, v6, v7
const/4 v7, 0x1
invoke-static {p1}, Lcom/cleanmaster/base/util/system/ShortCutHelper;->getShortIdByType(I)Ljava/lang/String;
move-result-object v8
aput-object v8, v6, v7
invoke-virtual {v5, v6}, Ljava/lang/reflect/Constructor;->newInstance([Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v5
.line 418
const-string v6, "build"
const/4 v7, 0x0
new-array v7, v7, [Ljava/lang/Class;
invoke-virtual {v4, v6, v7}, Ljava/lang/Class;->getMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
move-result-object v4
.line 419
const/4 v6, 0x0
new-array v6, v6, [Ljava/lang/Object;
invoke-virtual {v4, v5, v6}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
.line 421
const-string v4, "getPinnedShortcuts"
const/4 v5, 0x0
new-array v5, v5, [Ljava/lang/Class;
invoke-virtual {v0, v4, v5}, Ljava/lang/Class;->getMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
move-result-object v0
.line 422
const/4 v4, 0x0
new-array v4, v4, [Ljava/lang/Object;
invoke-virtual {v0, v3, v4}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Ljava/util/ArrayList;
.line 423
if-eqz v0, :cond_b3
invoke-virtual {v0}, Ljava/util/ArrayList;->size()I
move-result v3
if-lez v3, :cond_b3
.line 424
invoke-virtual {v0}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;
move-result-object v3
:cond_6b
invoke-interface {v3}, Ljava/util/Iterator;->hasNext()Z
move-result v0
if-eqz v0, :cond_b3
invoke-interface {v3}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v0
.line 425
invoke-virtual {v0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
move-result-object v4
.line 426
const-string v5, "getId"
const/4 v6, 0x0
new-array v6, v6, [Ljava/lang/Class;
invoke-virtual {v4, v5, v6}, Ljava/lang/Class;->getMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
move-result-object v4
.line 427
new-instance v5, Ljava/lang/String;
invoke-direct {v5}, Ljava/lang/String;-><init>()V
.line 428
const/4 v5, 0x0
new-array v5, v5, [Ljava/lang/Object;
invoke-virtual {v4, v0, v5}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Ljava/lang/String;
.line 429
invoke-static {p1}, Lcom/cleanmaster/base/util/system/ShortCutHelper;->getShortIdByType(I)Ljava/lang/String;
move-result-object v4
invoke-virtual {v4, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_6b
sget-object v0, Lcom/cleanmaster/base/util/system/ShortCutHelper;->mShortCutMsg:Ljava/lang/String;
invoke-static {v0}, Lcom/cmcm/support/base/StringUtil;->isNullOrEmpty(Ljava/lang/String;)Z
move-result v0
if-nez v0, :cond_6b
.line 430
sget-object v0, Lcom/cleanmaster/base/util/system/ShortCutHelper;->mShortCutMsg:Ljava/lang/String;
const/4 v3, 0x0
invoke-static {p0, v0, v3}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;
move-result-object v0
invoke-virtual {v0}, Landroid/widget/Toast;->show()V
:try_end_ac
.catch Ljava/lang/ClassNotFoundException; {:try_start_a .. :try_end_ac} :catch_af
.catch Ljava/lang/NoSuchMethodException; {:try_start_a .. :try_end_ac} :catch_b6
.catch Ljava/lang/IllegalAccessException; {:try_start_a .. :try_end_ac} :catch_bb
.catch Ljava/lang/reflect/InvocationTargetException; {:try_start_a .. :try_end_ac} :catch_c0
.catch Ljava/lang/InstantiationException; {:try_start_a .. :try_end_ac} :catch_c5
.catch Ljava/lang/Exception; {:try_start_a .. :try_end_ac} :catch_ca
move v0, v2
.line 431
goto/16 :goto_9
.line 435
:catch_af
move-exception v0
.line 436
invoke-virtual {v0}, Ljava/lang/ClassNotFoundException;->printStackTrace()V
:cond_b3
:goto_b3
move v0, v1
.line 448
goto/16 :goto_9
.line 437
:catch_b6
move-exception v0
.line 438
invoke-virtual {v0}, Ljava/lang/NoSuchMethodException;->printStackTrace()V
goto :goto_b3
.line 439
:catch_bb
move-exception v0
.line 440
invoke-virtual {v0}, Ljava/lang/IllegalAccessException;->printStackTrace()V
goto :goto_b3
.line 441
:catch_c0
move-exception v0
.line 442
invoke-virtual {v0}, Ljava/lang/reflect/InvocationTargetException;->printStackTrace()V
goto :goto_b3
.line 443
:catch_c5
move-exception v0
.line 444
invoke-virtual {v0}, Ljava/lang/InstantiationException;->printStackTrace()V
goto :goto_b3
.line 445
:catch_ca
move-exception v0
.line 446
invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V
goto :goto_b3
.end method
.method private static isShortCutExistAboveAndroidNByTargetO(Landroid/content/Context;I)Z
.registers 6
.annotation build Landroid/annotation/SuppressLint;
value = {
"InlinedApi"
}
.end annotation
.prologue
const/4 v1, 0x0
.line 391
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
const/16 v2, 0x1a
if-ge v0, v2, :cond_9
move v0, v1
.line 402
:goto_8
return v0
.line 394
:cond_9
const-string v0, "shortcut"
invoke-virtual {p0, v0}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/content/pm/ShortcutManager;
.line 395
invoke-virtual {v0}, Landroid/content/pm/ShortcutManager;->getPinnedShortcuts()Ljava/util/List;
move-result-object v0
.line 396
invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;
move-result-object v2
:cond_19
invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z
move-result v0
if-eqz v0, :cond_3f
invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/content/pm/ShortcutInfo;
.line 397
invoke-virtual {v0}, Landroid/content/pm/ShortcutInfo;->getId()Ljava/lang/String;
move-result-object v0
.line 398
if-eqz v0, :cond_19
const-string v3, ""
invoke-virtual {v3, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v3
if-nez v3, :cond_19
invoke-static {p1}, Lcom/cleanmaster/base/util/system/ShortCutHelper;->getShortIdByType(I)Ljava/lang/String;
move-result-object v3
invoke-virtual {v3, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_19
.line 399
const/4 v0, 0x1
goto :goto_8
:cond_3f
move v0, v1
.line 402
goto :goto_8
.end method
.method public static isShortCutExistTab(Ljava/lang/String;I)Z
.registers 3
.prologue
.line 77
invoke-static {p0, p1}, Lcom/cleanmaster/base/util/system/ShortCutHelper;->isShortCutExist(Ljava/lang/String;I)Z
move-result v0
return v0
.end method
.method private static isShortCutOpen(Landroid/content/Context;)Z
.registers 2
.prologue
.line 332
const/16 v0, 0x40
invoke-static {v0}, Lcom/cleanmaster/hpcommonlib/accessibility/AccessibilitySdkUtils;->needOpenPermissionRequest(I)Z
move-result v0
return v0
.end method
.method private static model()Ljava/lang/String;
.registers 3
.prologue
.line 308
const-string v0, "ro.product.model"
const-string v1, ""
invoke-static {v0, v1}, Lcom/cleanmaster/base/util/system/ShortCutHelper;->SP2(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
move-result-object v0
const-string v1, "&"
const-string v2, "_"
invoke-virtual {v0, v1, v2}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
move-result-object v0
return-object v0
.end method
.method private static onResumeCreateShortcut(Ljava/lang/String;IILjava/lang/String;)V
.registers 6
.prologue
.line 87
:try_start_0
sput-object p3, Lcom/cleanmaster/base/util/system/ShortCutHelper;->mShortCutMsg:Ljava/lang/String;
.line 88
invoke-static {p0, p1, p2}, Lcom/cleanmaster/base/util/system/ShortCutHelper;->createShortcut(Ljava/lang/String;II)V
.line 89
invoke-static {p0, p2}, Lcom/cleanmaster/base/util/system/ShortCutHelper;->isShortCutExist(Ljava/lang/String;I)Z
move-result v0
if-eqz v0, :cond_11
invoke-static {}, Lcom/cleanmaster/ui/notificationtools/util/p;->d()Z
move-result v0
if-eqz v0, :cond_1b
.line 90
:cond_11
invoke-static {}, Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;->getInstance()Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;
move-result-object v0
invoke-virtual {v0, p2}, Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;->getHomeTabShortCutTypeAlreadyAdd(I)Z
move-result v0
if-eqz v0, :cond_2c
.line 91
:cond_1b
int-to-byte v0, p2
const/4 v1, 0x5
invoke-static {v0, v1}, Lcom/keniu/security/main/b/t;->a(BB)V
.line 92
invoke-static {}, Lcom/keniu/security/l;->d()Landroid/content/Context;
move-result-object v0
const/4 v1, 0x0
invoke-static {v0, p3, v1}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;
move-result-object v0
invoke-virtual {v0}, Landroid/widget/Toast;->show()V
:try_end_2c
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_2c} :catch_2d
.line 97
:cond_2c
:goto_2c
return-void
.line 94
:catch_2d
move-exception v0
.line 95
invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V
goto :goto_2c
.end method
.method private static recycleBitmap(Landroid/graphics/Bitmap;)V
.registers 2
.prologue
.line 112
if-eqz p0, :cond_8
invoke-virtual {p0}, Landroid/graphics/Bitmap;->isRecycled()Z
move-result v0
if-eqz v0, :cond_9
.line 120
:cond_8
:goto_8
return-void
.line 116
:cond_9
:try_start_9
invoke-virtual {p0}, Landroid/graphics/Bitmap;->recycle()V
:try_end_c
.catch Ljava/lang/Exception; {:try_start_9 .. :try_end_c} :catch_d
goto :goto_8
.line 117
:catch_d
move-exception v0
.line 118
invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V
goto :goto_8
.end method
.method private static updateShourtCutStatus(Ljava/lang/String;I)V
.registers 6
.prologue
.line 157
:try_start_0
new-instance v0, Lcom/cleanmaster/base/util/system/ShortCutHelper$1;
invoke-direct {v0, p0, p1}, Lcom/cleanmaster/base/util/system/ShortCutHelper$1;-><init>(Ljava/lang/String;I)V
const-wide/16 v2, 0x1f4
invoke-static {v0, v2, v3}, Lcom/cleanmaster/base/util/concurrent/BackgroundThread;->postDelayed(Ljava/lang/Runnable;J)V
:try_end_a
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_a} :catch_b
.line 178
:goto_a
return-void
.line 175
:catch_b
move-exception v0
.line 176
invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V
goto :goto_a
.end method