Merge "Making ActivityContext extend SavedStateRegistryOwner" into main
diff --git a/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarViewController.java b/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarViewController.java
index 1f5c541..2aa5925 100644
--- a/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarViewController.java
+++ b/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarViewController.java
@@ -126,7 +126,6 @@
});
private final BubbleBarDragListener mDragListener = new BubbleBarDragListener() {
- @NonNull
@Override
public void getBubbleBarLocationHitRect(@NonNull BubbleBarLocation bubbleBarLocation,
Rect outRect) {
@@ -145,32 +144,31 @@
@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
diff --git a/quickstep/src/com/android/quickstep/SystemUiProxy.kt b/quickstep/src/com/android/quickstep/SystemUiProxy.kt
index 0f6649b..1de6966 100644
--- a/quickstep/src/com/android/quickstep/SystemUiProxy.kt
+++ b/quickstep/src/com/android/quickstep/SystemUiProxy.kt
@@ -683,6 +683,13 @@
fun showExpandedView() =
executeWithErrorLog({ "Failed call showExpandedView" }) { bubbles?.showExpandedView() }
+ /** Tells SysUI to show the bubble drop target. */
+ @JvmOverloads
+ fun showBubbleDropTarget(show: Boolean, bubbleBarLocation: BubbleBarLocation? = null) =
+ executeWithErrorLog({ "Failed call showDropTarget" }) {
+ bubbles?.showDropTarget(show, bubbleBarLocation)
+ }
+
//
// Splitscreen
//