diff options
| author | Andreas Gampe <agampe@google.com> | 2016-02-26 16:54:59 -0800 |
|---|---|---|
| committer | Andreas Gampe <agampe@google.com> | 2016-02-29 11:13:01 -0800 |
| commit | ddc1397eba25e17591e3491dddb192b3fa38100f (patch) | |
| tree | fd6647a67b35f71e3f9bfe21ec797d89dca608e9 /core/java/android/widget/TextView.java | |
| parent | 187b9b9e5bb3c6a83a26f2ece23a6cfa16614d03 (diff) | |
Frameworks/base: Refactor TextView initialization
To allow static initialization of a number of View classes based
on TextView, refactor the initialization of the font cache to be
explicit from the zygote.
Bug: 27265238
Change-Id: I1b71086d3f49d8b3e72eea2bf8359351d25fc0fd
Diffstat (limited to 'core/java/android/widget/TextView.java')
| -rw-r--r-- | core/java/android/widget/TextView.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java index 95fcdc179643..f19bf02a238f 100644 --- a/core/java/android/widget/TextView.java +++ b/core/java/android/widget/TextView.java @@ -662,11 +662,12 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener */ private int mDeviceProvisionedState = DEVICE_PROVISIONED_UNKNOWN; - /* + /** * Kick-start the font cache for the zygote process (to pay the cost of * initializing freetype for our default font only once). + * @hide */ - static { + public static void preloadFontCache() { Paint p = new Paint(); p.setAntiAlias(true); // We don't care about the result, just the side-effect of measuring. |
