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

Commit 868e6cbf authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Improved some headless system user comments."

parents 6a814fba 58e751fd
Loading
Loading
Loading
Loading
+4 −4
Original line number Original line Diff line number Diff line
@@ -9154,10 +9154,10 @@ public class ActivityManagerService extends IActivityManager.Stub
                }
                }
                t.traceEnd();
                t.traceEnd();
            }
            }
            // Automotive will re-start system user as background (so its unlocked), then start a
            // full user as foreground. Hence, we need to skip some steps that would otherwise be
            // On Automotive, at this point the system user has already been started and unlocked,
            // done twice.
            // and some of the tasks we do here have already been done. So skip those in that case.
            // TODO(b/138956267): this workdound shouldn't be necessary once we move the
            // TODO(b/132262830): this workdound shouldn't be necessary once we move the
            // headless-user start logic to UserManager-land
            // headless-user start logic to UserManager-land
            final boolean bootingSystemUser = currentUserId == UserHandle.USER_SYSTEM;
            final boolean bootingSystemUser = currentUserId == UserHandle.USER_SYSTEM;
+4 −3
Original line number Original line Diff line number Diff line
@@ -1755,9 +1755,10 @@ class UserController implements Handler.Callback {
        for (int i = 0; i < startedUsers.size(); i++) {
        for (int i = 0; i < startedUsers.size(); i++) {
            UserState uss = startedUsers.valueAt(i);
            UserState uss = startedUsers.valueAt(i);
            if (systemUserFinishedBooting && uss.mHandle.isSystem()) {
            if (systemUserFinishedBooting && uss.mHandle.isSystem()) {
                // Automotive will re-start system user as background, which in turn will call
                // On Automotive, at this point the system user has already been started and
                // finishUserboot(). Hence, we need to check it here to avoid calling it twice.
                // unlocked, and some of the tasks we do here have already been done. So skip those
                // TODO(b/138956267): this workdound shouldn't be necessary once we move the
                // in that case.
                // TODO(b/132262830): this workdound shouldn't be necessary once we move the
                // headless-user start logic to UserManager-land
                // headless-user start logic to UserManager-land
                Slog.d(TAG, "sendBootCompleted(): skipping on non-current system user");
                Slog.d(TAG, "sendBootCompleted(): skipping on non-current system user");
                continue;
                continue;