Stash the taskbar on every bubble bar expansion

Added logic to enable BubbleBarView to  notify BubbleBarViewController
of expanded state change. Also updated all the test that uses
BubbleBarView to pass empty Controller.

Fixes: 411304392
Flag: com.android.wm.shell.enable_bubble_bar
Test: Manual. Go to any app. Swipe up to show the taskbar. Trigger any
bubble. Observe taskbar is stashed on bubble bar expanded.

Change-Id: I88ad167eb0ed444629716df3672bbb06ca8adcc4
This commit is contained in:
mpodolian
2025-04-17 16:53:01 -07:00
parent a582c90fa1
commit 04bd5b49ea
6 changed files with 99 additions and 4 deletions
@@ -1191,7 +1191,7 @@ public class BubbleBarView extends FrameLayout {
mUpdateSelectedBubbleAfterCollapse = updateSelectedBubbleAfterCollapse;
}
void setController(Controller controller) {
public void setController(Controller controller) {
mController = controller;
}
@@ -1320,6 +1320,7 @@ public class BubbleBarView extends FrameLayout {
mWidthAnimator.start();
updateBubbleAccessibilityStates();
announceExpandedStateChange();
mController.onBubbleBarExpandedStateChanged(mIsBarExpanded);
}
}
@@ -1643,7 +1644,7 @@ public class BubbleBarView extends FrameLayout {
}
/** Interface for BubbleBarView to communicate with its controller. */
interface Controller {
public interface Controller {
/** Returns the screen height. */
int getScreenHeight();
@@ -1666,5 +1667,8 @@ public class BubbleBarView extends FrameLayout {
/** Notifies the controller that bubble bar is being dragged */
void setIsDragging(boolean dragging);
/** Notifies the controller that bubble bar expanded state changed */
void onBubbleBarExpandedStateChanged(boolean expanded);
}
}