diff --git a/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarViewController.java b/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarViewController.java index 0722e4636a..5f75b3b616 100644 --- a/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarViewController.java +++ b/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarViewController.java @@ -506,12 +506,10 @@ public class BubbleBarViewController { /** * Notifies SystemUI to expand the selected bubble when the bubble is released. - * @param bubbleView dragged bubble view */ - public void onDragRelease(@NonNull BubbleView bubbleView, BubbleBarLocation location) { - if (bubbleView.getBubble() == null) return; + public void onDragRelease(BubbleBarLocation location) { // TODO(b/330585402): send new bubble bar bounds to shell for the animation - mSystemUiProxy.stopBubbleDrag(bubbleView.getBubble().getKey(), location); + mSystemUiProxy.stopBubbleDrag(location); } /** @@ -556,7 +554,7 @@ public class BubbleBarViewController { * @param bubble dismissed bubble item */ public void onDismissBubbleWhileDragging(@NonNull BubbleBarItem bubble) { - mSystemUiProxy.removeBubble(bubble.getKey()); + mSystemUiProxy.dragBubbleToDismiss(bubble.getKey()); } /** diff --git a/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleDragController.java b/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleDragController.java index f4b393add3..604ae89284 100644 --- a/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleDragController.java +++ b/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleDragController.java @@ -113,7 +113,7 @@ public class BubbleDragController { @Override protected void onDragRelease() { mBubblePinController.onDragEnd(); - mBubbleBarViewController.onDragRelease(bubbleView, mReleasedLocation); + mBubbleBarViewController.onDragRelease(mReleasedLocation); } @Override diff --git a/quickstep/src/com/android/quickstep/SystemUiProxy.java b/quickstep/src/com/android/quickstep/SystemUiProxy.java index e039611ef3..da1d322f3d 100644 --- a/quickstep/src/com/android/quickstep/SystemUiProxy.java +++ b/quickstep/src/com/android/quickstep/SystemUiProxy.java @@ -773,19 +773,6 @@ public class SystemUiProxy implements ISystemUiProxy, NavHandle, SafeCloseable { } } - /** - * Tells SysUI to remove the bubble with the provided key. - * @param key the key of the bubble to show. - */ - public void removeBubble(String key) { - if (mBubbles == null) return; - try { - mBubbles.removeBubble(key); - } catch (RemoteException e) { - Log.w(TAG, "Failed call removeBubble"); - } - } - /** * Tells SysUI to remove all bubbles. */ @@ -828,18 +815,30 @@ public class SystemUiProxy implements ISystemUiProxy, NavHandle, SafeCloseable { /** * Tells SysUI when the bubble stops being dragged. * Should be called only when the bubble bar is expanded. - * @param bubbleKey key of the bubble being dragged * @param location location of the bubble bar */ - public void stopBubbleDrag(@Nullable String bubbleKey, BubbleBarLocation location) { + public void stopBubbleDrag(BubbleBarLocation location) { if (mBubbles == null) return; try { - mBubbles.stopBubbleDrag(bubbleKey, location); + mBubbles.stopBubbleDrag(location); } catch (RemoteException e) { Log.w(TAG, "Failed call stopBubbleDrag"); } } + /** + * Tells SysUI to dismiss the bubble with the provided key. + * @param key the key of the bubble to dismiss. + */ + public void dragBubbleToDismiss(String key) { + if (mBubbles == null) return; + try { + mBubbles.dragBubbleToDismiss(key); + } catch (RemoteException e) { + Log.w(TAG, "Failed call dragBubbleToDismiss"); + } + } + /** * Tells SysUI to show user education relative to the reference point provided. * @param position the bubble bar top center position in Screen coordinates.