From 5efa076daea25d32436d987124281c75abbfe9e4 Mon Sep 17 00:00:00 2001 From: Jon Spivack Date: Mon, 11 May 2020 15:03:45 -0700 Subject: [PATCH] Re-enable app long-press menu on Go devices Deep shortcuts and the home-screen Widgets menu were removed from Go in b/112904271. Subsequently removing the entire app long-press menu, however, may have been unintended behavior. This re-enables that menu, which currently houses the App Info system shortcut. Bug: 156120551 Test: Manual Change-Id: Ifa0befe1896315b5ed905271c2cf4805f70c39c0 --- src/com/android/launcher3/util/ShortcutUtil.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/com/android/launcher3/util/ShortcutUtil.java b/src/com/android/launcher3/util/ShortcutUtil.java index 1ec0690401..91cf835287 100644 --- a/src/com/android/launcher3/util/ShortcutUtil.java +++ b/src/com/android/launcher3/util/ShortcutUtil.java @@ -34,7 +34,7 @@ public class ShortcutUtil { * Returns true when we should show depp shortcuts in shortcut menu for the item. */ public static boolean supportsDeepShortcuts(ItemInfo info) { - return isActive(info) && isApp(info); + return isActive(info) && isApp(info) && !WidgetsModel.GO_DISABLE_WIDGETS; } /** @@ -64,7 +64,7 @@ public class ShortcutUtil { private static boolean isActive(ItemInfo info) { boolean isLoading = info instanceof WorkspaceItemInfo && ((WorkspaceItemInfo) info).hasPromiseIconUi(); - return !isLoading && !info.isDisabled() && !WidgetsModel.GO_DISABLE_WIDGETS; + return !isLoading && !info.isDisabled(); } private static boolean isApp(ItemInfo info) {