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

Commit 4a9e500c authored by Yeabkal Wubshit's avatar Yeabkal Wubshit
Browse files

Ensure font loaded by PHASE_SYSTEM_SERVICES_READY

The previous code ensured font is loaded by the end of
PHASE_SYSTEM_SERVICES_READY for FontManagerService. This
change is a slight tweak to make sure font is loaded by the
time PHASE_SYSTEM_SERVICES_READY begins, so that any other
SystemService can access fonts during PHASE_SYSTEM_SERVICES_READY,
regardless of whether or not they hit PHASE_SYSTEM_SERVICES_READY
before/after FontManagerService.

Bug: 327941215
Change-Id: I20fb4411a8d3cc8ceb2f71c5cc1460cd55ccf2d6
Test: successful boot
parent fe8be976
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -167,7 +167,8 @@ public final class FontManagerService extends IFontManager.Stub {
        public void onBootPhase(int phase) {
            final int latestFontLoadBootPhase =
                    (Flags.completeFontLoadInSystemServicesReady())
                            ? SystemService.PHASE_SYSTEM_SERVICES_READY
                            // Complete font load in the phase before PHASE_SYSTEM_SERVICES_READY
                            ? SystemService.PHASE_LOCK_SETTINGS_READY
                            : SystemService.PHASE_ACTIVITY_MANAGER_READY;
            if (phase == latestFontLoadBootPhase) {
                // Wait for FontManagerService to start since it will be needed after this point.