Showing the shortcuts in the disabled state and removing ti from the menu
when its disabled
Bug: 30315906
Change-Id: Ice747e7be955d8bb2dd65191f7613e2afd4abc1c
diff --git a/src/com/android/launcher3/LauncherModel.java b/src/com/android/launcher3/LauncherModel.java
index 17c39fa..3d240a9 100644
--- a/src/com/android/launcher3/LauncherModel.java
+++ b/src/com/android/launcher3/LauncherModel.java
@@ -2821,9 +2821,11 @@
// Now add the new shortcuts to the map.
for (ShortcutInfoCompat shortcut : shortcuts) {
- ComponentKey targetComponent
- = new ComponentKey(shortcut.getActivity(), shortcut.getUserHandle());
- mBgDeepShortcutMap.addToList(targetComponent, shortcut.getId());
+ if (shortcut.isEnabled()) {
+ ComponentKey targetComponent
+ = new ComponentKey(shortcut.getActivity(), shortcut.getUserHandle());
+ mBgDeepShortcutMap.addToList(targetComponent, shortcut.getId());
+ }
}
}