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

Commit f51295cf authored by Jared Duke's avatar Jared Duke Committed by Gerrit Code Review
Browse files

Merge "Support preload of location/media system libs" into main

parents 7f16bfb5 28f2e4b4
Loading
Loading
Loading
Loading
+21 −0
Original line number Diff line number Diff line
@@ -429,6 +429,27 @@ public class ZygoteInit {
                    null /*dependentPackages*/, null /*dependencies*/, false /*isNative*/));
        }

        if (Flags.enableMediaAndLocationPreload()) {
            // As these libraries are technically optional and not necessarily inherited from
            // base_system.mk, only cache them if they exist.
            final String mediaJarPath = "/system/framework/com.android.media.remotedisplay.jar";
            if (new File(mediaJarPath).exists()) {
                libs.add(new SharedLibraryInfo(
                        mediaJarPath, null /*packageName*/,
                        null /*codePaths*/, null /*name*/, 0 /*version*/,
                        SharedLibraryInfo.TYPE_BUILTIN, null /*declaringPackage*/,
                        null /*dependentPackages*/, null /*dependencies*/, false /*isNative*/));
            }
            final String locationJarPath = "/system/framework/com.android.location.provider.jar";
            if (new File(locationJarPath).exists()) {
                libs.add(new SharedLibraryInfo(
                        locationJarPath, null /*packageName*/,
                        null /*codePaths*/, null /*name*/, 0 /*version*/,
                        SharedLibraryInfo.TYPE_BUILTIN, null /*declaringPackage*/,
                        null /*dependentPackages*/, null /*dependencies*/, false /*isNative*/));
            }
        }

        // WindowManager Extensions is an optional shared library that is required for WindowManager
        // Jetpack to fully function. Since it is a widely used library, preload it to improve apps
        // startup performance.
+7 −0
Original line number Diff line number Diff line
@@ -52,6 +52,13 @@ flag {
    bug: "241474956"
}

flag {
    name: "enable_media_and_location_preload"
    namespace: "system_performance"
    description: "Enables zygote preload of non-BCP media and location libraries."
    bug: "241474956"
}

flag {
    name: "use_transaction_codes_for_unknown_methods"
    namespace: "stability"