Loading libs/WindowManager/Shell/multivalentTests/src/com/android/wm/shell/bubbles/BubbleControllerBubbleBarTest.kt +4 −0 Original line number Diff line number Diff line Loading @@ -296,5 +296,9 @@ class BubbleControllerBubbleBarTest { override fun onBubbleStateChange(update: BubbleBarUpdate?) {} override fun animateBubbleBarLocation(location: BubbleBarLocation?) {} override fun onDragItemOverBubbleBarDragZone(location: BubbleBarLocation) {} override fun onItemDraggedOutsideBubbleBarDropZone() {} } } libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleController.java +11 −0 Original line number Diff line number Diff line Loading @@ -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) { Loading libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/Bubbles.java +13 −0 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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. */ Loading libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/IBubblesListener.aidl +12 −0 Original line number Diff line number Diff line Loading @@ -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 packages/SystemUI/tests/src/com/android/systemui/wmshell/BubblesTest.java +7 −0 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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 { Loading Loading
libs/WindowManager/Shell/multivalentTests/src/com/android/wm/shell/bubbles/BubbleControllerBubbleBarTest.kt +4 −0 Original line number Diff line number Diff line Loading @@ -296,5 +296,9 @@ class BubbleControllerBubbleBarTest { override fun onBubbleStateChange(update: BubbleBarUpdate?) {} override fun animateBubbleBarLocation(location: BubbleBarLocation?) {} override fun onDragItemOverBubbleBarDragZone(location: BubbleBarLocation) {} override fun onItemDraggedOutsideBubbleBarDropZone() {} } }
libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleController.java +11 −0 Original line number Diff line number Diff line Loading @@ -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) { Loading
libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/Bubbles.java +13 −0 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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. */ Loading
libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/IBubblesListener.aidl +12 −0 Original line number Diff line number Diff line Loading @@ -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
packages/SystemUI/tests/src/com/android/systemui/wmshell/BubblesTest.java +7 −0 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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 { Loading