| commit | c65ea181da71fab4d911da010c7413492104df4d | [log] [tgz] |
|---|---|---|
| author | Seigo Nonaka <nona@google.com> | Wed Jan 25 22:25:10 2017 +0900 |
| committer | Seigo Nonaka <nona@google.com> | Wed Jan 25 22:25:10 2017 +0900 |
| tree | 477c3fdf258d27554c06b60674b8e6994651fb07 | |
| parent | 954cfce18d94c30c84899b38fed4e09aaa6e601d [diff] |
Fix crash with FontProvider Need to freeze the FontFamily otherwise the FontFamily is not created. Test: manually done Change-Id: I81a6f0d295f13bbeb059deafb4283654f97c0090
diff --git a/graphics/java/android/graphics/Typeface.java b/graphics/java/android/graphics/Typeface.java index 7a7c7af..38e8061 100644 --- a/graphics/java/android/graphics/Typeface.java +++ b/graphics/java/android/graphics/Typeface.java
@@ -237,6 +237,7 @@ IoUtils.closeQuietly(fd); } } + fontFamily.freeze(); callback.onTypefaceRetrieved(Typeface.createFromFamiliesWithDefault( new FontFamily[] {fontFamily})); }