Make sure empty TaskFragment notify organizer

Before, we only notify organizer for empty TaskFragment when either the
Task is empty or the last activity in the TaskFragment is reparented to
PIP task.

However, there can also be cases where the last activity in a
TaskFragment is finished in background. We also want to give it a chance
to remove the TaskFragment.

Bug: 225371112
Test: atest WmTests:TaskFragmentOrganizerControllerTest
Change-Id: Id679524a48a0693f15334f98058aaaf4caac52d2
2 files changed