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

Commit e2bc9cc7 authored by mpodolian's avatar mpodolian
Browse files

Added IPC call to inform launcher of item was dragged over drop zone

Updated IBubblesListener.aidl interface to pass value of drop zone
update.

Added @JVMStatic annotation for BubbleBarLocation.isDifferentSides
method

Test: three huger
Bug: 411505605
Flag: com.android.wm.shell.enable_create_any_bubble
Change-Id: I59f7fa583e6884ef4a5aa56534193a47fe9f0c9d
parent 55aee0ff
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -500,5 +500,7 @@ class BubbleControllerBubbleBarTest {
        override fun animateBubbleBarLocation(location: BubbleBarLocation?) {}

        override fun showBubbleBarPillowAt(location: BubbleBarLocation?) {}

        override fun showBubbleBarDropTargetAt(location: BubbleBarLocation?) {}
    }
}
+2 −0
Original line number Diff line number Diff line
@@ -27,4 +27,6 @@ class FakeBubblesStateListener : Bubbles.BubbleStateListener {
    override fun animateBubbleBarLocation(location: BubbleBarLocation?) {}

    override fun showBubbleBarPillowAt(location: BubbleBarLocation?) {}

    override fun showBubbleBarDropTargetAt(location: BubbleBarLocation?) {}
}
+1 −0
Original line number Diff line number Diff line
@@ -65,6 +65,7 @@ enum class BubbleBarLocation : Parcelable {
         * Checks whether locations are on the different sides from each other. If any of the
         * locations is null returns false.
         */
        @JvmStatic
        fun isDifferentSides(
            first: BubbleBarLocation?,
            second: BubbleBarLocation?,
+8 −1
Original line number Diff line number Diff line
@@ -985,7 +985,9 @@ public class BubbleController implements ConfigurationChangeListener,

    /** Show bubble bar drop target at provided location or hide it if null. */
    public void showBubbleBarDropTargetAt(@Nullable BubbleBarLocation bubbleBarLocation) {
        // TODO(b/411505605): Implement logic to show/hide drop target on bubble bar.
        if (isShowingAsBubbleBar() && mBubbleStateListener != null) {
            mBubbleStateListener.showBubbleBarDropTargetAt(bubbleBarLocation);
        }
    }

    private void showBubbleBarExpandedViewDropTarget(BubbleBarLocation bubbleBarLocation) {
@@ -3082,6 +3084,11 @@ public class BubbleController implements ConfigurationChangeListener,
                    public void showBubbleBarPillowAt(@Nullable BubbleBarLocation location) {
                        mListener.call(l -> l.showBubbleBarPillowAt(location));
                    }

                    @Override
                    public void showBubbleBarDropTargetAt(@Nullable BubbleBarLocation location) {
                        mListener.call(l -> l.showBubbleBarDropTargetAt(location));
                    }
                };

        IBubblesImpl(BubbleController controller) {
+3 −0
Original line number Diff line number Diff line
@@ -361,6 +361,9 @@ public interface Bubbles {
         * @param location The location to show the pillow view, or null to hide it.
         */
        void showBubbleBarPillowAt(@Nullable BubbleBarLocation location);

        /** Show bubble bar drop target at provided location or hide if location is null. */
        void showBubbleBarDropTargetAt(@Nullable BubbleBarLocation location);
    }

    /** Listener to find out about stack expansion / collapse events. */
Loading