Fix RecentsView crash when DesktopTask has only 1 task and it is in split mode
This CL fixes a crash happening when no other task is available in Desktop Windowing (DW), and the only task in DW is selected to be part of the pair (split mode). The crash is happening because of the following logic:
- applyLoadPlan skips the staged tasks (for split) from the groupTask when adding the TaskViews to RecentsView.
- If a groupTask has multiple tasks, and one of the tasks is staged, groupTask will be treated as a single task and applyLoadPlan uses the other task (not staged) to create a single TaskView in Overview.
- DesktopTasks returns true for hasMultipleTasks, even when only 1 task is in DW mode. This causes a crash when the only task available in DW is staged for split.
This fix will skip DesktopTaskView creation when split selection is active. In addition, it updates DesktopTask to report multiple tasks only when more than 1 task is its task list.
Fix: 372357270
Fix: 372375086
Fix: 372864249
Flag: EXEMPT bugfix
Test: Manual. Instructions on bug report.
Change-Id: I95e32252a5cac4f6b99296422703d69d129a5a47
5 files changed