use of com.android.launcher3.popup.SystemShortcut.APP_INFO in project android_packages_apps_Launcher3 by ArrowOS.
the class TaskbarPopupController method showForIcon.
/**
* Shows the notifications and deep shortcuts associated with a Taskbar {@param icon}.
* @return the container if shown or null.
*/
public PopupContainerWithArrow<TaskbarActivityContext> showForIcon(BubbleTextView icon) {
TaskbarActivityContext context = ActivityContext.lookupContext(icon.getContext());
if (PopupContainerWithArrow.getOpen(context) != null) {
// There is already an items container open, so don't open this one.
icon.clearFocus();
return null;
}
ItemInfo item = (ItemInfo) icon.getTag();
if (!PopupContainerWithArrow.canShow(icon, item)) {
return null;
}
final PopupContainerWithArrow<TaskbarActivityContext> container = (PopupContainerWithArrow) context.getLayoutInflater().inflate(R.layout.popup_container, context.getDragLayer(), false);
// TODO (b/198438631): configure for taskbar/context
container.populateAndShow(icon, mPopupDataProvider.getShortcutCountForItem(item), mPopupDataProvider.getNotificationKeysForItem(item), // TODO (b/198438631): add support for INSTALL shortcut factory
Stream.of(APP_INFO).map(s -> s.getShortcut(context, item)).filter(Objects::nonNull).collect(Collectors.toList()));
container.requestFocus();
return container;
}
use of com.android.launcher3.popup.SystemShortcut.APP_INFO in project android_packages_apps_404Launcher by P-404.
the class TaskbarPopupController method showForIcon.
/**
* Shows the notifications and deep shortcuts associated with a Taskbar {@param icon}.
* @return the container if shown or null.
*/
public PopupContainerWithArrow<TaskbarActivityContext> showForIcon(BubbleTextView icon) {
TaskbarActivityContext context = ActivityContext.lookupContext(icon.getContext());
if (PopupContainerWithArrow.getOpen(context) != null) {
// There is already an items container open, so don't open this one.
icon.clearFocus();
return null;
}
ItemInfo item = (ItemInfo) icon.getTag();
if (!PopupContainerWithArrow.canShow(icon, item)) {
return null;
}
final PopupContainerWithArrow<TaskbarActivityContext> container = (PopupContainerWithArrow) context.getLayoutInflater().inflate(R.layout.popup_container, context.getDragLayer(), false);
// TODO (b/198438631): configure for taskbar/context
container.populateAndShow(icon, mPopupDataProvider.getShortcutCountForItem(item), mPopupDataProvider.getNotificationKeysForItem(item), // TODO (b/198438631): add support for INSTALL shortcut factory
Stream.of(APP_INFO).map(s -> s.getShortcut(context, item)).filter(Objects::nonNull).collect(Collectors.toList()));
container.requestFocus();
return container;
}
use of com.android.launcher3.popup.SystemShortcut.APP_INFO in project android_packages_apps_Launcher3 by AOSPA.
the class TaskbarPopupController method showForIcon.
/**
* Shows the notifications and deep shortcuts associated with a Taskbar {@param icon}.
* @return the container if shown or null.
*/
public PopupContainerWithArrow<TaskbarActivityContext> showForIcon(BubbleTextView icon) {
TaskbarActivityContext context = ActivityContext.lookupContext(icon.getContext());
if (PopupContainerWithArrow.getOpen(context) != null) {
// There is already an items container open, so don't open this one.
icon.clearFocus();
return null;
}
ItemInfo item = (ItemInfo) icon.getTag();
if (!PopupContainerWithArrow.canShow(icon, item)) {
return null;
}
final PopupContainerWithArrow<TaskbarActivityContext> container = (PopupContainerWithArrow) context.getLayoutInflater().inflate(R.layout.popup_container, context.getDragLayer(), false);
// TODO (b/198438631): configure for taskbar/context
container.populateAndShow(icon, mPopupDataProvider.getShortcutCountForItem(item), mPopupDataProvider.getNotificationKeysForItem(item), // TODO (b/198438631): add support for INSTALL shortcut factory
Stream.of(APP_INFO).map(s -> s.getShortcut(context, item)).filter(Objects::nonNull).collect(Collectors.toList()));
container.requestFocus();
return container;
}
use of com.android.launcher3.popup.SystemShortcut.APP_INFO in project android_packages_apps_Launcher3 by ProtonAOSP.
the class TaskbarPopupController method showForIcon.
/**
* Shows the notifications and deep shortcuts associated with a Taskbar {@param icon}.
* @return the container if shown or null.
*/
public PopupContainerWithArrow<TaskbarActivityContext> showForIcon(BubbleTextView icon) {
TaskbarActivityContext context = ActivityContext.lookupContext(icon.getContext());
if (PopupContainerWithArrow.getOpen(context) != null) {
// There is already an items container open, so don't open this one.
icon.clearFocus();
return null;
}
ItemInfo item = (ItemInfo) icon.getTag();
if (!PopupContainerWithArrow.canShow(icon, item)) {
return null;
}
final PopupContainerWithArrow<TaskbarActivityContext> container = (PopupContainerWithArrow) context.getLayoutInflater().inflate(R.layout.popup_container, context.getDragLayer(), false);
// TODO (b/198438631): configure for taskbar/context
container.populateAndShow(icon, mPopupDataProvider.getShortcutCountForItem(item), mPopupDataProvider.getNotificationKeysForItem(item), // TODO (b/198438631): add support for INSTALL shortcut factory
Stream.of(APP_INFO).map(s -> s.getShortcut(context, item)).filter(Objects::nonNull).collect(Collectors.toList()));
container.requestFocus();
return container;
}
Aggregations