Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 782bf747 authored by Liran Binyamin's avatar Liran Binyamin Committed by Android (Google) Code Review
Browse files

Merge "Reset bubbles expanded state after folding" into main

parents bd8a2af0 95a5f05c
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -2007,7 +2007,9 @@ public class BubbleController implements ConfigurationChangeListener,
                if (mStackView != null) {
                    b.setSuppressFlyout(true);
                    mStackView.addBubble(b);
                    if (b.getKey().equals(mBubbleData.getSelectedBubbleKey())) {
                        mStackView.setSelectedBubble(b);
                    }
                } else {
                    Log.w(TAG, "Tried to add a bubble to the stack but the stack is null");
                }
@@ -2019,6 +2021,11 @@ public class BubbleController implements ConfigurationChangeListener,
                }
            };
        }
        // TODO (b/380105874): Remove this after properly transitioning the expanded bubble from bar
        // to floating
        if (mStackView != null && mBubbleData.isExpanded()) {
            mBubbleData.collapseNoUpdate();
        }
        for (int i = mBubbleData.getBubbles().size() - 1; i >= 0; i--) {
            Bubble bubble = mBubbleData.getBubbles().get(i);
            bubble.inflate(callback,
+5 −0
Original line number Diff line number Diff line
@@ -371,6 +371,11 @@ public class BubbleData {
        dispatchPendingChanges();
    }

    /** Sets the expanded state to false without dispatching changes. */
    public void collapseNoUpdate() {
        mExpanded = false;
    }

    /**
     * Sets the selected bubble and expands it, but doesn't dispatch changes
     * to {@link BubbleData.Listener}. This is used for updates coming from launcher whose views