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

Commit 8154bddc authored by Yeabkal Wubshit's avatar Yeabkal Wubshit Committed by Android (Google) Code Review
Browse files

Merge "Ensure font is loaded by PHASE_SYSTEM_SERVICES_READY" into main

parents 28771332 efd40ba9
Loading
Loading
Loading
Loading
+13 −0
Original line number Original line Diff line number Diff line
@@ -52,6 +52,19 @@ flag {
  bug: "304406888"
  bug: "304406888"
}
}


flag {
  name: "complete_font_load_in_system_services_ready"
  namespace: "text"
  description: "Fix to ensure that font loading is complete on system-services-ready boot phase."
  # Make read only, as font loading is in the critical boot path which happens before the read-write
  # flags propagate to the device.
  is_fixed_read_only: true
  bug: "327941215"
  metadata {
    purpose: PURPOSE_BUGFIX
  }
}

flag {
flag {
  name: "phrase_strict_fallback"
  name: "phrase_strict_fallback"
  namespace: "text"
  namespace: "text"
+5 −1
Original line number Original line Diff line number Diff line
@@ -165,7 +165,11 @@ public final class FontManagerService extends IFontManager.Stub {


        @Override
        @Override
        public void onBootPhase(int phase) {
        public void onBootPhase(int phase) {
            if (phase == SystemService.PHASE_ACTIVITY_MANAGER_READY) {
            final int latestFontLoadBootPhase =
                    (Flags.completeFontLoadInSystemServicesReady())
                            ? SystemService.PHASE_SYSTEM_SERVICES_READY
                            : SystemService.PHASE_ACTIVITY_MANAGER_READY;
            if (phase == latestFontLoadBootPhase) {
                // Wait for FontManagerService to start since it will be needed after this point.
                // Wait for FontManagerService to start since it will be needed after this point.
                mServiceStarted.join();
                mServiceStarted.join();
            }
            }