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

Commit 92adbe6a authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Added RemoveResult annotation to RemoveUserWhenPossible call"

parents 0d537297 362212f8
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -4841,15 +4841,16 @@ public class UserManager {
     * @param overrideDevicePolicy when {@code true}, user is removed even if the caller has
     * the {@link #DISALLOW_REMOVE_USER} or {@link #DISALLOW_REMOVE_MANAGED_PROFILE} restriction
     *
     * @return the result code {@link #REMOVE_RESULT_REMOVED}, {@link #REMOVE_RESULT_DEFERRED},
     * {@link #REMOVE_RESULT_ALREADY_BEING_REMOVED}, or {@link #REMOVE_RESULT_ERROR}.
     * @return the {@link RemoveResult} code: {@link #REMOVE_RESULT_REMOVED},
     * {@link #REMOVE_RESULT_DEFERRED}, {@link #REMOVE_RESULT_ALREADY_BEING_REMOVED}, or
     * {@link #REMOVE_RESULT_ERROR}.
     *
     * @hide
     */
    @SystemApi
    @RequiresPermission(anyOf = {Manifest.permission.MANAGE_USERS,
            Manifest.permission.CREATE_USERS})
    public int removeUserWhenPossible(@NonNull UserHandle user,
    public @RemoveResult int removeUserWhenPossible(@NonNull UserHandle user,
            boolean overrideDevicePolicy) {
        try {
            return mService.removeUserWhenPossible(user.getIdentifier(), overrideDevicePolicy);