Fix small issue with task org state cleanup
- When the task org binder died, it previously did not remove from
the mTaskOrganizersForWindowingMode list and handle replacements
the same way as unregistering. Likewise when unregistering,
the code to handle replacements could override the existing
state since it only checks if the previous state was not disposed
before setting it.
Alternatively, we can keep the list of TaskOrganizerStates for a
windowing mode in a list. The last item in the list is the current
task org for that windowing mode. When a task org is removed or
its binder dies, we simply remove from that list.
Bug: 152134222
Test: atest WmTests:TaskOrganizerTests
Change-Id: I1c7fd8907c7f025da25d62b0fa939edbb789e0cb
2 files changed