Loading core/java/android/widget/TextView.java +3 −2 Original line number Diff line number Diff line Loading @@ -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. Loading core/java/com/android/internal/os/ZygoteInit.java +2 −0 Original line number Diff line number Diff line Loading @@ -36,6 +36,7 @@ import android.text.Hyphenator; import android.util.EventLog; import android.util.Log; import android.webkit.WebViewFactory; import android.widget.TextView; import com.android.internal.os.InstallerConnection.InstallerException; Loading Loading @@ -214,6 +215,7 @@ public class ZygoteInit { private static void preloadTextResources() { Hyphenator.init(); TextView.preloadFontCache(); } /** Loading Loading
core/java/android/widget/TextView.java +3 −2 Original line number Diff line number Diff line Loading @@ -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. Loading
core/java/com/android/internal/os/ZygoteInit.java +2 −0 Original line number Diff line number Diff line Loading @@ -36,6 +36,7 @@ import android.text.Hyphenator; import android.util.EventLog; import android.util.Log; import android.webkit.WebViewFactory; import android.widget.TextView; import com.android.internal.os.InstallerConnection.InstallerException; Loading Loading @@ -214,6 +215,7 @@ public class ZygoteInit { private static void preloadTextResources() { Hyphenator.init(); TextView.preloadFontCache(); } /** Loading