@Override public void onReceive(final Context context, final Intent intent) {
		final String action = intent.getAction();
		if (! Intent.ACTION_LOCKED_BOOT_COMPLETED.equals(action) && ! Intent.ACTION_BOOT_COMPLETED.equals(action)) return;
		final DevicePolicies policies = new DevicePolicies(context);
		if (Users.isOwner() || ! policies.isProfileOwner()) {	// This receiver is not needed in owner user or profile not managed by Island.
			context.getPackageManager().setComponentEnabledSetting(new ComponentName(context, getClass()),
					PackageManager.COMPONENT_ENABLED_STATE_DISABLED, PackageManager.DONT_KILL_APP);
			return;
		}
		final UserManager um = (UserManager) context.getSystemService(Context.USER_SERVICE);
		final Bundle owner_restrictions = um.getUserRestrictions(Users.owner);
		final Bundle profile_restrictions = policies.invoke(DevicePolicyManager::getUserRestrictions);
		final boolean enabled_in_owner = owner_restrictions.getBoolean(DISALLOW_DEBUGGING_FEATURES);
		if (profile_restrictions.getBoolean(DISALLOW_DEBUGGING_FEATURES) != enabled_in_owner) {
			policies.setUserRestriction(DISALLOW_DEBUGGING_FEATURES, enabled_in_owner);
			Log.i(TAG, "Synchronized: " + DISALLOW_DEBUGGING_FEATURES + " = " + enabled_in_owner);
		}
	}
Sync certain user restrictions upon profile starting

Created by Oasis on 2019-5-24.
mobile/src/main/java/com/oasisfeng/island/adb/ProfileRestrictionsSync.java