Allow apps with CREATE_USERS permission to create demo users.

am: 234d1afd79

Change-Id: I65451cd9ce17c9af38ecd21e62ea96b27d027d01
This commit is contained in:
Sudheer Shanka
2016-08-30 17:59:15 +00:00
committed by android-build-merger
2 changed files with 3 additions and 2 deletions

View File

@@ -1634,7 +1634,7 @@
<!-- @hide Allows an application to create, remove users and get the list of <!-- @hide Allows an application to create, remove users and get the list of
users on the device. Applications holding this permission can only create restricted, users on the device. Applications holding this permission can only create restricted,
guest, managed, and ephemeral users. For creating other kind of users, guest, managed, demo, and ephemeral users. For creating other kind of users,
{@link android.Manifest.permission#MANAGE_USERS} is needed. {@link android.Manifest.permission#MANAGE_USERS} is needed.
This permission is not available to third party applications. --> This permission is not available to third party applications. -->
<permission android:name="android.permission.CREATE_USERS" <permission android:name="android.permission.CREATE_USERS"

View File

@@ -180,7 +180,8 @@ public class UserManagerService extends IUserManager.Stub {
UserInfo.FLAG_MANAGED_PROFILE UserInfo.FLAG_MANAGED_PROFILE
| UserInfo.FLAG_EPHEMERAL | UserInfo.FLAG_EPHEMERAL
| UserInfo.FLAG_RESTRICTED | UserInfo.FLAG_RESTRICTED
| UserInfo.FLAG_GUEST; | UserInfo.FLAG_GUEST
| UserInfo.FLAG_DEMO;
private static final int MIN_USER_ID = 10; private static final int MIN_USER_ID = 10;
// We need to keep process uid within Integer.MAX_VALUE. // We need to keep process uid within Integer.MAX_VALUE.