Home
last modified time | relevance | path

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

12345

/packages/apps/Settings/src/com/android/settings/applications/specialaccess/notificationaccess/
DApprovalPreferenceController.java57 public ApprovalPreferenceController setCn(ComponentName cn) { in setCn() argument
58 mCn = cn; in setCn()
139 public void disable(final ComponentName cn) { in disable() argument
140 logSpecialPermissionChange(true, cn.getPackageName()); in disable()
141 mNm.setNotificationListenerAccessGranted(cn, false); in disable()
143 cn.getPackageName())) { in disable()
145 mNm.removeAutomaticZenRules(cn.getPackageName(), /* fromUser= */ true); in disable()
147 mNm.removeAutomaticZenRules(cn.getPackageName()); in disable()
152 protected void enable(ComponentName cn) { in enable() argument
153 logSpecialPermissionChange(true, cn.getPackageName()); in enable()
[all …]
DScaryWarningDialogFragment.java47 public ScaryWarningDialogFragment setServiceInfo(ComponentName cn, CharSequence label, in setServiceInfo() argument
50 args.putString(KEY_COMPONENT, cn.flattenToString()); in setServiceInfo()
61 final ComponentName cn = ComponentName.unflattenFromString(args in onCreateDialog() local
66 .setView(getDialogView(getContext(), label, parent, cn)) in onCreateDialog()
72 NotificationAccessDetails parent, ComponentName cn) { in getDialogView() argument
80 icon = context.getPackageManager().getApplicationIcon(cn.getPackageName()); in getDialogView()
101 parent.enable(cn); in getDialogView()
DFriendlyWarningDialogFragment.java34 public FriendlyWarningDialogFragment setServiceInfo(ComponentName cn, CharSequence label, in setServiceInfo() argument
37 args.putString(KEY_COMPONENT, cn.flattenToString()); in setServiceInfo()
53 final ComponentName cn = ComponentName.unflattenFromString(args in onCreateDialog() local
66 parent.disable(cn); in onCreateDialog()
DNotificationAccessDetails.java82 String cn = intent.getStringExtra(Settings.EXTRA_NOTIFICATION_LISTENER_COMPONENT_NAME); in onAttach() local
83 if (cn != null) { in onAttach()
84 mComponentName = ComponentName.unflattenFromString(cn); in onAttach()
257 public void disable(final ComponentName cn) { in disable() argument
260 apc.disable(cn); in disable()
269 protected void enable(ComponentName cn) { in enable() argument
272 apc.enable(cn); in enable()
/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/
DNotificationAssistantPreferenceController.java63 ComponentName cn = isChecked in setChecked() local
69 showDialog(cn); in setChecked()
82 protected void setNotificationAssistantGranted(ComponentName cn) { in setNotificationAssistantGranted() argument
85 mNotificationBackend.setNASMigrationDoneAndResetDefault(mUserId, cn != null); in setNotificationAssistantGranted()
87 mNotificationBackend.setNotificationAssistantGranted(cn); in setNotificationAssistantGranted()
90 protected void showDialog(ComponentName cn) { in showDialog() argument
92 NotificationAssistantDialogFragment.newInstance(mFragment, cn); in showDialog()
DNotificationAssistantDialogFragment.java36 ComponentName cn) { in newInstance() argument
40 args.putString(KEY_COMPONENT, cn == null ? "" : cn.flattenToString()); in newInstance()
66 final ComponentName cn = ComponentName.unflattenFromString(args in onClick() local
69 parent.enableNAS(cn); in onClick()
DNotificationAssistantPicker.java87 ComponentName cn = mNotificationBackend.getAllowedNotificationAssistant(); in getDefaultKey() local
88 return (cn != null) ? cn.flattenToString() : ""; in getDefaultKey()
119 final ComponentName cn = new ComponentName(service.packageName, service.name); in onServicesReloaded() local
120 list.add(new DefaultAppInfo(mContext, mPm, mUserId, cn)); in onServicesReloaded()
DNotificationAccessSettings.java150 final ComponentName cn = new ComponentName(service.packageName, service.name); in updateList() local
151 boolean isAllowed = mNm.isNotificationListenerAccessGranted(cn); in updateList()
152 if (!isAllowed && cn.flattenToString().length() in updateList()
170 pref.setKey(cn.flattenToString()); in updateList()
186 args.putString(AppInfoBase.ARG_PACKAGE_NAME, cn.getPackageName()); in updateList()
191 cn.flattenToString()); in updateList()
203 pref.setKey(cn.flattenToString()); in updateList()
/packages/apps/Car/Settings/src/com/android/car/settings/applications/assist/
DDefaultVoiceInputPickerPreferenceController.java62 ComponentName cn = mAssistUtils.getAssistComponentForUser(getCurrentProcessUserId()); in DefaultVoiceInputPickerPreferenceController() local
63 if (cn != null) { in DefaultVoiceInputPickerPreferenceController()
64 mAssistComponentName = cn.flattenToString(); in DefaultVoiceInputPickerPreferenceController()
93 ComponentName cn = VoiceInputUtils.getCurrentService(getContext()); in getCurrentDefaultKey() local
94 if (cn == null) { in getCurrentDefaultKey()
97 return cn.flattenToString(); in getCurrentDefaultKey()
102 ComponentName cn = ComponentName.unflattenFromString(key); in setCurrentDefault() local
104 cn); in setCurrentDefault()
/packages/apps/TvSettings/SettingsAPI/java/com/android/tv/settings/library/device/apps/specialaccess/
DServiceListing.java103 for (ComponentName cn : mEnabledServices) { in saveEnabledServices()
109 sb.append(cn.flattenToString()); in saveEnabledServices()
121 final ComponentName cn = ComponentName.unflattenFromString(name); in loadEnabledServices() local
122 if (cn != null) { in loadEnabledServices()
123 mEnabledServices.add(cn); in loadEnabledServices()
164 public boolean isEnabled(ComponentName cn) { in isEnabled() argument
165 return mEnabledServices.contains(cn); in isEnabled()
168 public void setEnabled(ComponentName cn, boolean enabled) { in setEnabled() argument
170 mEnabledServices.add(cn); in setEnabled()
172 mEnabledServices.remove(cn); in setEnabled()
DNotificationAccessState.java102 final ComponentName cn = new ComponentName(service.packageName, service.name); in updateList() local
112 final PreferenceCompat pref = new PreferenceCompat(cn.flattenToString()); in updateList()
121 pref.setChecked(mNotificationManager.isNotificationListenerAccessGranted(cn)); in updateList()
123 if (mDefaultPackages.contains(cn.getPackageName()) && ManagerUtil.isChecked(pref)) { in updateList()
131 mComponentNameByKey.put(pref.getKey()[0], cn); in updateList() local
143 final ComponentName cn = mComponentNameByKey.get(key[0]); in onPreferenceChange() local
144 if (cn != null) { in onPreferenceChange()
145 mNotificationManager.setNotificationListenerAccessGranted(cn, (boolean) newValue); in onPreferenceChange()
/packages/apps/Settings/tests/robotests/src/com/android/settings/notification/
DNotificationAccessConfirmationActivityTest.java49 ComponentName cn = new ComponentName("com.example", "com.example.SomeService"); in start_showsDialog() local
50 installPackage(cn.getPackageName(), "X"); in start_showsDialog()
52 NotificationAccessConfirmationActivity activity = startActivityWithIntent(cn); in start_showsDialog()
61 ComponentName cn = new ComponentName("com.example", "com.example.SomeService"); in start_withMissingPackage_finishes() local
63 NotificationAccessConfirmationActivity activity = startActivityWithIntent(cn); in start_withMissingPackage_finishes()
81 ComponentName cn) { in startActivityWithIntent() argument
84 new Intent().putExtra(EXTRA_COMPONENT_NAME, cn)) in startActivityWithIntent()
/packages/apps/Launcher3/quickstep/src/com/android/launcher3/model/
DPredictionHelper.java53 ComponentName cn = ((LauncherAppWidgetInfo) info).providerName; in getAppTargetFromItemInfo() local
54 return new AppTarget.Builder(new AppTargetId("widget:" + cn.getPackageName()), in getAppTargetFromItemInfo()
55 cn.getPackageName(), info.user).setClassName(cn.getClassName()).build(); in getAppTargetFromItemInfo()
58 ComponentName cn = info.getTargetComponent(); in getAppTargetFromItemInfo() local
59 return new AppTarget.Builder(new AppTargetId("app:" + cn.getPackageName()), in getAppTargetFromItemInfo()
60 cn.getPackageName(), info.user).setClassName(cn.getClassName()).build(); in getAppTargetFromItemInfo()
DAppEventProducer.java206 ComponentName cn = null; in toAppTarget() local
213 if ((cn = parseNullable(app.getComponentName())) != null) { in toAppTarget()
214 id = "app:" + cn.getPackageName(); in toAppTarget()
221 && (cn = parseNullable(si.getShortcutName())) != null) { in toAppTarget()
223 userHandle).forPackage(cn.getPackageName(), si.getShortcutId()).query( in toAppTarget()
236 if ((cn = parseNullable(widget.getComponentName())) != null) { in toAppTarget()
237 id = "widget:" + cn.getPackageName(); in toAppTarget()
243 if ((cn = parseNullable(task.getComponentName())) != null) { in toAppTarget()
244 id = "app:" + cn.getPackageName(); in toAppTarget()
251 if (id != null && cn != null) { in toAppTarget()
[all …]
/packages/apps/Settings/src/com/android/settings/utils/
DManagedServiceSettings.java113 final ComponentName cn = new ComponentName(service.packageName, service.name); in updateList() local
136 pref.setKey(cn.flattenToString()); in updateList()
137 pref.setChecked(isServiceEnabled(cn)); in updateList()
149 return setEnabled(cn, finalTitle.toString(), enable); in updateList()
151 return setEnabled(cn, null, enable); in updateList()
154 pref.setKey(cn.flattenToString()); in updateList()
170 protected boolean isServiceEnabled(ComponentName cn) { in isServiceEnabled() argument
171 return mServiceListing.isEnabled(cn); in isServiceEnabled()
204 public ScaryWarningDialogFragment setServiceInfo(ComponentName cn, String label, in setServiceInfo() argument
207 args.putString(KEY_COMPONENT, cn.flattenToString()); in setServiceInfo()
[all …]
/packages/apps/Launcher3/src/com/android/launcher3/
DDefaultLayoutParser.java259 protected int verifyAndInsert(ComponentName cn, Bundle extras) { in verifyAndInsert() argument
261 mPackageManager.getReceiverInfo(cn, 0); in verifyAndInsert()
264 new String[]{cn.getPackageName()}); in verifyAndInsert()
265 cn = new ComponentName(packages[0], cn.getClassName()); in verifyAndInsert()
267 mPackageManager.getReceiverInfo(cn, 0); in verifyAndInsert()
269 Log.d(TAG, "Can't find widget provider: " + cn.getClassName()); in verifyAndInsert()
279 if (!appWidgetManager.bindAppWidgetIdIfAllowed(appWidgetId, cn)) { in verifyAndInsert()
280 Log.e(TAG, "Unable to bind app widget id " + cn); in verifyAndInsert()
286 mValues.put(Favorites.APPWIDGET_PROVIDER, cn.flattenToString()); in verifyAndInsert()
297 intent.setComponent(cn); in verifyAndInsert()
DAutoInstallsLayout.java330 ComponentName cn = intent.getComponent(); in addShortcut() local
331 if (cn != null && type == ITEM_TYPE_APPLICATION in addShortcut()
333 LauncherActivityInfo replacementInfo = mActivityOverride.get(cn.getPackageName()); in addShortcut()
389 ComponentName cn; in parseAndAdd() local
391 cn = new ComponentName(packageName, className); in parseAndAdd()
392 info = mPackageManager.getActivityInfo(cn, 0); in parseAndAdd()
396 cn = new ComponentName(packages[0], className); in parseAndAdd()
397 info = mPackageManager.getActivityInfo(cn, 0); in parseAndAdd()
401 .setComponent(cn) in parseAndAdd()
495 ComponentName cn = getComponentName(parser); in parseAndAdd() local
[all …]
/packages/apps/Car/Settings/src/com/android/car/settings/applications/defaultapps/
DDefaultAssistantPickerEntryPreferenceController.java60 ComponentName cn = getComponentName(); in getCurrentDefaultAppInfo() local
61 if (cn == null) { in getCurrentDefaultAppInfo()
66 getCurrentProcessUserId(), cn); in getCurrentDefaultAppInfo()
84 ComponentName cn = getComponentName(); in getSettingIntent() local
85 if (cn == null) { in getSettingIntent()
89 return new Intent(Intent.ACTION_MAIN).setComponent(cn); in getSettingIntent()
/packages/apps/Settings/src/com/android/settings/security/trustagent/
DTrustAgentManager.java174 String cn = null; in getSettingsComponent() local
201 cn = sa.getString(com.android.internal.R.styleable.TrustAgent_settingsActivity); in getSettingsComponent()
216 if (cn != null && cn.indexOf('/') < 0) { in getSettingsComponent()
217 cn = resolveInfo.serviceInfo.packageName + "/" + cn; in getSettingsComponent()
220 (cn == null) ? null : ComponentName.unflattenFromString(cn); in getSettingsComponent()
/packages/apps/Settings/tests/robotests/src/com/android/settings/security/trustagent/
DTrustAgentsPreferenceControllerTest.java200 for (ComponentName cn : componentNames) { in createFakeAvailableAgents()
201 final ResolveInfo ri = createFakeResolveInfo(cn); in createFakeAvailableAgents()
207 private ResolveInfo createFakeResolveInfo(ComponentName cn) { in createFakeResolveInfo() argument
210 ri.serviceInfo.packageName = cn.getPackageName(); in createFakeResolveInfo()
211 ri.serviceInfo.name = cn.getClassName(); in createFakeResolveInfo()
213 ri.serviceInfo.applicationInfo.packageName = cn.getPackageName(); in createFakeResolveInfo()
214 ri.serviceInfo.applicationInfo.name = cn.getClassName(); in createFakeResolveInfo()
/packages/apps/Launcher3/src/com/android/launcher3/icons/
DIconCache.java304 ComponentName cn = shortcutInfo.getActivity(); in getShortcutInfoBadgeItem() local
305 if (cn != null) { in getShortcutInfoBadgeItem()
309 appInfo.componentName = cn; in getShortcutInfoBadgeItem()
312 .setComponent(cn); in getShortcutInfoBadgeItem()
473 ComponentName cn = ComponentName.unflattenFromString( in loadIconSubsection() local
476 duplicateIconRequestsMap.get(cn); in loadIconSubsection()
478 if (cn != null) { in loadIconSubsection()
481 cn, in loadIconSubsection()
494 + "entry for cn: " + cn); in loadIconSubsection()
506 for (ComponentName cn : duplicateIconRequestsMap.keySet()) { in loadIconSubsection()
[all …]
/packages/apps/TvSettings/SettingsAPI/java/com/android/tv/settings/library/settingslib/
DDefaultAppInfo.java42 public DefaultAppInfo(Context context, PackageManager pm, int uid, ComponentName cn) { in DefaultAppInfo() argument
43 this(context, pm, uid, cn, null /* summary */, true /* enabled */); in DefaultAppInfo()
50 public DefaultAppInfo(Context context, PackageManager pm, int uid, ComponentName cn, in DefaultAppInfo() argument
57 componentName = cn; in DefaultAppInfo()
/packages/apps/Launcher3/src/com/android/launcher3/widget/custom/
DCustomWidgetManager.java111 ComponentName cn = getWidgetProviderComponent(plugin); in onPluginDisconnected() local
112 mPlugins.remove(cn); in onPluginDisconnected()
113 mCustomWidgets.removeIf(w -> w.getComponent().equals(cn)); in onPluginDisconnected()
145 public LauncherAppWidgetProviderInfo getWidgetProvider(ComponentName cn) { in getWidgetProvider() argument
147 .filter(w -> w.getComponent().equals(cn)).findAny().orElse(null); in getWidgetProvider()
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/device/apps/specialaccess/
DNotificationAccess.java123 final ComponentName cn = new ComponentName(service.packageName, service.name); in updateList() local
144 pref.setKey(cn.flattenToString()); in updateList()
145 pref.setChecked(mNotificationManager.isNotificationListenerAccessGranted(cn)); in updateList()
147 if (mDefaultPackages.contains(cn.getPackageName()) && pref.isChecked()) { in updateList()
153 mNotificationManager.setNotificationListenerAccessGranted(cn, enable); in updateList()

12345