265 lines
6.6 KiB
Smali
265 lines
6.6 KiB
Smali
.class public final Landroid/support/v4/app/NotificationManagerCompat;
|
|
.super Ljava/lang/Object;
|
|
.source "NotificationManagerCompat.java"
|
|
|
|
|
|
# static fields
|
|
.field private static final a:Ljava/lang/Object;
|
|
|
|
.field private static b:Ljava/util/Set;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/Set<",
|
|
"Ljava/lang/String;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private static final e:Ljava/lang/Object;
|
|
|
|
|
|
# instance fields
|
|
.field private final c:Landroid/content/Context;
|
|
|
|
.field private final d:Landroid/app/NotificationManager;
|
|
|
|
|
|
# direct methods
|
|
.method static constructor <clinit>()V
|
|
.locals 1
|
|
|
|
.line 95
|
|
new-instance v0, Ljava/lang/Object;
|
|
|
|
invoke-direct {v0}, Ljava/lang/Object;-><init>()V
|
|
|
|
sput-object v0, Landroid/support/v4/app/NotificationManagerCompat;->a:Ljava/lang/Object;
|
|
|
|
.line 99
|
|
new-instance v0, Ljava/util/HashSet;
|
|
|
|
invoke-direct {v0}, Ljava/util/HashSet;-><init>()V
|
|
|
|
sput-object v0, Landroid/support/v4/app/NotificationManagerCompat;->b:Ljava/util/Set;
|
|
|
|
.line 104
|
|
new-instance v0, Ljava/lang/Object;
|
|
|
|
invoke-direct {v0}, Ljava/lang/Object;-><init>()V
|
|
|
|
sput-object v0, Landroid/support/v4/app/NotificationManagerCompat;->e:Ljava/lang/Object;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private constructor <init>(Landroid/content/Context;)V
|
|
.locals 1
|
|
|
|
.line 154
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
.line 155
|
|
iput-object p1, p0, Landroid/support/v4/app/NotificationManagerCompat;->c:Landroid/content/Context;
|
|
|
|
.line 156
|
|
iget-object p1, p0, Landroid/support/v4/app/NotificationManagerCompat;->c:Landroid/content/Context;
|
|
|
|
const-string v0, "notification"
|
|
|
|
invoke-virtual {p1, v0}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Landroid/app/NotificationManager;
|
|
|
|
iput-object p1, p0, Landroid/support/v4/app/NotificationManagerCompat;->d:Landroid/app/NotificationManager;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static a(Landroid/content/Context;)Landroid/support/v4/app/NotificationManagerCompat;
|
|
.locals 1
|
|
|
|
.line 151
|
|
new-instance v0, Landroid/support/v4/app/NotificationManagerCompat;
|
|
|
|
invoke-direct {v0, p0}, Landroid/support/v4/app/NotificationManagerCompat;-><init>(Landroid/content/Context;)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public a()Z
|
|
.locals 11
|
|
|
|
.line 218
|
|
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
|
|
|
|
const/16 v1, 0x18
|
|
|
|
if-lt v0, v1, :cond_0
|
|
|
|
.line 219
|
|
iget-object v0, p0, Landroid/support/v4/app/NotificationManagerCompat;->d:Landroid/app/NotificationManager;
|
|
|
|
invoke-virtual {v0}, Landroid/app/NotificationManager;->areNotificationsEnabled()Z
|
|
|
|
move-result v0
|
|
|
|
return v0
|
|
|
|
.line 220
|
|
:cond_0
|
|
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
|
|
|
|
const/16 v1, 0x13
|
|
|
|
const/4 v2, 0x1
|
|
|
|
if-lt v0, v1, :cond_2
|
|
|
|
.line 221
|
|
iget-object v0, p0, Landroid/support/v4/app/NotificationManagerCompat;->c:Landroid/content/Context;
|
|
|
|
const-string v1, "appops"
|
|
|
|
.line 222
|
|
invoke-virtual {v0, v1}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Landroid/app/AppOpsManager;
|
|
|
|
.line 223
|
|
iget-object v1, p0, Landroid/support/v4/app/NotificationManagerCompat;->c:Landroid/content/Context;
|
|
|
|
invoke-virtual {v1}, Landroid/content/Context;->getApplicationInfo()Landroid/content/pm/ApplicationInfo;
|
|
|
|
move-result-object v1
|
|
|
|
.line 224
|
|
iget-object v3, p0, Landroid/support/v4/app/NotificationManagerCompat;->c:Landroid/content/Context;
|
|
|
|
invoke-virtual {v3}, Landroid/content/Context;->getApplicationContext()Landroid/content/Context;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {v3}, Landroid/content/Context;->getPackageName()Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
.line 225
|
|
iget v1, v1, Landroid/content/pm/ApplicationInfo;->uid:I
|
|
|
|
.line 227
|
|
:try_start_0
|
|
const-class v4, Landroid/app/AppOpsManager;
|
|
|
|
invoke-virtual {v4}, Ljava/lang/Class;->getName()Ljava/lang/String;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-static {v4}, Ljava/lang/Class;->forName(Ljava/lang/String;)Ljava/lang/Class;
|
|
|
|
move-result-object v4
|
|
|
|
const-string v5, "checkOpNoThrow"
|
|
|
|
const/4 v6, 0x3
|
|
|
|
.line 228
|
|
new-array v7, v6, [Ljava/lang/Class;
|
|
|
|
sget-object v8, Ljava/lang/Integer;->TYPE:Ljava/lang/Class;
|
|
|
|
const/4 v9, 0x0
|
|
|
|
aput-object v8, v7, v9
|
|
|
|
sget-object v8, Ljava/lang/Integer;->TYPE:Ljava/lang/Class;
|
|
|
|
aput-object v8, v7, v2
|
|
|
|
const-class v8, Ljava/lang/String;
|
|
|
|
const/4 v10, 0x2
|
|
|
|
aput-object v8, v7, v10
|
|
|
|
invoke-virtual {v4, v5, v7}, Ljava/lang/Class;->getMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
|
|
|
|
move-result-object v5
|
|
|
|
const-string v7, "OP_POST_NOTIFICATION"
|
|
|
|
.line 230
|
|
invoke-virtual {v4, v7}, Ljava/lang/Class;->getDeclaredField(Ljava/lang/String;)Ljava/lang/reflect/Field;
|
|
|
|
move-result-object v4
|
|
|
|
.line 231
|
|
const-class v7, Ljava/lang/Integer;
|
|
|
|
invoke-virtual {v4, v7}, Ljava/lang/reflect/Field;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v4
|
|
|
|
check-cast v4, Ljava/lang/Integer;
|
|
|
|
invoke-virtual {v4}, Ljava/lang/Integer;->intValue()I
|
|
|
|
move-result v4
|
|
|
|
.line 232
|
|
new-array v6, v6, [Ljava/lang/Object;
|
|
|
|
invoke-static {v4}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v4
|
|
|
|
aput-object v4, v6, v9
|
|
|
|
invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v1
|
|
|
|
aput-object v1, v6, v2
|
|
|
|
aput-object v3, v6, v10
|
|
|
|
invoke-virtual {v5, v0, v6}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Ljava/lang/Integer;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I
|
|
|
|
move-result v0
|
|
:try_end_0
|
|
.catch Ljava/lang/ClassNotFoundException; {:try_start_0 .. :try_end_0} :catch_0
|
|
.catch Ljava/lang/NoSuchMethodException; {:try_start_0 .. :try_end_0} :catch_0
|
|
.catch Ljava/lang/NoSuchFieldException; {:try_start_0 .. :try_end_0} :catch_0
|
|
.catch Ljava/lang/reflect/InvocationTargetException; {:try_start_0 .. :try_end_0} :catch_0
|
|
.catch Ljava/lang/IllegalAccessException; {:try_start_0 .. :try_end_0} :catch_0
|
|
.catch Ljava/lang/RuntimeException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
const/4 v2, 0x0
|
|
|
|
:goto_0
|
|
return v2
|
|
|
|
:catch_0
|
|
return v2
|
|
|
|
:cond_2
|
|
return v2
|
|
.end method
|