Fix resuming with focusable always-on-top stacks
When a picture-in-picture menu activity (focusable always-on-top)
is active, the other stacks are always behind it. Then the top
focused is occupied and causes unable to resume the next activity
on another stack properly.
Now not only the z-order of stacks, but also consider the stack
that is preferred to be put at top to decide the focused stack.
Bug: 112084174
Test: atest ActivityDisplayTests
Test: atest ActivityStackSupervisorTests
Change-Id: I93c446f281001afd3c84a3862e31b4682919ab39
5 files changed