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

Commit 06397516 authored by Felipe Leme's avatar Felipe Leme
Browse files

Don't send HOME intent twice when booting from non-system user.

When Automotive boots, CarServiceHelperService "restarts" the system user in the background, so it
can be unlocked. Consequently, some boot tasks will be executed twice (triggered from
UserController.startUser() and ActivityManager.systemReady()).

Test: manual verification
Bug: 139502237

Merged-In: Idd8beedf1ea034b47b9756b91404c5a043965c23
Change-Id: Idd8beedf1ea034b47b9756b91404c5a043965c23
parent 712fc079
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -9047,7 +9047,13 @@ public class ActivityManagerService extends IActivityManager.Stub
                    throw e.rethrowAsRuntimeException();
                }
            }
            // On Automotive, at this point the system user has already been started and unlocked,
            // and some of the tasks we do here have already been done. So skip those in that case.
            final boolean bootingSystemUser = currentUserId == UserHandle.USER_SYSTEM;
            if (bootingSystemUser) {
                mAtmInternal.startHomeOnAllDisplays(currentUserId, "systemReady");
            }
            mAtmInternal.showSystemReadyErrorDialogsIfNeeded();