ct.java
1.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
import android.annotation.TargetApi;
import android.app.AppOpsManager;
import android.content.Context;
import android.content.pm.ApplicationInfo;
import android.support.annotation.RequiresApi;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
@TargetApi(19)
@RequiresApi(19)
public final class ct
{
public static boolean a(Context paramContext)
{
AppOpsManager localAppOpsManager = (AppOpsManager)paramContext.getSystemService("appops");
Object localObject = paramContext.getApplicationInfo();
paramContext = paramContext.getApplicationContext().getPackageName();
int i = ((ApplicationInfo)localObject).uid;
try
{
localObject = Class.forName(AppOpsManager.class.getName());
i = ((Integer)((Class)localObject).getMethod("checkOpNoThrow", new Class[] { Integer.TYPE, Integer.TYPE, String.class }).invoke(localAppOpsManager, new Object[] { Integer.valueOf(((Integer)((Class)localObject).getDeclaredField("OP_POST_NOTIFICATION").get(Integer.class)).intValue()), Integer.valueOf(i), paramContext })).intValue();
return i == 0;
}
catch (ClassNotFoundException paramContext)
{
return true;
}
catch (RuntimeException paramContext)
{
for (;;) {}
}
catch (NoSuchFieldException paramContext)
{
for (;;) {}
}
catch (IllegalAccessException paramContext)
{
for (;;) {}
}
catch (NoSuchMethodException paramContext)
{
for (;;) {}
}
catch (InvocationTargetException paramContext)
{
for (;;) {}
}
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/ct.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/