Loading api/system-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -4305,6 +4305,7 @@ package android.os { public class UserManager { method public void clearSeedAccountData(); method public android.os.UserHandle getProfileParent(android.os.UserHandle); method public java.lang.String getSeedAccountName(); method public android.os.PersistableBundle getSeedAccountOptions(); method public java.lang.String getSeedAccountType(); Loading core/java/android/os/UserManager.java +21 −0 Original line number Diff line number Diff line Loading @@ -2462,6 +2462,27 @@ public class UserManager { } } /** * Get the parent of a user profile. * * @param user the handle of the user profile * * @return the parent of the user or {@code null} if the user is not profile * * @hide */ @SystemApi @RequiresPermission(android.Manifest.permission.MANAGE_USERS) public @Nullable UserHandle getProfileParent(@NonNull UserHandle user) { UserInfo info = getProfileParent(user.getIdentifier()); if (info == null) { return null; } return UserHandle.of(info.id); } /** * Enables or disables quiet mode for a managed profile. If quiet mode is enabled, apps in a * managed profile don't run, generate notifications, or consume data or battery. Loading Loading
api/system-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -4305,6 +4305,7 @@ package android.os { public class UserManager { method public void clearSeedAccountData(); method public android.os.UserHandle getProfileParent(android.os.UserHandle); method public java.lang.String getSeedAccountName(); method public android.os.PersistableBundle getSeedAccountOptions(); method public java.lang.String getSeedAccountType(); Loading
core/java/android/os/UserManager.java +21 −0 Original line number Diff line number Diff line Loading @@ -2462,6 +2462,27 @@ public class UserManager { } } /** * Get the parent of a user profile. * * @param user the handle of the user profile * * @return the parent of the user or {@code null} if the user is not profile * * @hide */ @SystemApi @RequiresPermission(android.Manifest.permission.MANAGE_USERS) public @Nullable UserHandle getProfileParent(@NonNull UserHandle user) { UserInfo info = getProfileParent(user.getIdentifier()); if (info == null) { return null; } return UserHandle.of(info.id); } /** * Enables or disables quiet mode for a managed profile. If quiet mode is enabled, apps in a * managed profile don't run, generate notifications, or consume data or battery. Loading