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

Commit 6c9af96d authored by Brian Carlstrom's avatar Brian Carlstrom
Browse files

Add zygote preloading of shared libraries

Bug: 17459019
Change-Id: I7cb4ecd0ec9542aa9079420fe158cedca7fca028
parent 532e551e
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -254,12 +254,20 @@ public class ZygoteInit {
        preloadClasses();
        preloadResources();
        preloadOpenGL();
        preloadSharedLibraries();
        // Ask the WebViewFactory to do any initialization that must run in the zygote process,
        // for memory sharing purposes.
        WebViewFactory.prepareWebViewInZygote();
        Log.d(TAG, "end preload");
    }

    private static void preloadSharedLibraries() {
        Log.i(TAG, "Preloading shared libraries...");
        System.loadLibrary("android");
        System.loadLibrary("compiler_rt");
        System.loadLibrary("jnigraphics");
    }

    private static void preloadOpenGL() {
        if (!SystemProperties.getBoolean(PROPERTY_DISABLE_OPENGL_PRELOADING, false)) {
            EGL14.eglGetDisplay(EGL14.EGL_DEFAULT_DISPLAY);