Added logic to show the shell drop target and update the bubble location
This change leverages a bubble bar location parameter when an app icon is dropped and displays the shell expanded view drop target when an icon is dragged over the bubble bar drop zone. Fixes: 397459664 Flag: com.android.wm.shell.enable_create_any_bubble Test: Manual. Drag a taskbar app icon to the same side as the bubble bar. Confirm that the expanded view from shell is displayed. Continue dragging to the opposite side of the bubble bar location drop zone. Confirm that the expanded view drop target is displayed on the opposite side. Release the dragged icon in the drop zone. Confirm that the bubble bar expands at the new location. Change-Id: I956d66b81810abce074b10e012cf5c873003d84c
This commit is contained in:
1 parent
b0fe82378a
commit
132c99e4dd
2 files changed
+17
-12
No files matched your search
@@ -126,7 +126,6 @@ public class BubbleBarViewController {
|
||||
});
|
||||
private final BubbleBarDragListener mDragListener = new BubbleBarDragListener() {
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public void getBubbleBarLocationHitRect(@NonNull BubbleBarLocation bubbleBarLocation,
|
||||
Rect outRect) {
|
||||
@@ -145,32 +144,31 @@ public class BubbleBarViewController {
|
||||
@Override
|
||||
public void onLauncherItemDroppedOverBubbleBarDragZone(@NonNull BubbleBarLocation location,
|
||||
@NonNull ItemInfo itemInfo) {
|
||||
//TODO(b/397459664) : fix drag interruption when there are no bubbles
|
||||
//TODO(b/397459664) : update bubble bar location
|
||||
ShortcutInfo shortcutInfo = null;
|
||||
if (itemInfo instanceof WorkspaceItemInfo) {
|
||||
shortcutInfo = ((WorkspaceItemInfo) itemInfo).getDeepShortcutInfo();
|
||||
ShortcutInfo shortcutInfo = ((WorkspaceItemInfo) itemInfo).getDeepShortcutInfo();
|
||||
if (shortcutInfo != null) {
|
||||
mSystemUiProxy.showShortcutBubble(shortcutInfo, location);
|
||||
return;
|
||||
}
|
||||
}
|
||||
Intent itemIntent = itemInfo.getIntent();
|
||||
SystemUiProxy systemUiProxy = SystemUiProxy.INSTANCE.get(mActivity);
|
||||
if (shortcutInfo != null) {
|
||||
systemUiProxy.showShortcutBubble(shortcutInfo);
|
||||
} else if (itemIntent != null && itemIntent.getComponent() != null) {
|
||||
systemUiProxy.showAppBubble(itemIntent, itemInfo.user);
|
||||
if (itemIntent != null && itemIntent.getComponent() != null) {
|
||||
itemIntent.setPackage(itemIntent.getComponent().getPackageName());
|
||||
mSystemUiProxy.showAppBubble(itemIntent, itemInfo.user, location);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLauncherItemDraggedOutsideBubbleBarDropZone() {
|
||||
//TODO(b/397459664) : hide expanded view drop target
|
||||
onItemDraggedOutsideBubbleBarDropZone();
|
||||
mSystemUiProxy.showBubbleDropTarget(/* show = */ false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLauncherItemDraggedOverBubbleBarDragZone(
|
||||
@NonNull BubbleBarLocation location) {
|
||||
//TODO(b/397459664) : show expanded view drop target
|
||||
onDragItemOverBubbleBarDragZone(location);
|
||||
mSystemUiProxy.showBubbleDropTarget(/* show = */ true, location);
|
||||
}
|
||||
|
||||
@NonNull
|
||||
|
||||
Reference in new issue
Block a user