Make tv menu mode switch wait for focus change

The TvPipMenuController switches between menu modes and requests focus
changes from the WM. However, the focus change is not directly tied to
the switch of the menu modes. Meaning that if something goes wrong in
the focus changing, we would end up in a state where e.g. the pip menu
is open, but the window doesn't have any focus, which looks broken.

This CL makes the mode switching happen after any needed focus changes
are complete.

Bug: 277045365
Test: atest TvPipMenuControllerTest

Change-Id: I1e728e78dd56eba172745bf5dc4b4efcee22de84
3 files changed