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

Commit b6bca36e authored by mpodolian's avatar mpodolian
Browse files

Don`t notify bubble bar of drag exit if it does not show the drop target

Added logic to check if the bubble bar is still showing the drop target
before sending invocking onItemDraggedOutsideBubbleBarDropZone()

Test: Manual
Flag: com.android.wm.shell.enable_create_any_bubble
Bug: 409417227
Change-Id: Ia3e7b859fdd3f60dff2dd1b97744318d40509f02
parent 2a2f062d
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -663,9 +663,11 @@ public class DragLayout extends LinearLayout
                    mSession = null;
            }
        });
        // notify bubbles of drag cancel
        if (mCurrentBubbleBarTarget != null) {
            // bubble bar is still showing drop target, notify bubbles of drag cancel
            mCurrentBubbleBarTarget = null;
            mBubbleBarDragListener.onItemDraggedOutsideBubbleBarDropZone();
        }
        // Reset the state if we previously force-ignore the bottom margin
        mDropZoneView1.setForceIgnoreBottomMargin(false);
        mDropZoneView2.setForceIgnoreBottomMargin(false);
@@ -693,6 +695,7 @@ public class DragLayout extends LinearLayout
            mBubbleBarDragListener.onItemDroppedOverBubbleBarDragZone(mCurrentBubbleBarTarget,
                    appData);
        }
        mCurrentBubbleBarTarget = null;

        // Start animating the drop UI out with the drag surface
        hide(event, dropCompleteCallback);