Simplyfing SystemShortcut rendering

Instead of opening the popup again when the status of AppSharing
changes, updating the UI in-place.

Bug: 321179015
Test: Presubmit
Flag: N/A
Change-Id: I6d7bd8cdf2014fd881324347e3e01b8e7e84ef1e
This commit is contained in:
Sunny Goyal
2024-01-19 00:45:34 -08:00
parent defc9058a1
commit 9f226dff72
7 changed files with 33 additions and 63 deletions

View File

@@ -40,7 +40,6 @@ import com.android.launcher3.model.data.WorkspaceItemInfo;
import com.android.launcher3.notification.NotificationListener;
import com.android.launcher3.popup.PopupContainerWithArrow;
import com.android.launcher3.popup.PopupDataProvider;
import com.android.launcher3.popup.PopupLiveUpdateHandler;
import com.android.launcher3.popup.SystemShortcut;
import com.android.launcher3.shortcuts.DeepShortcutView;
import com.android.launcher3.splitscreen.SplitShortcut;
@@ -166,13 +165,6 @@ public class TaskbarPopupController implements TaskbarControllers.LoggableTaskba
R.layout.popup_container, context.getDragLayer(), false);
container.populateAndShowRows(icon, deepShortcutCount, systemShortcuts);
container.addOnAttachStateChangeListener(
new PopupLiveUpdateHandler<BaseTaskbarContext>(context, container) {
@Override
protected void showPopupContainerForIcon(BubbleTextView originalIcon) {
showForIcon(originalIcon);
}
});
// TODO (b/198438631): configure for taskbar/context
container.setPopupItemDragHandler(new TaskbarPopupItemDragHandler());
mControllers.taskbarDragController.addDragListener(container);