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

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

Merge "Sleep in ZygoteProcess.start() if ablation study enabled" into main

parents 449a634c 5fad1b4f
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -360,6 +360,17 @@ public class ZygoteProcess {
                                                  boolean bindMountAppStorageDirs,
                                                  boolean bindOverrideSysprops,
                                                  @Nullable String[] zygoteArgs) {
        if (Flags.zygoteAppLaunchLatencyAblation()) {
            final long sleepUntilMs = System.currentTimeMillis() + 5;
            long nextSleepMs = 5;
            while (nextSleepMs > 0) {
                try {
                    Thread.sleep(nextSleepMs);
                } catch (InterruptedException ignored) {}
                nextSleepMs = sleepUntilMs - System.currentTimeMillis();
            }
        }

        // TODO (chriswailes): Is there a better place to check this value?
        if (fetchUsapPoolEnabledPropWithMinInterval()) {
            informZygotesOfUsapPoolStatus();