Merge "Preserve bubble bar state." into main

This commit is contained in:
Mykola Podolian authored and Android (Google) Code Review committed 2024-10-31 20:57:36 +00:00
commit db427334f2
5 files changed
+85 -7

No files matched your search

@@ -328,6 +328,7 @@ public class BubbleBarViewController {
}
private void onBubbleClicked(BubbleView bubbleView) {
if (mBubbleBarPinning.isAnimating()) return;
bubbleView.markSeen();
BubbleBarItem bubble = bubbleView.getBubble();
if (bubble == null) {
@@ -922,7 +923,7 @@ public class BubbleBarViewController {
* from Launcher.
*/
public void setExpanded(boolean isExpanded) {
if (isExpanded != mBarView.isExpanded()) {
if (!mBubbleBarPinning.isAnimating() && isExpanded != mBarView.isExpanded()) {
mBarView.setExpanded(isExpanded);
adjustTaskbarAndHotseatToBubbleBarState(isExpanded);
if (!isExpanded) {
@@ -1064,6 +1065,16 @@ public class BubbleBarViewController {
mSystemUiProxy.removeAllBubbles();
}
/** Removes all existing bubble views */
public void removeAllBubbles() {
mBarView.removeAllViews();
}
/** Returns the view index of the existing bubble */
public int bubbleViewIndex(View bubbleView) {
return mBarView.indexOfChild(bubbleView);
}
/**
* Set listener to be notified when bubble bar bounds have changed
*/