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

Commit 510a6bf0 authored by Mykola Podolian's avatar Mykola Podolian Committed by Android (Google) Code Review
Browse files

Merge "IPC for app icons drag events over the Bubble Bar" into main

parents 5e42441a 11ba9b07
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -296,5 +296,9 @@ class BubbleControllerBubbleBarTest {
        override fun onBubbleStateChange(update: BubbleBarUpdate?) {}

        override fun animateBubbleBarLocation(location: BubbleBarLocation?) {}

        override fun onDragItemOverBubbleBarDragZone(location: BubbleBarLocation) {}

        override fun onItemDraggedOutsideBubbleBarDropZone() {}
    }
}
+11 −0
Original line number Diff line number Diff line
@@ -2639,6 +2639,17 @@ public class BubbleController implements ConfigurationChangeListener,
                    public void animateBubbleBarLocation(BubbleBarLocation location) {
                        mListener.call(l -> l.animateBubbleBarLocation(location));
                    }

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

                    @Override
                    public void onItemDraggedOutsideBubbleBarDropZone() {
                        mListener.call(IBubblesListener::onItemDraggedOutsideBubbleBarDropZone);
                    }
                };

        IBubblesImpl(BubbleController controller) {
+13 −0
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@ import android.window.ScreenCapture.ScreenshotHardwareBuffer;
import android.window.ScreenCapture.SynchronousScreenCaptureListener;

import androidx.annotation.IntDef;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.android.wm.shell.shared.annotations.ExternalThread;
@@ -330,6 +331,18 @@ public interface Bubbles {
         * Does not result in a state change.
         */
        void animateBubbleBarLocation(BubbleBarLocation location);

        /**
         * Called when an application icon is being dragged over the Bubble Bar drop zone.
         * The location of the Bubble Bar is provided as an argument.
         */
        void onDragItemOverBubbleBarDragZone(@NonNull BubbleBarLocation location);

        /**
         * Called when an application icon is being dragged outside the Bubble Bar drop zone.
         * Always called after {@link #onDragItemOverBubbleBarDragZone(BubbleBarLocation)}
         */
        void onItemDraggedOutsideBubbleBarDropZone();
    }

    /** Listener to find out about stack expansion / collapse events. */
+12 −0
Original line number Diff line number Diff line
@@ -33,4 +33,16 @@ oneway interface IBubblesListener {
     * Does not result in a state change.
     */
    void animateBubbleBarLocation(in BubbleBarLocation location);

    /**
     * Called when an application icon is being dragged over the Bubble Bar drop zone.
     * The location of the Bubble Bar is provided as an argument.
     */
    void onDragItemOverBubbleBarDragZone(in BubbleBarLocation location);

    /**
     * Called when an application icon is being dragged outside the Bubble Bar drop zone.
     * Always called after {@link #onDragItemOverBubbleBarDragZone(BubbleBarLocation)}
     */
    void onItemDraggedOutsideBubbleBarDropZone();
}
 No newline at end of file
+7 −0
Original line number Diff line number Diff line
@@ -98,6 +98,7 @@ import android.view.View;
import android.view.ViewTreeObserver;
import android.view.WindowManager;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.test.filters.SmallTest;

@@ -2894,6 +2895,12 @@ public class BubblesTest extends SysuiTestCase {
        @Override
        public void animateBubbleBarLocation(BubbleBarLocation location) {
        }

        @Override
        public void onDragItemOverBubbleBarDragZone(@NonNull BubbleBarLocation location) {}

        @Override
        public void onItemDraggedOutsideBubbleBarDropZone() {}
    }

    private static class FakeBubbleProperties implements BubbleProperties {