commit | 17c9d69d7018c62d9d08ceecc6218df6704832dd | [log] [tgz] |
---|---|---|
author | Kenny Guy <kennyguy@google.com> | Fri Jun 13 13:51:42 2014 +0100 |
committer | Kenny Guy <kennyguy@google.com> | Fri Jun 13 14:10:29 2014 +0100 |
tree | b22a760ebfb57848b0f33c0ceeb86fc59532adbc | |
parent | 6dfa6e2a9be08a3a0f152a7b772efc8ce2469bce [diff] |
Don't remove a user already being removed. Check if UserManager is already removing a user before starting to remove it. Bug: 15583858 Change-Id: If9763e9b47355d9ae35cc621367c74725029aa90
diff --git a/services/core/java/com/android/server/pm/UserManagerService.java b/services/core/java/com/android/server/pm/UserManagerService.java index 0cb2ab9..b941657 100644 --- a/services/core/java/com/android/server/pm/UserManagerService.java +++ b/services/core/java/com/android/server/pm/UserManagerService.java
@@ -1104,7 +1104,7 @@ final UserInfo user; synchronized (mPackagesLock) { user = mUsers.get(userHandle); - if (userHandle == 0 || user == null) { + if (userHandle == 0 || user == null || mRemovingUserIds.get(userHandle)) { return false; } mRemovingUserIds.put(userHandle, true);