Bubble bar expland/collapse animation when on left

Fix bubble bar collapse and expand animations when bubble bar is pinned
to the left.
When system language is set to an RTL language, bubble bar gets pinned
to the left edge of the screen.
Bubble bar should expand to the right and collapse to the left. Bubbles
in the bubble bar should be ordered from right to left. The most recent
bubble should be at the right in the bubble bar.

Known issue:
  - when the most recent bubble is removed, the arrow animates to a new
    position, but the background is not animated, resulting in arrow
    getting detached from the container. Will be fixed by animating the
    background.

Flag: LEGACY persist.wm.debug.bubble_bar DEVELOPMENT
Bug: 273310265
Test: with LTR language set as the system language
  - expand bubble bar with 1 bubble
  - expand bubble bar with multiple bubbles
  - select second bubble, observe after collapse it is set as first
  - dismiss a bubble from bubble bar by dragging
Test: with RTL language set as the system language
  - expand bubble bar with 1 bubble
  - expand bubble bar with multiple bubbles
  - select second bubble, observe after collapse it is set as first
  - dismiss a bubble from bubble bar by dragging

Change-Id: Ic46a5b1a6e45ad225ba509a61147cc6a8cdd0397
3 files changed