Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6b5d24ae authored by Riddle Hsu's avatar Riddle Hsu
Browse files

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
parent bcd480d7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment