Fix flake in BubbleBarViewAnimatorTest

The flake was probably happening because the animation end listener
has not finished running on the UI thread. This change waits for
the UI thread to become idle before proceeding.

Flag: com.android.wm.shell.enable_bubble_bar
Bug: 341161005
Test: ran BubbleBarViewAnimatorTest#animateToInitialState_inApp 100x
Change-Id: Ide3b0a34095ed01cc179534fa608aecd5d3f3a20
1 file changed