diff options
| author | TreeHugger Robot <treehugger-gerrit@google.com> | 2020-12-02 23:06:16 +0000 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2020-12-02 23:06:16 +0000 |
| commit | 6095771fe5d1182bdb11e5b9eef6ccbe8cc90e18 (patch) | |
| tree | 01ba8e15e2c9dcbf6f923059c6b2efab501cec66 /core/java | |
| parent | b201a7e0ee769f9773e3c11e5feb19c9627be51d (diff) | |
| parent | a9248444ac13448a8624fdeb06628f108c3c38b8 (diff) | |
Merge "Don't use serialized system font map if disabled."
Diffstat (limited to 'core/java')
| -rw-r--r-- | core/java/android/app/ActivityThread.java | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java index d9c0c71d44ae..2e08fc80b179 100644 --- a/core/java/android/app/ActivityThread.java +++ b/core/java/android/app/ActivityThread.java @@ -6417,11 +6417,13 @@ public final class ActivityThread extends ClientTransactionHandler { */ LocaleList.setDefault(data.config.getLocales()); - try { - Typeface.setSystemFontMap(data.mSerializedSystemFontMap); - } catch (IOException | ErrnoException e) { - Slog.e(TAG, "Failed to parse serialized system font map"); - Typeface.loadPreinstalledSystemFontMap(); + 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) { |
