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

Commit cf40feb5 authored by Liran Binyamin's avatar Liran Binyamin
Browse files

Check the expanded state before expanding

When we get a request from launcher to show the expanded view
we could already have updated the expanded state to collapsed,
so check we're still expanded before showing the expanded view.

Note: the bubble bar still remains expanded and will be fixed
separately on the launcher side.

Bug: 415925442
Flag: com.android.wm.shell.enable_bubble_bar
Test: manual
       - Enable enable_create_any_bubble
       - Long press app and tap "Bubble"
       - Immediately swipe back to dismiss the bubble
       - Observe expanded view is hidden

Change-Id: I0516fe6a0154defea9f3522f92e8b32f5ad7da28
parent c3dd4ee9
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -3195,8 +3195,11 @@ public class BubbleController implements ConfigurationChangeListener,
            executeRemoteCallWithTaskPermission(
                    mController,
                    "showExpandedView",
                    (controller) -> {
                        if (mLayerView != null) {
                    controller -> {
                        // launcher is requesting to show the expanded view in response to sysui
                        // sending an expand signal. check that we didn't already collapse between
                        // these 2 events.
                        if (mLayerView != null && mBubbleData.isExpanded()) {
                            showExpandedViewForBubbleBar();
                        }
                    });