Lines Matching refs:activity
140 public void onAttach(Activity activity) { in onAttach() argument
141 super.onAttach(activity); in onAttach()
143 (DevicePolicyManager) activity.getSystemService(Activity.DEVICE_POLICY_SERVICE); in onAttach()
155 Activity activity = getActivity(); in onResume() local
156 if (activity != null) { in onResume()
157 retrieveCurrentSettings(activity); in onResume()
166 private void retrieveCurrentSettings(Activity activity) { in retrieveCurrentSettings() argument
169 getBooleanGlobalSetting(activity.getContentResolver(), Settings.Global.AUTO_TIME)); in retrieveCurrentSettings()
171 getBooleanGlobalSetting(activity.getContentResolver(), in retrieveCurrentSettings()
177 List<ResolveInfo> list = activity.getPackageManager() in retrieveCurrentSettings()
179 mAdapter = new LauncherAdapter(activity, list); in retrieveCurrentSettings()
181 String packageName = loadPersistentPreferredLauncher(activity); in retrieveCurrentSettings()
247 private static String loadPersistentPreferredLauncher(Activity activity) { in loadPersistentPreferredLauncher() argument
248 return activity.getSharedPreferences(PREFS_DEVICE_OWNER, Context.MODE_PRIVATE) in loadPersistentPreferredLauncher()
258 private static void savePersistentPreferredLauncher(Activity activity, String packageName) { in savePersistentPreferredLauncher() argument
259 SharedPreferences.Editor editor = activity.getSharedPreferences(PREFS_DEVICE_OWNER, in savePersistentPreferredLauncher()
273 Activity activity = getActivity(); in setPreferredLauncher() local
274 if (activity == null) { in setPreferredLauncher()
283 DeviceOwnerReceiver.getComponentName(activity), filter, componentName); in setPreferredLauncher()
284 savePersistentPreferredLauncher(activity, componentName.getPackageName()); in setPreferredLauncher()
291 Activity activity = getActivity(); in clearPreferredLauncher() local
292 if (activity == null) { in clearPreferredLauncher()
296 DeviceOwnerReceiver.getComponentName(activity), in clearPreferredLauncher()
297 loadPersistentPreferredLauncher(activity)); in clearPreferredLauncher()
298 savePersistentPreferredLauncher(activity, null); in clearPreferredLauncher()