Merge "Skip stopping the BG services for the new processes" into udc-dev

This commit is contained in:
Jing Ji
2023-04-14 17:30:30 +00:00
committed by Android (Google) Code Review

View File

@@ -1482,7 +1482,10 @@ public class OomAdjuster {
}
if (uidRec.isIdle() && !uidRec.isSetIdle()) {
uidChange |= UidRecord.CHANGE_IDLE;
becameIdle.add(uidRec);
if (uidRec.getSetProcState() != PROCESS_STATE_NONEXISTENT) {
// don't stop the bg services if it's just started.
becameIdle.add(uidRec);
}
}
} else {
if (uidRec.isIdle()) {