Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0dc01933 authored by Xiaohui Chen's avatar Xiaohui Chen Committed by Android (Google) Code Review
Browse files

Merge "multiuser: postpone user cleanup to systemready" into mnc-dev

parents 1336c2c6 4be96e4e
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -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));