Loading api/17.txt +1 −0 Original line number Diff line number Diff line Loading @@ -16619,6 +16619,7 @@ package android.os { public class UserManager { method public long getSerialNumberForUser(android.os.UserHandle); method public int getUserCount(); method public android.os.UserHandle getUserForSerialNumber(long); method public java.lang.String getUserName(); method public boolean isUserAGoat(); api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -16619,6 +16619,7 @@ package android.os { public class UserManager { method public long getSerialNumberForUser(android.os.UserHandle); method public int getUserCount(); method public android.os.UserHandle getUserForSerialNumber(long); method public java.lang.String getUserName(); method public boolean isUserAGoat(); core/java/android/os/UserManager.java +13 −4 Original line number Diff line number Diff line Loading @@ -122,7 +122,7 @@ public class UserManager { * @param userHandle the user handle of the user whose information is being requested. * @return the UserInfo object for a specific user. * @hide * */ */ public UserInfo getUserInfo(int userHandle) { try { return mService.getUserInfo(userHandle); Loading @@ -134,10 +134,11 @@ public class UserManager { /** * Return the serial number for a user. This is a device-unique * number assigned to that user; if the user is deleted and new users * created, the new users will not be given the same serial number. * number assigned to that user; if the user is deleted and then a new * user created, the new users will not be given the same serial number. * @param user The user whose serial number is to be retrieved. * @return The serial number of the given user. * @return The serial number of the given user; returns -1 if the * given UserHandle does not exist. * @see #getUserForSerialNumber(long) */ public long getSerialNumberForUser(UserHandle user) { Loading Loading @@ -178,6 +179,14 @@ public class UserManager { } } /** * Return the number of users currently created on the device. */ public int getUserCount() { List<UserInfo> users = getUsers(); return users != null ? users.size() : 1; } /** * Returns information for all users on this device. * Requires {@link android.Manifest.permission#MANAGE_USERS} permission. Loading Loading
api/17.txt +1 −0 Original line number Diff line number Diff line Loading @@ -16619,6 +16619,7 @@ package android.os { public class UserManager { method public long getSerialNumberForUser(android.os.UserHandle); method public int getUserCount(); method public android.os.UserHandle getUserForSerialNumber(long); method public java.lang.String getUserName(); method public boolean isUserAGoat();
api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -16619,6 +16619,7 @@ package android.os { public class UserManager { method public long getSerialNumberForUser(android.os.UserHandle); method public int getUserCount(); method public android.os.UserHandle getUserForSerialNumber(long); method public java.lang.String getUserName(); method public boolean isUserAGoat();
core/java/android/os/UserManager.java +13 −4 Original line number Diff line number Diff line Loading @@ -122,7 +122,7 @@ public class UserManager { * @param userHandle the user handle of the user whose information is being requested. * @return the UserInfo object for a specific user. * @hide * */ */ public UserInfo getUserInfo(int userHandle) { try { return mService.getUserInfo(userHandle); Loading @@ -134,10 +134,11 @@ public class UserManager { /** * Return the serial number for a user. This is a device-unique * number assigned to that user; if the user is deleted and new users * created, the new users will not be given the same serial number. * number assigned to that user; if the user is deleted and then a new * user created, the new users will not be given the same serial number. * @param user The user whose serial number is to be retrieved. * @return The serial number of the given user. * @return The serial number of the given user; returns -1 if the * given UserHandle does not exist. * @see #getUserForSerialNumber(long) */ public long getSerialNumberForUser(UserHandle user) { Loading Loading @@ -178,6 +179,14 @@ public class UserManager { } } /** * Return the number of users currently created on the device. */ public int getUserCount() { List<UserInfo> users = getUsers(); return users != null ? users.size() : 1; } /** * Returns information for all users on this device. * Requires {@link android.Manifest.permission#MANAGE_USERS} permission. Loading