Loading services/core/java/com/android/server/pm/UserManagerService.java +7 −3 Original line number Original line Diff line number Diff line Loading @@ -1014,10 +1014,14 @@ public class UserManagerService extends IUserManager.Stub { // in getUserRestrictionSource on who set local policies. // in getUserRestrictionSource on who set local policies. mGlobalRestrictionOwnerUserId = userId; mGlobalRestrictionOwnerUserId = userId; } else { } else { // When profile owner sets restrictions it passes null global bundle and we reset if (mGlobalRestrictionOwnerUserId == userId) { // global restriction owner userId. // When profile owner sets restrictions it passes null global bundle and we // reset global restriction owner userId. // This means this user used to have DO, but now the DO is gone and the user // instead has PO. mGlobalRestrictionOwnerUserId = UserHandle.USER_NULL; mGlobalRestrictionOwnerUserId = UserHandle.USER_NULL; } } } { { // Update local. // Update local. final Bundle prev = mDevicePolicyLocalUserRestrictions.get(userId); final Bundle prev = mDevicePolicyLocalUserRestrictions.get(userId); Loading Loading
services/core/java/com/android/server/pm/UserManagerService.java +7 −3 Original line number Original line Diff line number Diff line Loading @@ -1014,10 +1014,14 @@ public class UserManagerService extends IUserManager.Stub { // in getUserRestrictionSource on who set local policies. // in getUserRestrictionSource on who set local policies. mGlobalRestrictionOwnerUserId = userId; mGlobalRestrictionOwnerUserId = userId; } else { } else { // When profile owner sets restrictions it passes null global bundle and we reset if (mGlobalRestrictionOwnerUserId == userId) { // global restriction owner userId. // When profile owner sets restrictions it passes null global bundle and we // reset global restriction owner userId. // This means this user used to have DO, but now the DO is gone and the user // instead has PO. mGlobalRestrictionOwnerUserId = UserHandle.USER_NULL; mGlobalRestrictionOwnerUserId = UserHandle.USER_NULL; } } } { { // Update local. // Update local. final Bundle prev = mDevicePolicyLocalUserRestrictions.get(userId); final Bundle prev = mDevicePolicyLocalUserRestrictions.get(userId); Loading