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

Commit 362212f8 authored by Mayank Garg's avatar Mayank Garg
Browse files

Added RemoveResult annotation to RemoveUserWhenPossible call

Bug: 215555912
Test: m
Change-Id: I82dff56942cbc576a1205e09b25fcc26f882b1d7
parent b2134e69
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -4840,15 +4840,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);