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

Commit 0cd867c8 authored by Amith Yamasani's avatar Amith Yamasani
Browse files

Fix deadlock in removing a user

Cleanup PackageManager settings after the package directories are removed.

Change-Id: I264bc95ea21da653a234d7c81df5b25d4de7aa9e
parent 7e877fa0
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -523,6 +523,10 @@ public class UserManagerService extends IUserManager.Stub {
        synchronized (mUsers) {
            result = removeUserLocked(userHandle);
        }

        // Cleanup package manager settings
        mPm.cleanUpUser(userHandle);

        // Let other services shutdown any activity
        Intent addedIntent = new Intent(Intent.ACTION_USER_REMOVED);
        addedIntent.putExtra(Intent.EXTRA_USER_HANDLE, userHandle);
@@ -555,8 +559,6 @@ public class UserManagerService extends IUserManager.Stub {
            return false;
        }

        mPm.cleanUpUser(userHandle);

        // Remove this user from the list
        mUsers.remove(userHandle);
        // Remove user file