Merge "Don't freeze apps in the power exemption allow list." into tm-dev am: 2ccba9feb0 am: 59b6143788

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19140263

Change-Id: Ifc19dac5b2b6a3d0b33fa33a043afec94215bf0f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Hui Yu
2022-07-06 18:39:12 +00:00
committed by Automerger Merge Worker

View File

@@ -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;