private void onPermissionRequest(final String pkg, final String type, final String id, final PersistableBundle bundle) {
		if (! mCompatibilityVerified) {
			if (mContext.getPackageName().equals(pkg) && DUMMY_TYPE.equals(type) && DUMMY_ID.equals(id) && bundle != null && bundle.getInt("") == -1) return;
			throw new IllegalStateException("Incompatible ROM");
		}
		Log.d(TAG, "onPermissionRequest");
		if (! ensureCallerMatchesPackage(pkg)) throw new SecurityException("Package name does not match caller");

		final Intent intent = new Intent(mContext, DelegatedScopeAuthorization.class).setAction(RestrictionsManager.ACTION_REQUEST_PERMISSION)
				.putExtra(RestrictionsManager.EXTRA_PACKAGE_NAME, pkg).putExtra(RestrictionsManager.EXTRA_REQUEST_TYPE, type)
				.putExtra(RestrictionsManager.EXTRA_REQUEST_ID, id).putExtra(RestrictionsManager.EXTRA_REQUEST_BUNDLE, bundle);
		mContext.sendBroadcast(intent);
	}
Allow client to call {@link RestrictionsManager#requestPermission(String, String, PersistableBundle)} in owner user when Island is not device owner.

Created by Oasis on 2019-6-6.
open/src/main/java/com/oasisfeng/island/api/PermissionForwardingRestrictionsManager.java