Ensure listeners got notified whenever positioned a task to front
Task listeners not always get notified when a task move to front
because the event was only scheduled in Task#moveTaskToFront().
Now we are doing that while positioning tasks.
Also moved #updateTaskMovement to Task#positionChildAt() vs.
invoked in several places.
Note that the intermediate tasks-to-front changes of a certain
procedure would all be sent to listeners. For example, now the
#onTaskMovedToFront would be called twice when starting a task
from recents, because the home task was moved to front before
moving the target task to top.
Bug: 134632511
Test: atest TaskStackChangedListenerTest
Change-Id: I6dbb3d4af18ecf9949ab26ce8b1f60d1ae300852
3 files changed