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/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/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/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/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/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.java279 protected int verifyAndInsert(ComponentName cn, Bundle extras) { in verifyAndInsert() argument
281 mPackageManager.getReceiverInfo(cn, 0); in verifyAndInsert()
284 new String[] { cn.getPackageName() }); in verifyAndInsert()
285 cn = new ComponentName(packages[0], cn.getClassName()); in verifyAndInsert()
287 mPackageManager.getReceiverInfo(cn, 0); in verifyAndInsert()
289 Log.d(TAG, "Can't find widget provider: " + cn.getClassName()); in verifyAndInsert()
299 if (!appWidgetManager.bindAppWidgetIdIfAllowed(appWidgetId, cn)) { in verifyAndInsert()
300 Log.e(TAG, "Unable to bind app widget id " + cn); in verifyAndInsert()
306 mValues.put(Favorites.APPWIDGET_PROVIDER, cn.flattenToString()); in verifyAndInsert()
317 intent.setComponent(cn); in verifyAndInsert()
DAutoInstallsLayout.java344 ComponentName cn; in parseAndAdd() local
346 cn = new ComponentName(packageName, className); in parseAndAdd()
347 info = mPackageManager.getActivityInfo(cn, 0); in parseAndAdd()
351 cn = new ComponentName(packages[0], className); in parseAndAdd()
352 info = mPackageManager.getActivityInfo(cn, 0); in parseAndAdd()
356 .setComponent(cn) in parseAndAdd()
512 protected int verifyAndInsert(ComponentName cn, Bundle extras) { in verifyAndInsert() argument
513 mValues.put(Favorites.APPWIDGET_PROVIDER, cn.flattenToString()); in verifyAndInsert()
/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/src/com/android/settings/gestures/
DSystemNavigationPreferenceController.java106 final ComponentName cn = context.getPackageManager().getHomeActivities(new ArrayList<>()); in isGestureNavSupportedByDefaultLauncher() local
107 if (cn == null) { in isGestureNavSupportedByDefaultLauncher()
113 return recentsComponentName.getPackageName().equals(cn.getPackageName()); in isGestureNavSupportedByDefaultLauncher()
118 final ComponentName cn = pm.getHomeActivities(new ArrayList<>()); in getDefaultHomeAppName() local
119 if (cn != null) { in getDefaultHomeAppName()
121 ApplicationInfo ai = pm.getApplicationInfo(cn.getPackageName(), 0); in getDefaultHomeAppName()
/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.java202 ComponentName cn = si.getTargetComponent(); in execute() local
203 if (cn != null && matcher.matches(si, cn)) { in execute()
204 String packageName = cn.getPackageName(); in execute()
218 cn.getPackageName(), in execute()
226 } else if (!cn.getClassName().equals(IconCache.EMPTY_CLASS_NAME)) { in execute()
228 .isActivityEnabledForProfile(cn, mUser); in execute()
247 } 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/Launcher3/quickstep/recents_ui_overrides/src/com/android/launcher3/appprediction/
DPredictionAppTracker.java182 public void onStartApp(ComponentName cn, UserHandle user, String container) { in onStartApp() argument
183 if (cn != null) { in onStartApp()
185 .Builder(new AppTargetId("app:" + cn), cn.getPackageName(), user) in onStartApp()
186 .setClassName(cn.getClassName()) in onStartApp()
/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 AppTarget.Builder(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