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

Commit 1e795c33 authored by Winson Chung's avatar Winson Chung
Browse files

Handle cases where bubble transitions for newly launched tasks

- When a bubble invocation is done via a path that isn't associated with
  a particular task (ie. via taskbar menu or notification vs app handle),
  we can use a mixed transition to start a new bubble transition.  This
  is necessary also to allow other features to hook into the enter-bubble
  flow, to clean up as well (ie. when entering via split in the future),
  or when handling transitions out of bubbles.

Bug: 396313972
Bug: 408328557
Flag: EXEMPT bugfix
Test: atest WMShellUnitTests
Test: Launch an app, invoke bubble via taskbar for the same app
Change-Id: I346b999e4c49ff3b11efc8523eedc6d98e0b6fc0
parent 06523e8e
Loading
Loading
Loading
Loading
+6 −8
Original line number Diff line number Diff line
@@ -1592,7 +1592,11 @@ public class BubbleController implements ConfigurationChangeListener,
            mBubbleData.setSelectedBubbleAndExpandStack(b, updateLocation);
        } else {
            b.enable(Notification.BubbleMetadata.FLAG_AUTO_EXPAND_BUBBLE);
            inflateAndAdd(b, /* suppressFlyout= */ true, /* showInShade= */ false, updateLocation);

            ensureBubbleViewsAndWindowCreated();
            mBubbleTransitions.startLaunchIntoOrConvertToBubble(b, mExpandedViewManager,
                    mBubbleTaskViewFactory, mBubblePositioner, mStackView, mLayerView,
                    mBubbleIconFactory, mInflateSynchronously);
        }
    }

@@ -3363,13 +3367,7 @@ public class BubbleController implements ConfigurationChangeListener,
            if (tinfo == null) {
                return;
            }
            Bubble bub = null;
            for (Bubble b : mBubbleData.getBubbles()) {
                if (b.getTaskId() == tinfo.taskId) {
                    bub = b;
                    break;
                }
            }
            Bubble bub = mBubbleData.getBubbleInStackWithTaskId(tinfo.taskId);
            if (bub == null) {
                return;
            }
Loading