From 1046ba518b07e42eb5d3474f1ff9ca1181c331d5 Mon Sep 17 00:00:00 2001 From: Benjamin Franz Date: Wed, 17 Jun 2015 16:13:31 +0100 Subject: [PATCH] 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 --- .../android/server/devicepolicy/DevicePolicyManagerService.java | 1 + 1 file changed, 1 insertion(+) diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java index f1f61f3a40a51..3b62b61a1f3c5 100644 --- a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java +++ b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java @@ -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