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

Commit 47f9f7cb authored by yuanhao's avatar yuanhao Committed by 浩 袁
Browse files

Fixed NPE in canAddMoreManagedProfiles



We can use the command 'adb shell pm create-user --profileOf -10000
--managed TestProfile_12345678' to reproduce the problem.

Signed-off-by: default avataryuanhao <yuanhao@xiaomi.com>
parent 32aac7b9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1443,7 +1443,7 @@ public class UserManagerService extends IUserManager.Stub {
        }
        synchronized(mUsersLock) {
            UserInfo userInfo = getUserInfoLU(userId);
            if (!userInfo.canHaveProfile()) {
            if (userInfo == null || !userInfo.canHaveProfile()) {
                return false;
            }
            int usersCountAfterRemoving = getAliveUsersExcludingGuestsCountLU()