Home
last modified time | relevance | path

Searched refs:cn (Results 1 – 25 of 91) sorted by relevance

1234

/packages/apps/Launcher3/src/com/android/launcher3/util/
DItemInfoMatcher.java36 boolean matches(ItemInfo info, ComponentName cn); in matches() argument
46 ComponentName cn = info.getTargetComponent(); in filterItemInfos() local
47 if (cn != null && matches(info, cn)) { in filterItemInfos()
53 ComponentName cn = s.getTargetComponent(); in filterItemInfos() local
54 if (cn != null && matches(s, cn)) { in filterItemInfos()
60 ComponentName cn = info.providerName; in filterItemInfos() local
61 if (cn != null && matches(info, cn)) { in filterItemInfos()
73 return (info, cn) -> matches(info, cn) || matcher.matches(info, cn); in or()
80 return (info, cn) -> matches(info, cn) && matcher.matches(info, cn); in and()
88 return (info, cn) -> !matcher.matches(info, cn); in not()
[all …]
/packages/apps/Launcher3/quickstep/recents_ui_overrides/src/com/android/launcher3/appprediction/
DPredictionAppTracker.java212 public void onStartApp(ComponentName cn, UserHandle user, String container) { in onStartApp() argument
213 if (cn != null) { in onStartApp()
215 new AppTargetId("app:" + cn), cn.getPackageName(), user) in onStartApp()
216 .setClassName(cn.getClassName()) in onStartApp()
223 cn, in onStartApp()
232 public void onDismissApp(ComponentName cn, UserHandle user, String container) { in onDismissApp() argument
233 if (cn == null) return; in onDismissApp()
235 new AppTargetId("app: " + cn), cn.getPackageName(), user) in onDismissApp()
236 .setClassName(cn.getClassName()) in onDismissApp()
243 cn, in onDismissApp()
/packages/apps/Settings/src/com/android/settings/applications/assist/
DDefaultAssistPreferenceController.java69 final ComponentName cn = mAssistUtils.getAssistComponentForUser(mUserId); in getSettingIntent() local
70 if (cn == null) { in getSettingIntent()
74 .setPackage(cn.getPackageName()); in getSettingIntent()
81 final String activity = getAssistSettingsActivity(cn, services.get(0), mPackageManager); in getSettingIntent()
86 .setComponent(new ComponentName(cn.getPackageName(), activity)); in getSettingIntent()
112 final ComponentName cn = mAssistUtils.getAssistComponentForUser(mUserId); in getDefaultAppInfo() local
113 if (cn == null) { in getDefaultAppInfo()
116 return new DefaultAppInfo(mContext, mPackageManager, mUserId, cn); in getDefaultAppInfo()
120 String getAssistSettingsActivity(ComponentName cn, ResolveInfo resolveInfo, PackageManager pm) { in getAssistSettingsActivity() argument
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/applications/assist/
DDefaultAssistPreferenceController.java69 final ComponentName cn = mAssistUtils.getAssistComponentForUser(mUserId); in getSettingIntent() local
70 if (cn == null) { in getSettingIntent()
74 .setPackage(cn.getPackageName()); in getSettingIntent()
81 final String activity = getAssistSettingsActivity(cn, services.get(0), mPackageManager); in getSettingIntent()
86 .setComponent(new ComponentName(cn.getPackageName(), activity)); in getSettingIntent()
112 final ComponentName cn = mAssistUtils.getAssistComponentForUser(mUserId); in getDefaultAppInfo() local
113 if (cn == null) { in getDefaultAppInfo()
116 return new DefaultAppInfo(mContext, mPackageManager, mUserId, cn); in getDefaultAppInfo()
120 String getAssistSettingsActivity(ComponentName cn, ResolveInfo resolveInfo, PackageManager pm) { in getAssistSettingsActivity() argument
/packages/apps/Settings/src/com/android/settings/notification/
DNotificationAccessSettings.java119 protected boolean isServiceEnabled(ComponentName cn) { in isServiceEnabled() argument
120 return mNm.isNotificationListenerAccessGranted(cn); in isServiceEnabled()
141 private static void disable(final NotificationAccessSettings parent, final ComponentName cn) { in disable() argument
142 parent.mNm.setNotificationListenerAccessGranted(cn, false); in disable()
145 cn.getPackageName())) { in disable()
146 parent.mNm.removeAutomaticZenRules(cn.getPackageName()); in disable()
155 public FriendlyWarningDialogFragment setServiceInfo(ComponentName cn, String label, in setServiceInfo() argument
158 args.putString(KEY_COMPONENT, cn.flattenToString()); in setServiceInfo()
174 final ComponentName cn = ComponentName.unflattenFromString(args in onCreateDialog() local
184 (dialog, id) -> disable(parent, cn)) in onCreateDialog()
DNotificationAssistantPicker.java91 ComponentName cn = mNotificationBackend.getAllowedNotificationAssistant(); in getDefaultKey() local
92 return (cn != null) ? cn.flattenToString() : ""; in getDefaultKey()
123 final ComponentName cn = new ComponentName(service.packageName, service.name); in onServicesReloaded() local
124 list.add(new DefaultAppInfo(mContext, mPm, mUserId, cn)); in onServicesReloaded()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/notification/
DNotificationAccessSettings.java119 protected boolean isServiceEnabled(ComponentName cn) { in isServiceEnabled() argument
120 return mNm.isNotificationListenerAccessGranted(cn); in isServiceEnabled()
141 private static void disable(final NotificationAccessSettings parent, final ComponentName cn) { in disable() argument
142 parent.mNm.setNotificationListenerAccessGranted(cn, false); in disable()
145 cn.getPackageName())) { in disable()
146 parent.mNm.removeAutomaticZenRules(cn.getPackageName()); in disable()
155 public FriendlyWarningDialogFragment setServiceInfo(ComponentName cn, String label, in setServiceInfo() argument
158 args.putString(KEY_COMPONENT, cn.flattenToString()); in setServiceInfo()
174 final ComponentName cn = ComponentName.unflattenFromString(args in onCreateDialog() local
184 (dialog, id) -> disable(parent, cn)) in onCreateDialog()
DNotificationAssistantPicker.java91 ComponentName cn = mNotificationBackend.getAllowedNotificationAssistant(); in getDefaultKey() local
92 return (cn != null) ? cn.flattenToString() : ""; in getDefaultKey()
123 final ComponentName cn = new ComponentName(service.packageName, service.name); in onServicesReloaded() local
124 list.add(new DefaultAppInfo(mContext, mPm, mUserId, cn)); in onServicesReloaded()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/utils/
DManagedServiceSettings.java116 final ComponentName cn = new ComponentName(service.packageName, service.name); in updateList() local
137 pref.setKey(cn.flattenToString()); in updateList()
138 pref.setChecked(isServiceEnabled(cn)); in updateList()
147 return setEnabled(cn, finalTitle.toString(), enable); in updateList()
149 return setEnabled(cn, null, enable); in updateList()
152 pref.setKey(cn.flattenToString()); in updateList()
165 protected boolean isServiceEnabled(ComponentName cn) { in isServiceEnabled() argument
166 return mServiceListing.isEnabled(cn); in isServiceEnabled()
199 public ScaryWarningDialogFragment setServiceInfo(ComponentName cn, String label, in setServiceInfo() argument
202 args.putString(KEY_COMPONENT, cn.flattenToString()); in setServiceInfo()
[all …]
/packages/apps/Settings/src/com/android/settings/utils/
DManagedServiceSettings.java116 final ComponentName cn = new ComponentName(service.packageName, service.name); in updateList() local
137 pref.setKey(cn.flattenToString()); in updateList()
138 pref.setChecked(isServiceEnabled(cn)); in updateList()
147 return setEnabled(cn, finalTitle.toString(), enable); in updateList()
149 return setEnabled(cn, null, enable); in updateList()
152 pref.setKey(cn.flattenToString()); in updateList()
165 protected boolean isServiceEnabled(ComponentName cn) { in isServiceEnabled() argument
166 return mServiceListing.isEnabled(cn); in isServiceEnabled()
199 public ScaryWarningDialogFragment setServiceInfo(ComponentName cn, String label, in setServiceInfo() argument
202 args.putString(KEY_COMPONENT, cn.flattenToString()); in setServiceInfo()
[all …]
/packages/apps/Car/Settings/src/com/android/car/settings/applications/assist/
DDefaultVoiceInputPickerPreferenceController.java53 ComponentName cn = mAssistUtils.getAssistComponentForUser(getCurrentProcessUserId()); in DefaultVoiceInputPickerPreferenceController() local
54 if (cn != null) { in DefaultVoiceInputPickerPreferenceController()
55 mAssistComponentName = cn.flattenToString(); in DefaultVoiceInputPickerPreferenceController()
84 ComponentName cn = VoiceInputUtils.getCurrentService(getContext()); in getCurrentDefaultKey() local
85 if (cn == null) { in getCurrentDefaultKey()
88 return cn.flattenToString(); in getCurrentDefaultKey()
93 ComponentName cn = ComponentName.unflattenFromString(key); in setCurrentDefault() local
95 cn); in setCurrentDefault()
DManageAssistEntryPreferenceController.java52 ComponentName cn = mAssistUtils.getAssistComponentForUser(getCurrentProcessUserId()); in getCurrentDefaultAppInfo() local
53 if (cn == null) { in getCurrentDefaultAppInfo()
57 getCurrentProcessUserId(), cn); in getCurrentDefaultAppInfo()
/packages/apps/Launcher3/src/com/android/launcher3/
DDefaultLayoutParser.java286 protected int verifyAndInsert(ComponentName cn, Bundle extras) { in verifyAndInsert() argument
288 mPackageManager.getReceiverInfo(cn, 0); in verifyAndInsert()
291 new String[]{cn.getPackageName()}); in verifyAndInsert()
292 cn = new ComponentName(packages[0], cn.getClassName()); in verifyAndInsert()
294 mPackageManager.getReceiverInfo(cn, 0); in verifyAndInsert()
296 Log.d(TAG, "Can't find widget provider: " + cn.getClassName()); in verifyAndInsert()
306 if (!appWidgetManager.bindAppWidgetIdIfAllowed(appWidgetId, cn)) { in verifyAndInsert()
307 Log.e(TAG, "Unable to bind app widget id " + cn); in verifyAndInsert()
313 mValues.put(Favorites.APPWIDGET_PROVIDER, cn.flattenToString()); in verifyAndInsert()
324 intent.setComponent(cn); in verifyAndInsert()
DAutoInstallsLayout.java353 ComponentName cn; in parseAndAdd() local
355 cn = new ComponentName(packageName, className); in parseAndAdd()
356 info = mPackageManager.getActivityInfo(cn, 0); in parseAndAdd()
360 cn = new ComponentName(packages[0], className); in parseAndAdd()
361 info = mPackageManager.getActivityInfo(cn, 0); in parseAndAdd()
365 .setComponent(cn) in parseAndAdd()
495 ComponentName cn = getComponentName(parser); in parseAndAdd() local
496 if (cn == null) { in parseAndAdd()
527 return verifyAndInsert(cn, extras); in parseAndAdd()
530 protected int verifyAndInsert(ComponentName cn, Bundle extras) { in verifyAndInsert() argument
[all …]
DSecondaryDropTarget.java233 ComponentName cn = getUninstallTarget(info); in performDropAction() local
234 if (cn == null) { in performDropAction()
242 .setData(Uri.fromParts("package", cn.getPackageName(), cn.getClassName())) in performDropAction()
245 FileLog.d(TAG, "start uninstall activity " + cn.getPackageName()); in performDropAction()
246 return cn; in performDropAction()
/packages/apps/Car/Settings/src/com/android/car/settings/applications/defaultapps/
DDefaultAssistantPickerEntryPreferenceController.java61 ComponentName cn = mAssistUtils.getAssistComponentForUser(getCurrentProcessUserId()); in getCurrentDefaultAppInfo() local
62 if (cn == null) { in getCurrentDefaultAppInfo()
66 getCurrentProcessUserId(), cn); in getCurrentDefaultAppInfo()
84 ComponentName cn = mAssistUtils.getAssistComponentForUser(getCurrentProcessUserId()); in getSettingIntent() local
85 if (cn == null) { in getSettingIntent()
89 Intent probe = ASSISTANT_SERVICE.setPackage(cn.getPackageName()); in getSettingIntent()
102 new ComponentName(cn.getPackageName(), activity)); in getSettingIntent()
/packages/apps/Settings/src/com/android/settings/security/trustagent/
DTrustAgentManager.java157 String cn = null; in getSettingsComponent() local
184 cn = sa.getString(com.android.internal.R.styleable.TrustAgent_settingsActivity); in getSettingsComponent()
199 if (cn != null && cn.indexOf('/') < 0) { in getSettingsComponent()
200 cn = resolveInfo.serviceInfo.packageName + "/" + cn; in getSettingsComponent()
203 (cn == null) ? null : ComponentName.unflattenFromString(cn); in getSettingsComponent()
/packages/apps/Settings/tests/robotests/src/com/android/settings/search/
DSearchFeatureProviderImplTest.java129 final ComponentName cn = new ComponentName("pkg", "class"); in verifyLaunchSearchResultPageCaller_badCaller_shouldCrash() local
130 mProvider.verifyLaunchSearchResultPageCaller(mActivity, cn); in verifyLaunchSearchResultPageCaller_badCaller_shouldCrash()
135 final ComponentName cn = new ComponentName(mActivity.getPackageName(), "class"); in verifyLaunchSearchResultPageCaller_settingsCaller_shouldNotCrash() local
136 mProvider.verifyLaunchSearchResultPageCaller(mActivity, cn); in verifyLaunchSearchResultPageCaller_settingsCaller_shouldNotCrash()
142 final ComponentName cn = new ComponentName(packageName, "class"); in verifyLaunchSearchResultPageCaller_settingsIntelligenceCaller_shouldNotCrash() local
143 mProvider.verifyLaunchSearchResultPageCaller(mActivity, cn); in verifyLaunchSearchResultPageCaller_settingsIntelligenceCaller_shouldNotCrash()
/packages/apps/Settings/tests/robotests/src/com/android/settings/security/trustagent/
DTrustAgentsPreferenceControllerTest.java195 for (ComponentName cn : componentNames) { in createFakeAvailableAgents()
196 final ResolveInfo ri = createFakeResolveInfo(cn); in createFakeAvailableAgents()
202 private ResolveInfo createFakeResolveInfo(ComponentName cn) { in createFakeResolveInfo() argument
205 ri.serviceInfo.packageName = cn.getPackageName(); in createFakeResolveInfo()
206 ri.serviceInfo.name = cn.getClassName(); in createFakeResolveInfo()
208 ri.serviceInfo.applicationInfo.packageName = cn.getPackageName(); in createFakeResolveInfo()
209 ri.serviceInfo.applicationInfo.name = cn.getClassName(); in createFakeResolveInfo()
/packages/apps/Launcher3/src/com/android/launcher3/model/
DPackageUpdatedTask.java199 ComponentName cn = si.getTargetComponent(); in execute() local
200 if (cn != null && matcher.matches(si, cn)) { in execute()
201 String packageName = cn.getPackageName(); in execute()
215 cn.getPackageName(), in execute()
223 } else if (!cn.getClassName().equals(IconCache.EMPTY_CLASS_NAME)) { in execute()
225 .isActivityEnabledForProfile(cn, mUser); in execute()
243 } else if (isNewApkAvailable && removedComponents.contains(cn)) { in execute()
/packages/apps/Launcher3/tests/src/com/android/launcher3/model/
DLoaderCursorTest.java103 ComponentName cn = new ComponentName(mContext.getPackageName(), "dummy-do"); in getAppShortcutInfo_dontAllowMissing_invalidComponent() local
105 new Intent().setComponent(cn), false /* allowMissingTarget */, true)); in getAppShortcutInfo_dontAllowMissing_invalidComponent()
113 ComponentName cn = mLauncherApps.getActivityList(null, mLoaderCursor.user) in getAppShortcutInfo_dontAllowMissing_validComponent() local
116 new Intent().setComponent(cn), false /* allowMissingTarget */, true); in getAppShortcutInfo_dontAllowMissing_validComponent()
126 ComponentName cn = new ComponentName(mContext.getPackageName(), "dummy-do"); in getAppShortcutInfo_allowMissing_invalidComponent() local
128 new Intent().setComponent(cn), true /* allowMissingTarget */, true); in getAppShortcutInfo_allowMissing_invalidComponent()
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/accessibility/
DAccessibilityServiceConfirmationFragment.java60 public static AccessibilityServiceConfirmationFragment newInstance(ComponentName cn, in newInstance() argument
63 prepareArgs(args, cn, label, enabling); in newInstance()
77 public static void prepareArgs(@NonNull Bundle args, ComponentName cn, CharSequence label, in prepareArgs() argument
79 args.putParcelable(ARG_COMPONENT, cn); in prepareArgs()
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/device/apps/specialaccess/
DNotificationAccess.java111 final ComponentName cn = new ComponentName(service.packageName, service.name); in updateList() local
131 pref.setKey(cn.flattenToString()); in updateList()
132 pref.setChecked(mNotificationManager.isNotificationListenerAccessGranted(cn)); in updateList()
135 mNotificationManager.setNotificationListenerAccessGranted(cn, enable); in updateList()
/packages/apps/Launcher3/quickstep/tests/src/com/android/quickstep/
DAppPredictionsUITests.java152 ComponentName cn = info.getComponentName(); in sendPredictionUpdate() local
154 new AppTargetId("app:" + cn), cn.getPackageName(), info.getUser()) in sendPredictionUpdate()
155 .setClassName(cn.getClassName()) in sendPredictionUpdate()
/packages/apps/Launcher3/quickstep/src/com/android/quickstep/
DInstantAppResolverImpl.java49 ComponentName cn = info.getTargetComponent(); in isInstantApp() local
50 return cn != null && cn.getClassName().equals(COMPONENT_CLASS_MARKER); in isInstantApp()

1234