Clear mPreferredTopFocusableRootTask when root becomes empty
In multi-desks, the focused root task may have its only child desktop window reparented out into the back of another container, leaving the empty root incorrectly set as focused. Clear the TDA preferred focusable root task when this happens so that getFocusedRootTask() doesn't select the empty task as the focused one. Flag: com.android.window.flags.enable_multiple_desktops_backend Bug: 420858253 Test: minimize the last task in a desk, then check dumpsys: 1) mPreferredTopFocusableRootTask is the DesktopWallpaperActivity task 2) Desk remains "active" in DesktopRepository and DesksOrganizer Test: back-nav the last task in a desk (Gmail log in screen to force a move to back instead a of a close) - verify the same as above Change-Id: I0e7fb75a62bb8f8d1444e88e95904ba7224cc354
Loading
Please register or sign in to comment