l.smali
.class public Lcom/cleanmaster/gameboost/util/l;
.super Ljava/lang/Object;
.source "WhiteListStrategy.java"
# static fields
.field public static final a:[Ljava/lang/String;
# direct methods
.method static constructor <clinit>()V
.registers 3
.prologue
.line 22
const/4 v0, 0x3
new-array v0, v0, [Ljava/lang/String;
const/4 v1, 0x0
const-string v2, "com.tencent.mm"
aput-object v2, v0, v1
const/4 v1, 0x1
const-string v2, "com.tencent.mobileqq"
aput-object v2, v0, v1
const/4 v1, 0x2
const-string v2, "com.cleanmaster.mguard_cn"
aput-object v2, v0, v1
sput-object v0, Lcom/cleanmaster/gameboost/util/l;->a:[Ljava/lang/String;
return-void
.end method
.method public static declared-synchronized a(Landroid/content/Context;)Ljava/util/List;
.registers 7
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Landroid/content/Context;",
")",
"Ljava/util/List",
"<",
"Landroid/content/pm/ApplicationInfo;",
">;"
}
.end annotation
.prologue
const/4 v1, 0x0
const/4 v2, 0x0
.line 43
const-class v4, Lcom/cleanmaster/gameboost/util/l;
monitor-enter v4
:try_start_5
new-instance v0, Landroid/content/Intent;
const-string v3, "android.intent.action.MAIN"
const/4 v5, 0x0
invoke-direct {v0, v3, v5}, Landroid/content/Intent;-><init>(Ljava/lang/String;Landroid/net/Uri;)V
.line 44
const-string v3, "android.intent.category.LAUNCHER"
invoke-virtual {v0, v3}, Landroid/content/Intent;->addCategory(Ljava/lang/String;)Landroid/content/Intent;
:try_end_12
.catchall {:try_start_5 .. :try_end_12} :catchall_48
.line 47
:try_start_12
invoke-virtual {p0}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;
move-result-object v3
const/4 v5, 0x0
invoke-virtual {v3, v0, v5}, Landroid/content/pm/PackageManager;->queryIntentActivities(Landroid/content/Intent;I)Ljava/util/List;
:try_end_1a
.catch Ljava/lang/Exception; {:try_start_12 .. :try_end_1a} :catch_24
.catchall {:try_start_12 .. :try_end_1a} :catchall_48
move-result-object v0
move-object v3, v0
.line 51
:goto_1c
if-nez v3, :cond_2a
.line 52
:try_start_1e
invoke-static {}, Ljava/util/Collections;->emptyList()Ljava/util/List;
:try_end_21
.catchall {:try_start_1e .. :try_end_21} :catchall_48
move-result-object v0
.line 60
:goto_22
monitor-exit v4
return-object v0
.line 48
:catch_24
move-exception v0
.line 49
:try_start_25
invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V
move-object v3, v1
goto :goto_1c
.line 54
:cond_2a
new-instance v1, Ljava/util/ArrayList;
invoke-direct {v1}, Ljava/util/ArrayList;-><init>()V
.line 55
:goto_2f
invoke-interface {v3}, Ljava/util/List;->size()I
move-result v0
if-ge v2, v0, :cond_46
.line 56
invoke-interface {v3, v2}, Ljava/util/List;->get(I)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/content/pm/ResolveInfo;
.line 57
iget-object v0, v0, Landroid/content/pm/ResolveInfo;->activityInfo:Landroid/content/pm/ActivityInfo;
iget-object v0, v0, Landroid/content/pm/ActivityInfo;->applicationInfo:Landroid/content/pm/ApplicationInfo;
.line 58
invoke-virtual {v1, v0}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
:try_end_42
.catchall {:try_start_25 .. :try_end_42} :catchall_48
.line 55
add-int/lit8 v0, v2, 0x1
move v2, v0
goto :goto_2f
:cond_46
move-object v0, v1
.line 60
goto :goto_22
.line 43
:catchall_48
move-exception v0
monitor-exit v4
throw v0
.end method
.method public static a(Landroid/content/Context;Landroid/content/pm/ApplicationInfo;Ljava/lang/String;)Z
.registers 4
.prologue
.line 29
invoke-static {p1}, Lcom/cleanmaster/gameboost/util/l;->a(Landroid/content/pm/ApplicationInfo;)Z
move-result v0
if-nez v0, :cond_e
iget-object v0, p1, Landroid/content/pm/ApplicationInfo;->packageName:Ljava/lang/String;
invoke-static {v0, p2}, Landroid/text/TextUtils;->equals(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Z
move-result v0
if-eqz v0, :cond_10
.line 30
:cond_e
const/4 v0, 0x0
.line 33
:goto_f
return v0
:cond_10
const/4 v0, 0x1
goto :goto_f
.end method
.method public static a(Landroid/content/pm/ApplicationInfo;)Z
.registers 8
.prologue
const/4 v1, 0x1
const/4 v0, 0x0
.line 68
if-nez p0, :cond_5
.line 77
:cond_4
:goto_4
return v0
.line 69
:cond_5
invoke-static {p0}, Lcom/cleanmaster/gameboost/util/l;->b(Landroid/content/pm/ApplicationInfo;)Z
move-result v2
if-eqz v2, :cond_d
move v0, v1
.line 70
goto :goto_4
.line 72
:cond_d
sget-object v3, Lcom/cleanmaster/gameboost/util/l;->a:[Ljava/lang/String;
array-length v4, v3
move v2, v0
:goto_11
if-ge v2, v4, :cond_4
aget-object v5, v3, v2
.line 73
iget-object v6, p0, Landroid/content/pm/ApplicationInfo;->packageName:Ljava/lang/String;
invoke-static {v5, v6}, Landroid/text/TextUtils;->equals(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Z
move-result v5
if-eqz v5, :cond_1f
move v0, v1
.line 74
goto :goto_4
.line 72
:cond_1f
add-int/lit8 v2, v2, 0x1
goto :goto_11
.end method
.method public static b(Landroid/content/pm/ApplicationInfo;)Z
.registers 2
.prologue
.line 82
if-eqz p0, :cond_10
iget v0, p0, Landroid/content/pm/ApplicationInfo;->flags:I
and-int/lit8 v0, v0, 0x1
if-nez v0, :cond_e
iget v0, p0, Landroid/content/pm/ApplicationInfo;->flags:I
and-int/lit16 v0, v0, 0x80
if-eqz v0, :cond_10
:cond_e
const/4 v0, 0x1
:goto_f
return v0
:cond_10
const/4 v0, 0x0
goto :goto_f
.end method