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

Commit 12ecc5b6 authored by Edgar Arriaga's avatar Edgar Arriaga Committed by Edgar Arriaga García
Browse files

Disable all processes system compaction during idle maintenance

Test: am idle-maintenance
Bug: 314328789
Change-Id: Iee4eb324486f9efaea5d49da45d359b3c918a9c2
parent af4fb1a6
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -164,6 +164,7 @@ import static com.android.server.am.ActivityManagerDebugConfig.TAG_AM;
import static com.android.server.am.ActivityManagerDebugConfig.TAG_WITH_CLASS_NAME;
import static com.android.server.am.MemoryStatUtil.hasMemcg;
import static com.android.server.am.ProcessList.ProcStartHandler;
import static com.android.server.flags.Flags.disableSystemCompaction;
import static com.android.server.net.NetworkPolicyManagerInternal.updateBlockedReasonsWithProcState;
import static com.android.server.pm.PackageManagerService.PLATFORM_PACKAGE_NAME;
import static com.android.server.pm.UserManagerInternal.USER_START_MODE_BACKGROUND;
@@ -8564,8 +8565,10 @@ public class ActivityManagerService extends IActivityManager.Stub
            final long now = SystemClock.uptimeMillis();
            final long timeSinceLastIdle = now - mLastIdleTime;
            if (!disableSystemCompaction()) {
                // Compact all non-zygote processes to freshen up the page cache.
                mOomAdjuster.mCachedAppOptimizer.compactAllSystem();
            }
            final long lowRamSinceLastIdle = mAppProfiler.getLowRamTimeSinceIdleLPr(now);
            mLastIdleTime = now;