summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorXiaohui Chen <xiaohuic@google.com>2015-05-06 09:55:43 -0700
committerXiaohui Chen <xiaohuic@google.com>2015-05-06 09:55:43 -0700
commit4be96e4e47d249d07d3e7dae5578e87aef90bd07 (patch)
tree61ff5b8eb72beebb86de6a43ce1736b85b30f55d /services
parentafa81ed0b174eb6b81b811fac5cd5df2edb0f798 (diff)
downloadframeworks_base-4be96e4e47d249d07d3e7dae5578e87aef90bd07.zip
frameworks_base-4be96e4e47d249d07d3e7dae5578e87aef90bd07.tar.gz
frameworks_base-4be96e4e47d249d07d3e7dae5578e87aef90bd07.tar.bz2
multiuser: postpone user cleanup to systemready
User cleanup was too early and causing exceptions during boot. Bug: 20826665 Change-Id: Idace66d41cefaff1d80f490c161f8868e91d36d9
Diffstat (limited to 'services')
-rw-r--r--services/core/java/com/android/server/pm/UserManagerService.java12
1 files changed, 8 insertions, 4 deletions
diff --git a/services/core/java/com/android/server/pm/UserManagerService.java b/services/core/java/com/android/server/pm/UserManagerService.java
index e79a206..e6f5e3d 100644
--- a/services/core/java/com/android/server/pm/UserManagerService.java
+++ b/services/core/java/com/android/server/pm/UserManagerService.java
@@ -234,6 +234,14 @@ public class UserManagerService extends IUserManager.Stub {
mUserListFile = new File(mUsersDir, USER_LIST_FILENAME);
initDefaultGuestRestrictions();
readUserListLocked();
+ sInstance = this;
+ }
+ }
+ }
+
+ void systemReady() {
+ synchronized (mInstallLock) {
+ synchronized (mPackagesLock) {
// Prune out any partially created/partially removed users.
ArrayList<UserInfo> partials = new ArrayList<UserInfo>();
for (int i = 0; i < mUsers.size(); i++) {
@@ -248,12 +256,8 @@ public class UserManagerService extends IUserManager.Stub {
+ " (name=" + ui.name + ")");
removeUserStateLocked(ui.id);
}
- sInstance = this;
}
}
- }
-
- void systemReady() {
userForeground(UserHandle.USER_OWNER);
mAppOpsService = IAppOpsService.Stub.asInterface(
ServiceManager.getService(Context.APP_OPS_SERVICE));