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

Commit 227c0776 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Add a way to override the stack view expanded state" into main

parents ffe06396 21bab061
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -1172,6 +1172,9 @@ public class BubbleController implements ConfigurationChangeListener,
                if (mStackView.isExpanded()) {
                    ProtoLog.w(WM_SHELL_BUBBLES,
                            "addToWindowManager - BubbleStackView is already expanded!");
                    if (Flags.fixBubbleStackViewExpandedWhenAdded()) {
                        mStackView.overrideCollapsed();
                    }
                }
                mWindowManager.addView(mStackView, mWmLayoutParams);
                mStackView.setOnApplyWindowInsetsListener((view, windowInsets) -> {
+8 −0
Original line number Diff line number Diff line
@@ -2542,6 +2542,14 @@ public class BubbleStackView extends FrameLayout
        }
    }

    /**
     * Fail-safe to set the expanded state to false.
     * See b/417447385.
     */
    void overrideCollapsed() {
        mIsExpanded = false;
    }

    /** Snaps the stack to its expanded state without animation. */
    void snapToExpanded() {
        setExpanded(/* shouldExpand= */ true, /* animateExpansion= */ false);