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

Commit d280641d authored by Sudheer Shanka's avatar Sudheer Shanka Committed by android-build-merger
Browse files

Allow apps with CREATE_USERS permission to create demo users. am: 234d1afd am: 0be41fc1

am: ad520f87

Change-Id: I7e7f759995e06cae7b8f6a0ba636f31f48b1f5ff
parents 410d312a ad520f87
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1642,7 +1642,7 @@

    <!-- @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,
         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.
         This permission is not available to third party applications. -->
    <permission android:name="android.permission.CREATE_USERS"
+2 −1
Original line number Diff line number Diff line
@@ -180,7 +180,8 @@ public class UserManagerService extends IUserManager.Stub {
            UserInfo.FLAG_MANAGED_PROFILE
            | UserInfo.FLAG_EPHEMERAL
            | UserInfo.FLAG_RESTRICTED
            | UserInfo.FLAG_GUEST;
            | UserInfo.FLAG_GUEST
            | UserInfo.FLAG_DEMO;

    private static final int MIN_USER_ID = 10;
    // We need to keep process uid within Integer.MAX_VALUE.