summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
author Brandon Dayauon <brdayauon@google.com> 2025-03-12 18:52:45 +0000
committer Brandon Dayauon <brdayauon@google.com> 2025-03-13 01:01:40 +0000
commit726fbcf00359f1b533c887ffc86053b9a5ee1ba3 (patch)
tree69cd7399e40ccfc0aa7907700b55134e83139107 /src
parentea388ef77be7d7d1f1fc604544b2c05464e8c80c (diff)
Don't show system shortcuts for the psApp
bug: 360313403 Test: manually - https://hsv.googleplex.com/5320142379548672 Flag: android.multiuser.enable_moving_content_into_private_space Change-Id: Ibb3322ab7793d3d9e925d5392a80bb6bd16568fd
Diffstat (limited to 'src')
-rw-r--r--src/com/android/launcher3/popup/PopupContainerWithArrow.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/com/android/launcher3/popup/PopupContainerWithArrow.java b/src/com/android/launcher3/popup/PopupContainerWithArrow.java
index e52ca6d23d..6a1f8cb3ea 100644
--- a/src/com/android/launcher3/popup/PopupContainerWithArrow.java
+++ b/src/com/android/launcher3/popup/PopupContainerWithArrow.java
@@ -16,9 +16,12 @@
package com.android.launcher3.popup;
+import static android.multiuser.Flags.enableMovingContentIntoPrivateSpace;
+
import static com.android.launcher3.LauncherSettings.Favorites.CONTAINER_SHORTCUTS;
import static com.android.launcher3.Utilities.squaredHypot;
import static com.android.launcher3.Utilities.squaredTouchSlop;
+import static com.android.launcher3.allapps.AlphabeticalAppsList.PRIVATE_SPACE_PACKAGE;
import static com.android.launcher3.model.data.ItemInfoWithIcon.FLAG_NOT_PINNABLE;
import static com.android.launcher3.popup.PopupPopulator.MAX_SHORTCUTS;
import static com.android.launcher3.util.Executors.MODEL_EXECUTOR;
@@ -65,6 +68,7 @@ import com.android.launcher3.views.ActivityContext;
import com.android.launcher3.views.BaseDragLayer;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
@@ -207,7 +211,10 @@ public class PopupContainerWithArrow<T extends Context & ActivityContext>
container = (PopupContainerWithArrow) launcher.getLayoutInflater().inflate(
R.layout.popup_container, launcher.getDragLayer(), false);
container.configureForLauncher(launcher, item);
- container.populateAndShowRows(icon, deepShortcutCount, systemShortcuts);
+ boolean shouldHideSystemShortcuts = enableMovingContentIntoPrivateSpace()
+ && Objects.equals(item.getTargetPackage(), PRIVATE_SPACE_PACKAGE);
+ container.populateAndShowRows(icon, deepShortcutCount,
+ shouldHideSystemShortcuts ? Collections.emptyList() : systemShortcuts);
launcher.refreshAndBindWidgetsForPackageUser(PackageUserKey.fromItemInfo(item));
container.requestFocus();
return container;