@@ -56,6 +56,7 @@ public int getUserHandle() {
5656
5757 /**
5858 * Returns the user name of the user making this call.
59+ * Requires {@link android.Manifest.permission#MANAGE_USERS} permission.
5960 * @return the user name
6061 */
6162 public String getUserName () {
@@ -69,6 +70,7 @@ public String getUserName() {
6970
7071 /**
7172 * Returns the UserInfo object describing a specific user.
73+ * Requires {@link android.Manifest.permission#MANAGE_USERS} permission.
7274 * @param userHandle the user handle of the user whose information is being requested.
7375 * @return the UserInfo object for a specific user.
7476 * @hide
@@ -84,6 +86,7 @@ public UserInfo getUserInfo(int userHandle) {
8486
8587 /**
8688 * Creates a user with the specified name and options.
89+ * Requires {@link android.Manifest.permission#MANAGE_USERS} permission.
8790 *
8891 * @param name the user's name
8992 * @param flags flags that identify the type of user and other properties.
@@ -103,6 +106,7 @@ public UserInfo createUser(String name, int flags) {
103106
104107 /**
105108 * Returns information for all users on this device.
109+ * Requires {@link android.Manifest.permission#MANAGE_USERS} permission.
106110 * @return the list of users that were created.
107111 * @hide
108112 */
@@ -117,6 +121,7 @@ public List<UserInfo> getUsers() {
117121
118122 /**
119123 * Removes a user and all associated data.
124+ * Requires {@link android.Manifest.permission#MANAGE_USERS} permission.
120125 * @param userHandle the integer handle of the user, where 0 is the primary user.
121126 * @hide
122127 */
@@ -131,6 +136,7 @@ public boolean removeUser(int userHandle) {
131136
132137 /**
133138 * Updates the user's name.
139+ * Requires {@link android.Manifest.permission#MANAGE_USERS} permission.
134140 *
135141 * @param userHandle the user's integer handle
136142 * @param name the new name for the user
@@ -162,6 +168,7 @@ public ParcelFileDescriptor setUserIcon(int userHandle) {
162168 /**
163169 * Enable or disable the use of a guest account. If disabled, the existing guest account
164170 * will be wiped.
171+ * Requires {@link android.Manifest.permission#MANAGE_USERS} permission.
165172 * @param enable whether to enable a guest account.
166173 * @hide
167174 */
@@ -175,6 +182,7 @@ public void setGuestEnabled(boolean enable) {
175182
176183 /**
177184 * Checks if a guest user is enabled for this device.
185+ * Requires {@link android.Manifest.permission#MANAGE_USERS} permission.
178186 * @return whether a guest user is enabled
179187 * @hide
180188 */
@@ -189,6 +197,7 @@ public boolean isGuestEnabled() {
189197
190198 /**
191199 * Wipes all the data for a user, but doesn't remove the user.
200+ * Requires {@link android.Manifest.permission#MANAGE_USERS} permission.
192201 * @param userHandle
193202 * @hide
194203 */
0 commit comments