Don't animate bubbles in the initial state update

When launcher receives the initial bubble state update from sysui, don't animate the bubbles. The initial update is sent when bubble bar is created and not when new bubbles are created.

Flag: ACONFIG com.android.wm.shell.enable_bubble_bar DEVELOPMENT
Bug: 280605846
Test: manual
Change-Id: I74b09220be22d7382fa6d7c1351d5e60a799a054
This commit is contained in:
Liran Binyamin
2024-04-05 20:15:52 -04:00
parent c21852a186
commit 0701ab166d
2 changed files with 12 additions and 4 deletions
@@ -315,13 +315,17 @@ public class BubbleBarViewController {
/**
* Adds the provided bubble to the bubble bar.
*/
public void addBubble(BubbleBarItem b, boolean isExpanding) {
public void addBubble(BubbleBarItem b, boolean isExpanding, boolean suppressAnimation) {
if (b != null) {
mBarView.addView(b.getView(), 0,
new FrameLayout.LayoutParams(mIconSize, mIconSize, Gravity.LEFT));
b.getView().setOnClickListener(mBubbleClickListener);
mBubbleDragController.setupBubbleView(b.getView());
if (suppressAnimation) {
return;
}
boolean isStashedOrGone =
mBubbleStashController.isStashed() || mBarView.getVisibility() != VISIBLE;
// don't animate the new bubble if we're auto expanding from stashed