Remove accessibility long click option if no long click action occurs.

Bug: 149370403
Change-Id: Ifdbd673a53229c76a99f7b8ef9569db7195481a2
diff --git a/src/com/android/launcher3/accessibility/LauncherAccessibilityDelegate.java b/src/com/android/launcher3/accessibility/LauncherAccessibilityDelegate.java
index 24c846c..f45c0b1 100644
--- a/src/com/android/launcher3/accessibility/LauncherAccessibilityDelegate.java
+++ b/src/com/android/launcher3/accessibility/LauncherAccessibilityDelegate.java
@@ -157,8 +157,8 @@
     }
 
     private boolean itemSupportsLongClick(View host, ItemInfo info) {
-        return new CustomActionsPopup(mLauncher, host).canShow()
-                || ShortcutUtil.supportsShortcuts(info);
+        return PopupContainerWithArrow.canShow(host, info)
+                || new CustomActionsPopup(mLauncher, host).canShow();
     }
 
     private boolean itemSupportsAccessibleDrag(ItemInfo item) {
@@ -181,7 +181,7 @@
 
     public boolean performAction(final View host, final ItemInfo item, int action) {
         if (action == ACTION_LONG_CLICK) {
-            if (ShortcutUtil.supportsShortcuts(item)) {
+            if (PopupContainerWithArrow.canShow(host, item)) {
                 // Long press should be consumed for workspace items, and it should invoke the
                 // Shortcuts / Notifications / Actions pop-up menu, and not start a drag as the
                 // standard long press path does.