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

Commit 18c3e398 authored by Seigo Nonaka's avatar Seigo Nonaka
Browse files

Load preinstalled sytem font if fs-verity is not supported

Some form factor doesn't support fs-verity and it ends up with NPE
during boot because of empty system font map.
To work on such environment, load preinstalled system font before
serializing system font map.

Bug: N/A
Test: N/A
Change-Id: Ibc4d512e1a70d9e7be889ea7b1e6afa5e45b1bbb
parent b3417719
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -269,6 +269,9 @@ public final class FontManagerService extends IFontManager.Stub {
        synchronized (mUpdatableFontDirLock) {
            mUpdatableFontDir = createUpdatableFontDir();
            if (mUpdatableFontDir == null) {
                // If fs-verity is not supported, load preinstalled system font map and use it for
                // all apps.
                Typeface.loadPreinstalledSystemFontMap();
                setSerializedFontMap(serializeSystemServerFontMap());
                return;
            }