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

Commit b6157995 authored by Fyodor Kupolov's avatar Fyodor Kupolov
Browse files

Do not create profile if FEATURE_MANAGED_USERS is not available

Bug: 21629701
Change-Id: Ia0f720eee0faa0d565701064a268948f6dea82e4
parent 03123839
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -589,6 +589,10 @@ public class UserManagerService extends IUserManager.Stub {
        if (ActivityManager.isLowRamDeviceStatic()) {
            return false;
        }
        if (!mContext.getPackageManager().hasSystemFeature(
                PackageManager.FEATURE_MANAGED_USERS)) {
            return false;
        }
        synchronized(mPackagesLock) {
            // Limit number of managed profiles that can be created
            if (numberOfUsersOfTypeLocked(UserInfo.FLAG_MANAGED_PROFILE, true)