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

Commit 6095771f authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Don't use serialized system font map if disabled."

parents b201a7e0 a9248444
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
@@ -6417,12 +6417,14 @@ public final class ActivityThread extends ClientTransactionHandler {
         */
        LocaleList.setDefault(data.config.getLocales());

        if (Typeface.ENABLE_LAZY_TYPEFACE_INITIALIZATION) {
            try {
                Typeface.setSystemFontMap(data.mSerializedSystemFontMap);
            } catch (IOException | ErrnoException e) {
                Slog.e(TAG, "Failed to parse serialized system font map");
                Typeface.loadPreinstalledSystemFontMap();
            }
        }

        synchronized (mResourcesManager) {
            /*
+3 −0
Original line number Diff line number Diff line
@@ -64,6 +64,9 @@ public final class FontManagerService {

    @Nullable
    private SharedMemory getSerializedSystemFontMap() {
        if (!Typeface.ENABLE_LAZY_TYPEFACE_INITIALIZATION) {
            return null;
        }
        synchronized (FontManagerService.this) {
            if (mSerializedSystemFontMap == null) {
                mSerializedSystemFontMap = createSerializedSystemFontMapLocked();