diff options
| author | 2023-03-19 20:59:55 -0700 | |
|---|---|---|
| committer | 2023-04-03 18:50:06 -0700 | |
| commit | 09dbf1fdbee6d155917a15f669b9fbda1fd750ab (patch) | |
| tree | 1899868856f5e94c662263a06d6e1d9f34fd5917 /libs/androidfw/ObbFile.cpp | |
| parent | 74da091e71c42fe02dd220e4b7fb612e38425799 (diff) | |
Add support for modern trim memory dispatch.
This CL adds flagged implementation of onTrimMemory dispatch to
improve consistency of dispatch and prevent unnecessary work from
unnecessary onTrimMemory calls. When the flag is enabled, trim level
dispatch is coupled to process state and completely decoupled from
memory state.
- When an app becomes eligible for freezing, TRIM_MEMORY_BACKGROUND
will be triggered.
- Due to the likelihood of causing additional memory pressure when the
device is already under memory pressure, no other TRIM_MEMORY
constants will be used.
This implementation is behind the ActivityManager "use_modern_trim"
flag, which is currently set to false.
Test: atest android.app.cts.ActivityManagerTest
Bug: 253914117
Change-Id: I2c5b7db4b322723c2cc608d5f67946b8ccf77efb
Diffstat (limited to 'libs/androidfw/ObbFile.cpp')
0 files changed, 0 insertions, 0 deletions