diff options
author | Amith Yamasani <yamasani@google.com> | 2015-08-18 14:32:14 -0700 |
---|---|---|
committer | Amith Yamasani <yamasani@google.com> | 2015-08-18 16:48:55 -0700 |
commit | 236b2b5d28f430a79d3155115b57ea8d80ad27ea (patch) | |
tree | 3ea1a6908a0e874bfa9445b31b3d3b153ffc4f89 | |
parent | bd58d6fcadad111cee35778a4f77c4f789a0f8c6 (diff) | |
download | frameworks_base-236b2b5d28f430a79d3155115b57ea8d80ad27ea.zip frameworks_base-236b2b5d28f430a79d3155115b57ea8d80ad27ea.tar.gz frameworks_base-236b2b5d28f430a79d3155115b57ea8d80ad27ea.tar.bz2 |
Fix crashes when removing work profile
This isn't specific to work profile. When multiple user
deletions happen in sequence, a race causes a dying user
to lose permissions prematurely. This fix delays removal of
user state until the user is completely cleaned up and all the
processes have been killed.
Bug: 23178833
Change-Id: I1636bc2022416359a25f19a3f65d113c05289cd3
-rw-r--r-- | services/core/java/com/android/server/pm/UserManagerService.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/pm/UserManagerService.java b/services/core/java/com/android/server/pm/UserManagerService.java index 264170c..0607525 100644 --- a/services/core/java/com/android/server/pm/UserManagerService.java +++ b/services/core/java/com/android/server/pm/UserManagerService.java @@ -403,9 +403,10 @@ public class UserManagerService extends IUserManager.Stub { return ui; } + /** Called by PackageManagerService */ public boolean exists(int userId) { synchronized (mPackagesLock) { - return ArrayUtils.contains(mUserIds, userId); + return mUsers.get(userId) != null; } } |