Consider invisible requested resumed activity as pausing state
When closing or moving a multi-window mode task to background, the
next top activity may be already resumed, so there won't be a pause
request for the closing one. Then it is resumed state and it is in
ActivityTaskSupervisor#mStoppingActivities until the transition is
done to continue pausing or stopping.
Previously, the process activity state doesn't handle the case, then
it will be calculated as background state (some accesses to system
service may be restricted) with bigger oom-adj when the transition
animation is playing.
Now the case will be considered as PAUSING for process state because
the activity is going to be invisible.
Bug: 442068053
Flag: EXEMPT bugfix
Test: WindowProcessControllerTests#testComputeOomAdjFromActivities
Test: Launch a freeform task. Press home key.
Observe WPC#mActivityStateFlags should be
visible->pausing->invisible.
instead of
visible->invisible->pausing->invisible.
Change-Id: I58a69914b2742044616b7e946435b0f65ab2df9a
Loading
Please register or sign in to comment