Merge "Only reset global restriction owner on DO->PO for the right user" into nyc-dev am: 2002061f34

am: 462db089d4

* commit '462db089d4cd6d290e76ca76c0c159f52dcf0dc1':
  Only reset global restriction owner on DO->PO for the right user

Change-Id: I0463116da229d2da751f52bd022d0c0bc60bef98
This commit is contained in:
Zoltan Szatmary-Ban
2016-06-02 16:48:31 +00:00
committed by android-build-merger

View File

@@ -1014,9 +1014,13 @@ public class UserManagerService extends IUserManager.Stub {
// in getUserRestrictionSource on who set local policies.
mGlobalRestrictionOwnerUserId = userId;
} else {
// When profile owner sets restrictions it passes null global bundle and we reset
// global restriction owner userId.
mGlobalRestrictionOwnerUserId = UserHandle.USER_NULL;
if (mGlobalRestrictionOwnerUserId == 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;
}
}
{
// Update local.