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

Commit b0897d6b authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Set runtime flag to zygote" into main

parents e562b533 a8e26bab
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ import static android.app.ActivityManager.PROCESS_STATE_NONEXISTENT;
import static android.app.ActivityManagerInternal.OOM_ADJ_REASON_PROCESS_END;
import static android.app.ActivityManagerInternal.OOM_ADJ_REASON_RESTRICTION_CHANGE;
import static android.app.ActivityThread.PROC_START_SEQ_IDENT;
import static android.content.pm.Flags.appCompatOption16kb;
import static android.content.pm.PackageManager.MATCH_DIRECT_BOOT_AUTO;
import static android.net.NetworkPolicyManager.isProcStateAllowedWhileIdleOrPowerSaveMode;
import static android.net.NetworkPolicyManager.isProcStateAllowedWhileOnRestrictBackground;
@@ -2025,6 +2026,16 @@ public final class ProcessList {
                runtimeFlags |= Zygote.USE_APP_IMAGE_STARTUP_CACHE;
            }

            if (appCompatOption16kb()) {
                boolean is16KbDevice = Os.sysconf(OsConstants._SC_PAGESIZE) == 16384;
                if (is16KbDevice
                        && mService.mContext
                        .getPackageManager()
                        .isPageSizeCompatEnabled(app.info.packageName)) {
                    runtimeFlags |= Zygote.ENABLE_PAGE_SIZE_APP_COMPAT;
                }
            }

            String invokeWith = null;
            if (debuggableFlag) {
                // Debuggable apps may include a wrapper script with their library directory.