Make disallow add/remove managed profile restriction not global.
Otherwise: if the DO sets remove managed profile user restriction: the profile owner of a managed profile cannot remove this managed profile. BUG:33854430 Test: adb shell am instrument -e class com.android.server.devicepolicy.DevicePolicyManagerTest -w com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner Change-Id: I90b2028ea627a2073298bf9ef3c07b4fdf8d13a1
This commit is contained in:
@@ -256,7 +256,7 @@ public class UserManager {
|
||||
* Specifies if managed profiles of this user can be removed, other than by its profile owner.
|
||||
* The default value is <code>false</code>.
|
||||
* <p>
|
||||
* This restriction can only be set by device owners.
|
||||
* This restriction has no effect on managed profiles.
|
||||
*
|
||||
* <p>Key for user restrictions.
|
||||
* <p>Type: Boolean
|
||||
@@ -353,8 +353,8 @@ public class UserManager {
|
||||
/**
|
||||
* Specifies if a user is disallowed from adding managed profiles.
|
||||
* <p>The default value for an unmanaged user is <code>false</code>.
|
||||
* For users with a device owner set, the default is <code>true</code>
|
||||
* <p>This restriction can only be set by device owners.
|
||||
* For users with a device owner set, the default is <code>true</code>.
|
||||
* <p>This restriction has no effect on managed profiles.
|
||||
*
|
||||
* <p>Key for user restrictions.
|
||||
* <p>Type: Boolean
|
||||
|
||||
Reference in New Issue
Block a user