Don't freeze apps in the power exemption allow list.
Set the "should not freeze" flag in oom adjuster if the app is in the power exemption allow list, as it doesn't make sense to freeze such kind of apps. There is an existing call to update the oom adj when the power exemption list changes. Bug: 237178259 Bug: 231253560 Test: Manual - see b/237178259#comment20 Test: atest CachedAppOptimizerTest Change-Id: I5fd1e623f60680b34096f0e58a088f72bf1089cb
This commit is contained in:
@@ -1482,7 +1482,9 @@ public class OomAdjuster {
|
||||
if (!cycleReEval) {
|
||||
// Don't reset this flag when doing cycles re-evaluation.
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user