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

Commit 1046ba51 authored by Benjamin Franz's avatar Benjamin Franz
Browse files

Add DISALLOW_CREATE_WINDOWS to Device Owner only user restrictions

Even though the documentation of DISALLOW_CREATE_WINDOWS says it is for
Device Owners and Profile Owners on User 0 only, it was previously not
part of DEVICE_OWNER_USER_RESTRICTIONS and was therefore callable from
a profile owner on a managed profile or secondary user.

Bug: 19726884
Change-Id: If6443eacbc28b7ee6c0845754923573a79f8bde3
parent 2cc03e56
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -211,6 +211,7 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
        DEVICE_OWNER_USER_RESTRICTIONS.add(UserManager.DISALLOW_SMS);
        DEVICE_OWNER_USER_RESTRICTIONS.add(UserManager.DISALLOW_FUN);
        DEVICE_OWNER_USER_RESTRICTIONS.add(UserManager.DISALLOW_SAFE_BOOT);
        DEVICE_OWNER_USER_RESTRICTIONS.add(UserManager.DISALLOW_CREATE_WINDOWS);
    }

    // The following user restrictions cannot be changed by any active admin, including device