diff options
author | Amith Yamasani <yamasani@google.com> | 2018-09-05 18:52:35 -0700 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2018-10-20 00:17:38 +0000 |
commit | 553bb7c6a2b2c70b1cd011aec9bf9c151818d8c3 (patch) | |
tree | 7c1f72f5814f32b6ac9de4c99e67aa0cc7e95ca4 /rs/java/android/renderscript/ProgramFragmentFixedFunction.java | |
parent | fe0e09e4e384ec26a4a6f5ffba1f6e60dae2a7f4 (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
(cherry picked from commit b735830a1e71e72c4e72260d7eab0382b4ee19df)
Diffstat (limited to 'rs/java/android/renderscript/ProgramFragmentFixedFunction.java')
0 files changed, 0 insertions, 0 deletions