Store the existence of home and previous process
WindowProcessController can already know whether there is a home
or previous process. Though a refresh of the states require a
full oom-adj update, trimApplicationsLocked and appDiedLocked
should be frequently enough to update.
This removes potential lock contention when memFactor becomes
not ADJ_MEM_FACTOR_NORMAL when updating oom-adj. This also
reduces the dependency of internal interface across packages.
Bug: 159104503
Bug: 171989664
Test: Launch several apps and run memeater to trigger low mem.
Check the output of "adb shell dumpsys activity processes"
and set break point at AppProfiler to observe the values.
Change-Id: I2fe0eeccdde3ea687ce0d5d856beb3aee886c185
5 files changed