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

Commit ba395508 authored by Mady Mellor's avatar Mady Mellor
Browse files

Fix an issue where bubbles didn't collapse onTaskMovedToFront

I noticed when opening settings while stack is expanded wouldn't
cause the stack to collapse. This was because we skipped the collapse
if the shade was expanded. I don't think there's any reason to be
doing this, I think this was accidentally added during the refactor
to move bubbles into shell.

Test: manual - have bubbles expanded, pull down the shade, tap on
               the settings gear or long press on a tile, ensure that
               when the settings screen opens that the stack collapsed
Bug: 223635739
Change-Id: Ia3476e694a8e64c95eed63dea4a3729e83766683
parent 4ab407e5
Loading
Loading
Loading
Loading
+9 −17
Original line number Diff line number Diff line
@@ -383,24 +383,16 @@ public class BubbleController {
        mTaskStackListener.addListener(new TaskStackListenerCallback() {
            @Override
            public void onTaskMovedToFront(int taskId) {
                if (mSysuiProxy == null) {
                    return;
                }

                mSysuiProxy.isNotificationShadeExpand((expand) -> {
                mMainExecutor.execute(() -> {
                    int expandedId = INVALID_TASK_ID;
                    if (mStackView != null && mStackView.getExpandedBubble() != null
                                && isStackExpanded() && !mStackView.isExpansionAnimating()
                                && !expand) {
                            && isStackExpanded() && !mStackView.isExpansionAnimating()) {
                        expandedId = mStackView.getExpandedBubble().getTaskId();
                    }

                    if (expandedId != INVALID_TASK_ID && expandedId != taskId) {
                        mBubbleData.setExpanded(false);
                    }
                });
                });
            }

            @Override