Merge "Don't freeze apps in the power exemption allow list." into tm-dev

This commit is contained in:
Hui Yu
2022-07-06 18:05:27 +00:00
committed by Android (Google) Code Review

View File

@@ -1482,7 +1482,9 @@ public class OomAdjuster {
if (!cycleReEval) { if (!cycleReEval) {
// Don't reset this flag when doing cycles re-evaluation. // Don't reset this flag when doing cycles re-evaluation.
state.setNoKillOnBgRestrictedAndIdle(false); state.setNoKillOnBgRestrictedAndIdle(false);
app.mOptRecord.setShouldNotFreeze(false); // If this UID is currently allowlisted, it should not be frozen.
final UidRecord uidRec = app.getUidRecord();
app.mOptRecord.setShouldNotFreeze(uidRec != null && uidRec.isCurAllowListed());
} }
final int appUid = app.info.uid; final int appUid = app.info.uid;