Move the cached app high watermark logging before the modern trim flag

Since we have the flag on by default now.

Bug: 276460611
Test: adb shell cmd stats pull-source 10189
Change-Id: I543b4467b2347b2f7165e8ba1efdb70a88bd1cd6
This commit is contained in:
Jing Ji
2023-04-26 15:23:56 -07:00
parent 5ee04a8a1c
commit 176464adc2

View File

@@ -1199,6 +1199,9 @@ public class AppProfiler {
.sendToTarget();
}
mCachedAppsWatermarkData.updateCachedAppsHighWatermarkIfNecessaryLocked(
numCached + numEmpty, now);
if (mService.mConstants.USE_MODERN_TRIM) {
// Modern trim is not sent based on lowmem state
// Dispatch UI_HIDDEN to processes that need it
@@ -1316,8 +1319,6 @@ public class AppProfiler {
profile.setTrimMemoryLevel(0);
});
}
mCachedAppsWatermarkData.updateCachedAppsHighWatermarkIfNecessaryLocked(
numCached + numEmpty, now);
return allChanged;
}