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

Commit 6c8693e5 authored by Eric Jeong's avatar Eric Jeong Committed by Android (Google) Code Review
Browse files

Merge "Add condition to check if a user can have profile user"

parents db3210ce da1aa8f7
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -19,10 +19,11 @@ package android.content.pm;
import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.SystemProperties;
import android.os.UserHandle;
import android.os.UserManager;

import com.android.internal.os.RoSystemProperties;

/**
 * Per-user information.
 * @hide
@@ -232,7 +233,9 @@ public class UserInfo implements Parcelable {
        if (isManagedProfile() || isGuest() || isRestricted()) {
            return false;
        }
        if (UserManager.isSplitSystemUser()) {
        boolean splitOrHeadlessSystemUser = UserManager.isSplitSystemUser()
                || RoSystemProperties.MULTIUSER_HEADLESS_SYSTEM_USER;
        if (splitOrHeadlessSystemUser) {
            return id != UserHandle.USER_SYSTEM;
        } else {
            return id == UserHandle.USER_SYSTEM;