summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/popup/PopupContainerWithArrow.java
diff options
context:
space:
mode:
authorJoey <joey@lineageos.org>2018-02-04 11:36:32 +0100
committerLuK1337 <priv.luk@gmail.com>2020-01-24 18:29:31 +0100
commitbaab9939998fc3e59daa11cb52d699346939a1e2 (patch)
treeac2a8162c3a3b59218243ba032a4db814b9caffd /src/com/android/launcher3/popup/PopupContainerWithArrow.java
parente1b5be663f25f09d16e956aff8f8a90d1ab502a4 (diff)
downloadandroid_packages_apps_Trebuchet-baab9939998fc3e59daa11cb52d699346939a1e2.tar.gz
android_packages_apps_Trebuchet-baab9939998fc3e59daa11cb52d699346939a1e2.tar.bz2
android_packages_apps_Trebuchet-baab9939998fc3e59daa11cb52d699346939a1e2.zip
Trebuchet: allow disabling workspace edit
Change-Id: I503e19cbc512eac0e4a8c8bccc16a6ccc0e805da Signed-off-by: Joey <joey@lineageos.org>
Diffstat (limited to 'src/com/android/launcher3/popup/PopupContainerWithArrow.java')
-rw-r--r--src/com/android/launcher3/popup/PopupContainerWithArrow.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/com/android/launcher3/popup/PopupContainerWithArrow.java b/src/com/android/launcher3/popup/PopupContainerWithArrow.java
index 15fb4cea6..b4b82ebdd 100644
--- a/src/com/android/launcher3/popup/PopupContainerWithArrow.java
+++ b/src/com/android/launcher3/popup/PopupContainerWithArrow.java
@@ -52,6 +52,7 @@ import com.android.launcher3.ItemInfoWithIcon;
import com.android.launcher3.Launcher;
import com.android.launcher3.LauncherModel;
import com.android.launcher3.R;
+import com.android.launcher3.Utilities;
import com.android.launcher3.accessibility.LauncherAccessibilityDelegate;
import com.android.launcher3.accessibility.ShortcutMenuAccessibilityDelegate;
import com.android.launcher3.dot.DotInfo;
@@ -587,6 +588,8 @@ public class PopupContainerWithArrow extends ArrowPopup implements DragSource,
if (!ItemLongClickListener.canStartDrag(mLauncher)) return false;
// Return early if not the correct view
if (!(v.getParent() instanceof DeepShortcutView)) return false;
+ // Return early if workspace edit is disabled
+ if (!Utilities.isWorkspaceEditAllowed(mLauncher.getApplicationContext())) return false;
// Long clicked on a shortcut.
DeepShortcutView sv = (DeepShortcutView) v.getParent();