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

Commit a9ba8669 authored by Christine Franks's avatar Christine Franks Committed by android-build-merger
Browse files

Merge "Merge "Allow SMS and calling for demo users" into oc-dr1-dev am:...

Merge "Merge "Allow SMS and calling for demo users" into oc-dr1-dev am: 4387d3a5 am: 966f37ae" into oc-mr1-dev-plus-aosp
am: cf86c068

Change-Id: I61c22ce2336a2eb95796ef4f655afae1ea374ebf
parents f3297070 cf86c068
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1460,7 +1460,7 @@ public class UserManager {
            user = mService.createUser(name, flags);
            // TODO: Keep this in sync with
            // UserManagerService.LocalService.createUserEvenWhenDisallowed
            if (user != null && !user.isAdmin()) {
            if (user != null && !user.isAdmin() && !user.isDemo()) {
                mService.setUserRestriction(DISALLOW_SMS, true, user.id);
                mService.setUserRestriction(DISALLOW_OUTGOING_CALLS, true, user.id);
            }
+1 −1
Original line number Diff line number Diff line
@@ -3646,7 +3646,7 @@ public class UserManagerService extends IUserManager.Stub {
        public UserInfo createUserEvenWhenDisallowed(String name, int flags) {
            UserInfo user = createUserInternalUnchecked(name, flags, UserHandle.USER_NULL, null);
            // Keep this in sync with UserManager.createUser
            if (user != null && !user.isAdmin()) {
            if (user != null && !user.isAdmin() && !user.isDemo()) {
                setUserRestriction(UserManager.DISALLOW_SMS, true, user.id);
                setUserRestriction(UserManager.DISALLOW_OUTGOING_CALLS, true, user.id);
            }