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

Commit 4c857120 authored by Roman Birg's avatar Roman Birg
Browse files

Themes: don't recreateDefaults on typeface when locale changes



When changing the device locales, we don't need to call recreateDefaults()
every time the locale config has changed, as it is a very expensive
operation.

Change-Id: Iada86642145aa48772e70e89786e482640c75474
Signed-off-by: default avatarRoman Birg <roman@cyngn.com>
parent d6200bdd
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -4157,7 +4157,9 @@ public final class ActivityThread {
            boolean hasFontConfigChange = ((configDiff & ActivityInfo.CONFIG_THEME_FONT) != 0);
            if (hasLocaleConfigChange || hasFontConfigChange) {
                Canvas.freeTextLayoutCaches();
                if (hasFontConfigChange) {
                    Typeface.recreateDefaults();
                }
                if (DEBUG_CONFIGURATION) Slog.v(TAG, "Cleared TextLayout Caches");
            }
        }