commit | e022085160750ad79c1d3b98ace89b22047db13d | [log] [tgz] |
---|---|---|
author | Jerome Gaillard <[email protected]> | Wed Apr 03 13:31:41 2019 +0100 |
committer | Jerome Gaillard <[email protected]> | Tue Apr 09 13:04:26 2019 +0000 |
tree | c779d1034cbbcfaea288e76bcc3b72bcd6c0fb40 | |
parent | 9c48dd49c7eb8d13112b28fdb5344559960381fa [diff] |
Dispose Typeface cache only if Typeface was initialized Bug: 74062470 Test: tested from Studio Change-Id: I049c982b977ab5d7d6c69f0f341f1c15b3aa2219
diff --git a/bridge/src/com/android/layoutlib/bridge/Bridge.java b/bridge/src/com/android/layoutlib/bridge/Bridge.java index 70ccdb6..4072bf3 100644 --- a/bridge/src/com/android/layoutlib/bridge/Bridge.java +++ b/bridge/src/com/android/layoutlib/bridge/Bridge.java
@@ -361,7 +361,9 @@ BridgeAssetManager.clearSystem(); // dispose of the default typeface. - Typeface.sDynamicTypefaceCache.evictAll(); + if (sIsTypefaceInitialized) { + Typeface.sDynamicTypefaceCache.evictAll(); + } sProject9PatchCache.clear(); sProjectBitmapCache.clear();