Implement API to animate bubble bar position

Create a new API to animate bubble bar position.
Animating it will not update its laid out location.
To update bubble bar laid out location, BubbleBarUpdate can be used.
Applying a location change from BubbleBarUpdate no longer animates the
change.

Bug: 330585402
Flag: ACONFIG com.android.wm.shell.enable_bubble_bar DEVELOPMENT
Test: long press bubble bar and drag it to left and right
Change-Id: I2572da4c063fc8e07cf07c4303778d343baa4ec4
This commit is contained in:
Ats Jenk
2024-04-09 16:24:41 -07:00
parent 5a8e719b4c
commit d7fe32ab8e
5 changed files with 135 additions and 98 deletions
@@ -215,8 +215,17 @@ public class BubbleBarViewController {
/**
* Update bar {@link BubbleBarLocation}
*/
public void setBubbleBarLocation(BubbleBarLocation bubbleBarLocation, boolean animate) {
mBarView.setBubbleBarLocation(bubbleBarLocation, animate);
public void setBubbleBarLocation(BubbleBarLocation bubbleBarLocation) {
mBarView.setBubbleBarLocation(bubbleBarLocation);
}
/**
* Animate bubble bar to the given location. The location change is transient. It does not
* update the state of the bubble bar.
* To update bubble bar pinned location, use {@link #setBubbleBarLocation(BubbleBarLocation)}.
*/
public void animateBubbleBarLocation(BubbleBarLocation bubbleBarLocation) {
mBarView.animateToBubbleBarLocation(bubbleBarLocation);
}
/**