diff options
| author | 2018-08-22 21:45:20 +0000 | |
|---|---|---|
| committer | 2018-08-22 21:45:20 +0000 | |
| commit | 83f8d6d2e1b7690dbb30f17254db2da5e70bd280 (patch) | |
| tree | dadb6c1cff28be73bffc3e5336845020fe2037b9 /graphics/java | |
| parent | 66341f0ef473186ed779389c150f332e1125a494 (diff) | |
| parent | 2bc7087125205863a7e520afbf9e8dc63c3f40e8 (diff) | |
Merge "Fix robolectric test"
Diffstat (limited to 'graphics/java')
| -rw-r--r-- | graphics/java/android/graphics/Typeface.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/graphics/java/android/graphics/Typeface.java b/graphics/java/android/graphics/Typeface.java index 7fa748461c2d..52806423c336 100644 --- a/graphics/java/android/graphics/Typeface.java +++ b/graphics/java/android/graphics/Typeface.java @@ -1008,7 +1008,10 @@ public class Typeface { SystemFonts.getAliases()); sSystemFontMap = Collections.unmodifiableMap(systemFontMap); - setDefault(sSystemFontMap.get(DEFAULT_FAMILY)); + // We can't assume DEFAULT_FAMILY available on Roboletric. + if (sSystemFontMap.containsKey(DEFAULT_FAMILY)) { + setDefault(sSystemFontMap.get(DEFAULT_FAMILY)); + } // Set up defaults and typefaces exposed in public API DEFAULT = create((String) null, 0); |