Handle new bubble notification during animation

When a new bubble notification is pushed during an ongoing animation
we now update it to reflect the new bubble.
 - If the current animation is in the middle of animating in,
   we only update the animating bubble without interrupting the
   current animation. The flyout content will show the data for the
   new bubble.
 - If the current animation is in the IN state, then the flyout is
   showing and we're just waiting for it to be hidden. In this case
   we update the flyout and reschedule the hide animation to run after
   a delay.
 - If the current animation is animating out,
   - If we're in the middle of collapsing the flyout, we reverse it
     so it shows with the new content and reschedule the hide animation
   - If the flyout is gone already, then we reverse the handle animation
     and show the flyout. If the handle animation is not running, then
     the animation is already over.

Not really related to this change, but while testing one of the tests
was flaky, so rewrote it to make it deterministic.

25x runs: https://android-build.corp.google.com/test_investigate/invocation/I56000010330987902/test/TR44729496826317635/

Demo of interrupting the animation while animating out: http://recall/-/bJtug1HhvXkkeA4MQvIaiP/cu4fLeFlnDkg7mDVaaDTB

Flag: com.android.wm.shell.enable_bubble_bar
Fixes: 277815200
Fixes: 346400677
Test: atest BubbleBarFlyoutControllerTest
Test: atest BubbleBarViewAnimatorTest
Change-Id: I2b4af36d39bedbdfc4a08a988967ccbc33c06522
4 files changed