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
2 files changed