Lines Matching refs:activity

98     public void onAttach(Activity activity) {  in onAttach()  argument
99 super.onAttach(activity); in onAttach()
113 Activity activity = getActivity(); in isApplicationEnabled() local
114 PackageManager packageManager = activity.getPackageManager(); in isApplicationEnabled()
124 (DevicePolicyManager) activity.getSystemService(Activity.DEVICE_POLICY_SERVICE); in isApplicationEnabled()
126 BasicDeviceAdminReceiver.getComponentName(activity), packageName); in isApplicationEnabled()
204 Activity activity = getActivity(); in setAppEnabled() local
205 if (null == activity) { in setAppEnabled()
208 PackageManager packageManager = activity.getPackageManager(); in setAppEnabled()
210 (DevicePolicyManager) activity.getSystemService(Context.DEVICE_POLICY_SERVICE); in setAppEnabled()
221 BasicDeviceAdminReceiver.getComponentName(activity), packageName); in setAppEnabled()
231 BasicDeviceAdminReceiver.getComponentName(activity), packageName, !enabled); in setAppEnabled()
233 Toast.makeText(activity, enabled ? R.string.enabled : R.string.disabled, in setAppEnabled()
244 final Activity activity = getActivity(); in setChromeRestrictions() local
245 if (null == activity) { in setChromeRestrictions()
249 (DevicePolicyManager) activity.getSystemService(Context.DEVICE_POLICY_SERVICE); in setChromeRestrictions()
268 ScrollView view = new ScrollView(activity); in setChromeRestrictions()
269 TextView text = new TextView(activity); in setChromeRestrictions()
271 int size = (int) activity.getResources().getDimension(R.dimen.activity_horizontal_margin); in setChromeRestrictions()
274 new AlertDialog.Builder(activity) in setChromeRestrictions()
283 (BasicDeviceAdminReceiver.getComponentName(activity), in setChromeRestrictions()
285 Toast.makeText(activity, R.string.restrictions_set, in setChromeRestrictions()
296 final Activity activity = getActivity(); in clearChromeRestrictions() local
297 if (null == activity) { in clearChromeRestrictions()
301 (DevicePolicyManager) activity.getSystemService(Context.DEVICE_POLICY_SERVICE); in clearChromeRestrictions()
305 (BasicDeviceAdminReceiver.getComponentName(activity), in clearChromeRestrictions()
307 Toast.makeText(activity, R.string.cleared, Toast.LENGTH_SHORT).show(); in clearChromeRestrictions()
314 Activity activity = getActivity(); in enableForwarding() local
315 if (null == activity || activity.isFinishing()) { in enableForwarding()
319 (DevicePolicyManager) activity.getSystemService(Context.DEVICE_POLICY_SERVICE); in enableForwarding()
325 manager.addCrossProfileIntentFilter(BasicDeviceAdminReceiver.getComponentName(activity), in enableForwarding()
336 Activity activity = getActivity(); in disableForwarding() local
337 if (null == activity || activity.isFinishing()) { in disableForwarding()
341 (DevicePolicyManager) activity.getSystemService(Context.DEVICE_POLICY_SERVICE); in disableForwarding()
342 manager.clearCrossProfileIntentFilters(BasicDeviceAdminReceiver.getComponentName(activity)); in disableForwarding()
350 Activity activity = getActivity(); in sendIntent() local
351 if (null == activity || activity.isFinishing()) { in sendIntent()
355 (DevicePolicyManager) activity.getSystemService(Context.DEVICE_POLICY_SERVICE); in sendIntent()
359 manager.isProfileOwnerApp(activity.getApplicationContext().getPackageName()) in sendIntent()
365 Toast.makeText(activity, R.string.activity_not_found, Toast.LENGTH_SHORT).show(); in sendIntent()
373 Activity activity = getActivity(); in removeProfile() local
374 if (null == activity || activity.isFinishing()) { in removeProfile()
378 (DevicePolicyManager) activity.getSystemService(Context.DEVICE_POLICY_SERVICE); in removeProfile()