@ProfileUser static Set<String> detectCriticalPackages(final PackageManager pm) {
		final Set<String> pkgs = SystemAppsManager.detectCriticalSystemPackages(pm);

		final String webview_pkg = getCurrentWebViewPackageName();
		if (webview_pkg != null) pkgs.add(webview_pkg);
		try { @SuppressLint("WrongConstant") // Chrome may not be current provider, since current provider may fallback to system WebView during provisioning.
		final ApplicationInfo chrome_info = pm.getApplicationInfo(WellKnownPackages.PACKAGE_GOOGLE_CHROME, MATCH_UNINSTALLED_PACKAGES);
			pkgs.add(chrome_info.packageName);
		} catch (final PackageManager.NameNotFoundException ignored) {}
		return pkgs;
	}
Detect critical apps (including system and installed ones).

Created by Oasis on 2017/9/12.
shared/src/main/java/com/oasisfeng/island/provisioning/CriticalAppsManager.java