summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorXiaohui Chen <xiaohuic@google.com>2015-05-08 16:06:30 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-05-08 16:06:31 +0000
commit0dc0193307b9bb97aac1cfb79e56444578ba006e (patch)
treed541bbd79d65b4531b0e86a21c9cf1698fe67e34 /services
parent1336c2c68df5761af174d93f42a478ea752e2a5c (diff)
parent4be96e4e47d249d07d3e7dae5578e87aef90bd07 (diff)
downloadframeworks_base-0dc0193307b9bb97aac1cfb79e56444578ba006e.zip
frameworks_base-0dc0193307b9bb97aac1cfb79e56444578ba006e.tar.gz
frameworks_base-0dc0193307b9bb97aac1cfb79e56444578ba006e.tar.bz2
Merge "multiuser: postpone user cleanup to systemready" into mnc-dev
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));