From ad3ea991f695a0580b3344b68000b48f0d700d4a Mon Sep 17 00:00:00 2001 From: Riddle Hsu Date: Wed, 9 Feb 2022 16:52:48 +0800 Subject: [PATCH] Do not compact animating persistent process To avoid jank when system ui runs animation for screen off. Bug: 214654755 Test: Change CompactThrottlePersistent to 100ms adb shell device_config put activity_manager_native_boot \ compact_throttle_6 100 Turn off screen and event log should not show am_compact for com.android.systemui immediately. Change-Id: Ic245ec5c9217d642f9b6eb73e5a733713fca1275 --- services/core/java/com/android/server/am/OomAdjuster.java | 1 + 1 file changed, 1 insertion(+) diff --git a/services/core/java/com/android/server/am/OomAdjuster.java b/services/core/java/com/android/server/am/OomAdjuster.java index bdfd02e9c25a8..6c9187aaf337b 100644 --- a/services/core/java/com/android/server/am/OomAdjuster.java +++ b/services/core/java/com/android/server/am/OomAdjuster.java @@ -2491,6 +2491,7 @@ public class OomAdjuster { mCachedAppOptimizer.onOomAdjustChanged(state.getSetAdj(), state.getCurAdj(), app); } else if (mService.mWakefulness.get() != PowerManagerInternal.WAKEFULNESS_AWAKE && state.getSetAdj() < ProcessList.FOREGROUND_APP_ADJ + && !state.isRunningRemoteAnimation() // Because these can fire independent of oom_adj/procstate changes, we need // to throttle the actual dispatch of these requests in addition to the // processing of the requests. As a result, there is throttling both here