Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4f655de3 authored by Andreas Gampe's avatar Andreas Gampe Committed by Android (Google) Code Review
Browse files

Merge "Frameworks/base: Refactor TextView initialization" into nyc-dev

parents 63f2c9b0 ddc1397e
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -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.
+2 −0
Original line number Diff line number Diff line
@@ -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;

@@ -214,6 +215,7 @@ public class ZygoteInit {

    private static void preloadTextResources() {
        Hyphenator.init();
        TextView.preloadFontCache();
    }

    /**