summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/popup/SystemShortcut.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/launcher3/popup/SystemShortcut.java')
-rw-r--r--src/com/android/launcher3/popup/SystemShortcut.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/com/android/launcher3/popup/SystemShortcut.java b/src/com/android/launcher3/popup/SystemShortcut.java
index a87b7b897..cad73eb03 100644
--- a/src/com/android/launcher3/popup/SystemShortcut.java
+++ b/src/com/android/launcher3/popup/SystemShortcut.java
@@ -20,6 +20,7 @@ import com.android.launcher3.Launcher;
import com.android.launcher3.LauncherSettings;
import com.android.launcher3.R;
import com.android.launcher3.WorkspaceItemInfo;
+import com.android.launcher3.Utilities;
import com.android.launcher3.config.FeatureFlags;
import com.android.launcher3.model.AppLaunchTracker;
import com.android.launcher3.model.WidgetItem;
@@ -135,6 +136,7 @@ public abstract class SystemShortcut<T extends BaseDraggingActivity>
@Override
public View.OnClickListener getOnClickListener(final Launcher launcher,
final ItemInfo itemInfo) {
+ if (!Utilities.isWorkspaceEditAllowed(launcher.getApplicationContext())) return null;
if (itemInfo.getTargetComponent() == null) return null;
final List<WidgetItem> widgets =
launcher.getPopupDataProvider().getWidgetsForPackageUser(new PackageUserKey(