Merge "Fix for race condition when clearing compaction list" into tm-dev

This commit is contained in:
TreeHugger Robot
2022-03-03 06:06:10 +00:00
committed by Android (Google) Code Review

View File

@@ -1056,7 +1056,9 @@ public final class CachedAppOptimizer {
if(wakefulness == PowerManagerInternal.WAKEFULNESS_AWAKE) {
// Remove any pending compaction we may have scheduled to happen while screen was off
Slog.e(TAG_AM, "Cancel pending or running compactions as system is awake");
mPendingCompactionProcesses.clear();
synchronized(mProcLock) {
mPendingCompactionProcesses.clear();
}
cancelCompaction();
}
}