Skip to content
Commit 03362023 authored by Lakshman Annadorai's avatar Lakshman Annadorai
Browse files

Skip duplicate USER_SYSTEM start in SystemServiceManager.

On Automotive / Headless System User Mode, the system user will be
started twice - once from ActivityServiceManager and once from an
external/local service that switches the system user to background in
HSUM.

Previously, checking for the current user on the ActivityServiceManager
side helped avoid starting system user twice because
the CarServiceHelperService, which resides in the same process, started
the system user before ActivityServiceManager and switched the user to
the background.
But this doesn't work anymore because the order of these calls are
non-deteministic. The system user start is moved to CarService, which
resides in a separate process (which increases the chances of
the non-deterministic event).

Avoid starting system user twice by explicitly checking against the list
of previously started users on the SystemServiceManager side.
On the ActivityServiceManager side, protect against starting home
displays, and broadcasting system user start/switch on HSUM by
explicitly checking for HSUM.

Test: Build and system bootup is okay.
Bug: 258532055
Change-Id: Ic0af6b030c08995715dd3195801ed271c690ce4a
Merged-In: Ic0af6b030c08995715dd3195801ed271c690ce4a
(cherry picked from commit 123aa680)
parent 818a28d5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment