Added BubbleBarLocation drop target.

A drop target for the BubbleBarLocation has been added. This
implementation enables the Launcher process to handle application
drag-and-drop actions onto the bubble bar.

Known issues:
1) Upon dropping, the dragged icon animates back to its original taskbar
position from the top-left corner.
2) The expanded view drop target is not presented.
3) When an icon is dropped on the opposite side of the bubble bar, the
resulting location does not change, even though the drop target is
correctly displayed.

Bug: 397459664
Flag: com.android.wm.shell.enable_create_any_bubble
Test: Manual. Navigate to the overview screen, drag a taskbar icon to
the left or right side, targeting the bubble bar drop zone. Verify the
drop target's appearance. Then, drop the icon and observe that a new
application bubble is added.

Change-Id: I0f64a664620959f2503ac3fd711476b354a09348
This commit is contained in:
mpodolian
2025-02-24 15:49:58 -08:00
parent 3c985a8c65
commit c666b9587b
5 changed files with 192 additions and 4 deletions
@@ -18,6 +18,7 @@ package com.android.launcher3;
import android.content.Context;
import android.graphics.Rect;
import android.view.View;
import com.android.launcher3.accessibility.DragViewStateAnnouncer;
import com.android.launcher3.dragndrop.DragOptions;
@@ -145,4 +146,9 @@ public interface DropTarget {
// These methods are implemented in Views
void getHitRectRelativeToDragLayer(Rect outRect);
/** Returns the drop target view. By default, the implementor class is cast to the view. */
default View getDropView() {
return (View) this;
}
}