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

Commit 58e751fd authored by Felipe Leme's avatar Felipe Leme
Browse files

Improved some headless system user comments.

Bug: 132262830
Test: echo 'In TH we trust!'

Change-Id: I5b4f5be227beb6a461497be6034ea48f92c9041c
parent 000fab84
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;