am 2c1dfa29: Merge "Fix deadlock in removing a user" into jb-mr1-dev

* commit '2c1dfa29b40a988e3ea8f6922768465743aafddc':
  Fix deadlock in removing a user
This commit is contained in:
Amith Yamasani
2012-08-22 18:23:07 -07:00
committed by Android Git Automerger

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