private static void doValidateProcessNames(final Application app, final String[] process_names) {
		try {
			final PackageInfo info = app.getPackageManager().getPackageInfo(app.getPackageName(),
					GET_ACTIVITIES | GET_SERVICES | GET_RECEIVERS | GET_PROVIDERS);
			final Set<String> defined_process_names = new HashSet<>();
			if (info.activities != null) for (final ActivityInfo activity : info.activities) defined_process_names.add(activity.processName);
			if (info.services != null) for (final ServiceInfo service : info.services) defined_process_names.add(service.processName);
			if (info.receivers != null) for (final ActivityInfo receiver : info.receivers) defined_process_names.add(receiver.processName);
			if (info.providers != null) for (final ProviderInfo provider : info.providers) defined_process_names.add(provider.processName);
			for (final String process_name : process_names)
				if (! defined_process_names.contains(getFullProcessName(app, process_name)))
					throw new IllegalArgumentException("Process name \"" + process_name + "\" is not used by any component in AndroidManifest.xml");
		} catch (final PackageManager.NameNotFoundException ignored) {}		// Should never happen
	}
Install the condom protection for current process. This method should generally never be called in the main process of app.

<p>It is suggested to use {@link android.content.ContentProvider ContentProvider} with "android:process", to install it in specified process.
library/src/main/java/com/oasisfeng/condom/CondomProcess.java