Make transition ready if display becomes empty

When finishing the last activity on a display, there is no next
running activity so resume-top won't be called to execute transition
(i.e. setReady). Then make the transition ready explicitly for the
empty case to avoid transition timeout.

Bug: 341599629
Test: atest RootTaskTests#testFinishCurrentActivity
Test: Create a virtual display, launch an activity in it.
      After the activity calls finish, the transition should
      play immediately.
Change-Id: Ib6e981dccc253ad3d5dd92f4a5edf0c914bf7f81
2 files changed