public boolean setApplicationHidden(final String pkg, final boolean hidden) {
		if (SDK_INT >= P && hidden && Permissions.has(mAppContext, GET_APP_OPS_STATS)) try {     // Without GET_APP_OPS_STATS, app-op is saved upon change.
			new AppOpsHelper(mAppContext).saveAppOps(pkg);
		} catch (final PackageManager.NameNotFoundException | RuntimeException e) {
			Toasts.showLong(mAppContext, R.string.prompt_failed_preserving_app_ops);
			Analytics.$().logAndReport(TAG, "Error saving app ops settings for " + pkg, e);
		}
		final boolean changed = setApplicationHiddenWithoutAppOpsSaver(pkg, hidden);

		if (changed && SDK_INT >= P && ! hidden) try {
			new AppOpsHelper(mAppContext).restoreAppOps(pkg);
		} catch (final PackageManager.NameNotFoundException | RuntimeException e) {
			Toasts.showLong(mAppContext, R.string.prompt_failed_preserving_app_ops);
			Analytics.$().logAndReport(TAG, "Error restoring app ops settings for " + pkg, e);
		}
		return changed;
	}
@see DevicePolicyManager#addCrossProfileIntentFilter(ComponentName, IntentFilter, int)
shared/src/main/java/com/oasisfeng/island/util/DevicePolicies.java