Per-display focused stacks in AM
This switches to tracking focused stacks for each display instead of a single focused stack in the system. Now ActivityDisplay#getFocusedStack() will return the corresponding instance, if present on display. Previously it was tracked in ActivityStackSupervisor with a field. Now the getter searches for a focusable stack starting from top. Usually it will be the first one - only PiP stack can be on on top and not focused. ActivityStackSupervisor#getFocusedStack() will search across displays for the topmost focusable stack based on the order provided by WM. The assumption that there always exists a focused stack is still true - ActivityStackSupervisor#getFocusedStack() should never return null. There always exists a focusable home stack on the default display. Bug: 111541062 Test: atest com.android.server.am Change-Id: I92922e4298ebbe1c68791bf59406e8f387bcd564
Loading
Please register or sign in to comment