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

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

Merge "Ensure the compaction handler is only used when compaction is enabled." into main

parents 6aaf8c38 6f74ca55
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -700,6 +700,9 @@ public class CachedAppOptimizer {
        if(compactProfile == null || compactProfile.equals(CompactProfile.NONE)) {
            return false;
        }
        if (mCompactionHandler == null) {
            return false;
        }
        final String processName = (app.processName != null ? app.processName : "");
        mCompactStatsManager.logCompactionRequested(source, compactProfile, processName);

@@ -728,9 +731,11 @@ public class CachedAppOptimizer {
    }

    void compactNative(CompactProfile compactProfile, int pid) {
        if (useCompaction()) {
            mCompactionHandler.sendMessage(mCompactionHandler.obtainMessage(
                    COMPACT_NATIVE_MSG, pid, compactProfile.ordinal()));
        }
    }

    void compactAllSystem() {
        if (useCompaction()) {