Skip to content
Commit e2179925 authored by Seigo Nonaka's avatar Seigo Nonaka
Browse files

Make sure the Typeface is loaded before calling measureText.

This is a clean up CL by resolving TODO in hwui/Typeface.cpp

Usually Typeface is listed in preloaded-classes and loaded during Zygote
initialization. However, on some devices, class preloading is disabled.
Paint.measureText can not be called before Typeface static initializer
and it may not load Typeface class.

To ensure that the font preloading happens in ZygoteInit even on such
devices, refer Typeface.DEFAULT static field in TextView.preloadFontCache
in TextView which also happens during zygote initialization.

Bug: 32374752
Test: Manually done
Change-Id: I773c154671c170bebad3aa0f9c04eee5a664b849
parent 4e55f8a4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment