Merge "Fix deadlock in removing a user" into jb-mr1-dev

This commit is contained in:
Amith Yamasani
2012-08-22 18:19:19 -07:00
committed by Android (Google) Code Review

View File

@ -530,6 +530,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);
@ -562,8 +566,6 @@ public class UserManagerService extends IUserManager.Stub {
return false;
}
mPm.cleanUpUser(userHandle);
// Remove this user from the list
mUsers.remove(userHandle);
// Remove user file