Loading core/java/android/content/pm/UserInfo.java +7 −0 Original line number Diff line number Diff line Loading @@ -112,6 +112,12 @@ public class UserInfo implements Parcelable { /** * Indicates that this user is disabled. * * <p> This is currently used to indicate that a Managed Profile, when created via * DevicePolicyManager, has not yet been provisioned; once the DPC provisions it, a DPM call * will manually set it to enabled. * * <p>Users that are slated for deletion are also generally set to disabled. * * <p>Note: If an ephemeral user is disabled, it shouldn't be later re-enabled. Ephemeral users * are disabled as their removal is in progress to indicate that they shouldn't be re-entered. */ Loading Loading @@ -398,6 +404,7 @@ public class UserInfo implements Parcelable { return UserManager.isUserTypePrivateProfile(userType); } /** See {@link #FLAG_DISABLED}*/ @UnsupportedAppUsage public boolean isEnabled() { return (flags & FLAG_DISABLED) != FLAG_DISABLED; Loading core/java/android/os/UserManager.java +4 −1 Original line number Diff line number Diff line Loading @@ -4708,6 +4708,9 @@ public class UserManager { * Sets the user as enabled, if such an user exists. * * <p>Note that the default is true, it's only that managed profiles might not be enabled. * (Managed profiles created by DevicePolicyManager will start out disabled, and DPM will later * toggle them to enabled once they are provisioned. This is the primary purpose of the * {@link UserInfo#FLAG_DISABLED} flag.) * Also ephemeral users can be disabled to indicate that their removal is in progress and they * shouldn't be re-entered. Therefore ephemeral users should not be re-enabled once disabled. * Loading Loading @@ -5259,7 +5262,7 @@ public class UserManager { /** * Returns list of the profiles of userId including userId itself. * Note that this returns only enabled. * Note that this returns only {@link UserInfo#isEnabled() enabled} profiles. * <p>Note that this includes all profile types (not including Restricted profiles). * * <p>Requires {@link android.Manifest.permission#MANAGE_USERS} or Loading Loading
core/java/android/content/pm/UserInfo.java +7 −0 Original line number Diff line number Diff line Loading @@ -112,6 +112,12 @@ public class UserInfo implements Parcelable { /** * Indicates that this user is disabled. * * <p> This is currently used to indicate that a Managed Profile, when created via * DevicePolicyManager, has not yet been provisioned; once the DPC provisions it, a DPM call * will manually set it to enabled. * * <p>Users that are slated for deletion are also generally set to disabled. * * <p>Note: If an ephemeral user is disabled, it shouldn't be later re-enabled. Ephemeral users * are disabled as their removal is in progress to indicate that they shouldn't be re-entered. */ Loading Loading @@ -398,6 +404,7 @@ public class UserInfo implements Parcelable { return UserManager.isUserTypePrivateProfile(userType); } /** See {@link #FLAG_DISABLED}*/ @UnsupportedAppUsage public boolean isEnabled() { return (flags & FLAG_DISABLED) != FLAG_DISABLED; Loading
core/java/android/os/UserManager.java +4 −1 Original line number Diff line number Diff line Loading @@ -4708,6 +4708,9 @@ public class UserManager { * Sets the user as enabled, if such an user exists. * * <p>Note that the default is true, it's only that managed profiles might not be enabled. * (Managed profiles created by DevicePolicyManager will start out disabled, and DPM will later * toggle them to enabled once they are provisioned. This is the primary purpose of the * {@link UserInfo#FLAG_DISABLED} flag.) * Also ephemeral users can be disabled to indicate that their removal is in progress and they * shouldn't be re-entered. Therefore ephemeral users should not be re-enabled once disabled. * Loading Loading @@ -5259,7 +5262,7 @@ public class UserManager { /** * Returns list of the profiles of userId including userId itself. * Note that this returns only enabled. * Note that this returns only {@link UserInfo#isEnabled() enabled} profiles. * <p>Note that this includes all profile types (not including Restricted profiles). * * <p>Requires {@link android.Manifest.permission#MANAGE_USERS} or Loading