diff options
author | Amith Yamasani <yamasani@google.com> | 2018-09-05 18:52:35 -0700 |
---|---|---|
committer | Amith Yamasani <yamasani@google.com> | 2018-09-20 22:38:56 +0000 |
commit | b735830a1e71e72c4e72260d7eab0382b4ee19df (patch) | |
tree | a30529bddb19872315dcbd712214f92a4d29c743 /rs/java/android/renderscript/ProgramStore.java | |
parent | 82b413428e6b10d8d25d00ccb4c3b0b20e05e0a0 (diff) |
Keep app in high memory adjust if moving from TOP to FGS
If an app was in the TOP state and immediately moved
to a foreground service state, then try harder to keep it
in memory for another 20 seconds before releasing the
memory to bound foreground services. Using an oom_adj value
of 50 which is between "fore" and "vis". So BFGS apps might
get killed ("vis") before this recently FGS'ed app. That
way any app that has a lot of state in memory that it needs
to persist before getting killed has a chance to do so.
Also bind NotificationListeners with a special bind flag
to rank them below FGS (perceptible adj) so that they
can be killed before any other foreground services or
bound services get killed.
Bug: 110969183
Test: Manual for now. Take a bunch of portrait
pictures and hit home, while being under memory
pressure with a bunch of notification listeners.
Change-Id: Ie8934c2331afe6450c582b209869aeca7272f58a
Merged-In: Ie8934c2331afe6450c582b209869aeca7272f58a
Diffstat (limited to 'rs/java/android/renderscript/ProgramStore.java')
0 files changed, 0 insertions, 0 deletions