Loading services/core/java/com/android/server/am/UserController.java +2 −2 Original line number Diff line number Diff line Loading @@ -560,8 +560,8 @@ class UserController implements Handler.Callback { Slog.i(TAG, "Stopping pre-created user " + userInfo.toFullString()); // Pre-created user was started right after creation so services could properly // intialize it; it should be stopped right away as it's not really a "real" user. // TODO(b/140750212): in the long-term, we should add a onCreateUser() callback // on SystemService instead. // TODO(b/143092698): in the long-term, it might be better to add a onCreateUser() // callback on SystemService instead. stopUser(userInfo.id, /* force= */ true, /* stopUserCallback= */ null, /* keyEvictedCallback= */ null); return; Loading services/core/java/com/android/server/pm/UserManagerService.java +4 −4 Original line number Diff line number Diff line Loading @@ -2986,8 +2986,8 @@ public class UserManagerService extends IUserManager.Stub { // Must start user (which will be stopped right away, through // UserController.finishUserUnlockedCompleted) so services can properly // intialize it. // TODO(b/140750212): in the long-term, we should add a onCreateUser() callback // on SystemService instead. // TODO(b/143092698): in the long-term, it might be better to add a onCreateUser() // callback on SystemService instead. Slog.i(LOG_TAG, "starting pre-created user " + userInfo.toFullString()); final IActivityManager am = ActivityManager.getService(); try { Loading @@ -3003,7 +3003,7 @@ public class UserManagerService extends IUserManager.Stub { Binder.restoreCallingIdentity(ident); } // TODO(b/140750212): it's possible to reach "max users overflow" when the user is created // TODO(b/143092698): it's possible to reach "max users overflow" when the user is created // "from scratch" (i.e., not from a pre-created user) and reaches the maximum number of // users without counting the pre-created one. Then when the pre-created is converted, the // "effective" number of max users is exceeds. Example: Loading Loading @@ -3048,7 +3048,7 @@ public class UserManagerService extends IUserManager.Stub { * <p>Should be used only during user creation, so the pre-created user can be used (instead of * creating and initializing a new user from scratch). */ // TODO(b/140750212): add unit test // TODO(b/143092698): add unit test @GuardedBy("mUsersLock") private @Nullable UserData getPreCreatedUserLU(@UserInfoFlag int flags) { if (DBG) { Loading Loading
services/core/java/com/android/server/am/UserController.java +2 −2 Original line number Diff line number Diff line Loading @@ -560,8 +560,8 @@ class UserController implements Handler.Callback { Slog.i(TAG, "Stopping pre-created user " + userInfo.toFullString()); // Pre-created user was started right after creation so services could properly // intialize it; it should be stopped right away as it's not really a "real" user. // TODO(b/140750212): in the long-term, we should add a onCreateUser() callback // on SystemService instead. // TODO(b/143092698): in the long-term, it might be better to add a onCreateUser() // callback on SystemService instead. stopUser(userInfo.id, /* force= */ true, /* stopUserCallback= */ null, /* keyEvictedCallback= */ null); return; Loading
services/core/java/com/android/server/pm/UserManagerService.java +4 −4 Original line number Diff line number Diff line Loading @@ -2986,8 +2986,8 @@ public class UserManagerService extends IUserManager.Stub { // Must start user (which will be stopped right away, through // UserController.finishUserUnlockedCompleted) so services can properly // intialize it. // TODO(b/140750212): in the long-term, we should add a onCreateUser() callback // on SystemService instead. // TODO(b/143092698): in the long-term, it might be better to add a onCreateUser() // callback on SystemService instead. Slog.i(LOG_TAG, "starting pre-created user " + userInfo.toFullString()); final IActivityManager am = ActivityManager.getService(); try { Loading @@ -3003,7 +3003,7 @@ public class UserManagerService extends IUserManager.Stub { Binder.restoreCallingIdentity(ident); } // TODO(b/140750212): it's possible to reach "max users overflow" when the user is created // TODO(b/143092698): it's possible to reach "max users overflow" when the user is created // "from scratch" (i.e., not from a pre-created user) and reaches the maximum number of // users without counting the pre-created one. Then when the pre-created is converted, the // "effective" number of max users is exceeds. Example: Loading Loading @@ -3048,7 +3048,7 @@ public class UserManagerService extends IUserManager.Stub { * <p>Should be used only during user creation, so the pre-created user can be used (instead of * creating and initializing a new user from scratch). */ // TODO(b/140750212): add unit test // TODO(b/143092698): add unit test @GuardedBy("mUsersLock") private @Nullable UserData getPreCreatedUserLU(@UserInfoFlag int flags) { if (DBG) { Loading