Lines Matching refs:context
26 public static ComponentName getComponent(Context context) { in getComponent() argument
27 return new ComponentName(context, MyAdmin.class); in getComponent()
30 public static boolean isEnabled(Context context) { in isEnabled() argument
31 return ((DevicePolicyManager) (context.getSystemService(Context.DEVICE_POLICY_SERVICE))) in isEnabled()
32 .isAdminActive(getComponent(context)); in isEnabled()
35 public static void disable(Context context) { in disable() argument
36 ((DevicePolicyManager) (context.getSystemService(Context.DEVICE_POLICY_SERVICE))) in disable()
37 .removeActiveAdmin(getComponent(context)); in disable()
41 public void onEnabled(Context context, Intent intent) { in onEnabled() argument
42 MyMain.restart(context); in onEnabled()
46 public void onDisabled(Context context, Intent intent) { in onDisabled() argument
47 MyMain.restart(context); in onDisabled()