Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 65aa1d33 authored by Zoltan Szatmary-Ban's avatar Zoltan Szatmary-Ban Committed by android-build-merger
Browse files

Merge "Only reset global restriction owner on DO->PO for the right user" into...

Merge "Only reset global restriction owner on DO->PO for the right user" into nyc-dev am: 2002061f am: 462db089
am: 4cdc2997

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

Change-Id: I51c749ddabeef1b080320baefaab1de4d72860fc
parents 5c0ace99 4cdc2997
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -1014,10 +1014,14 @@ 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.
                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.
                final Bundle prev = mDevicePolicyLocalUserRestrictions.get(userId);