pin-shortcut: Move flag to lse

Bug: 375648361
Test: EXEMPT changing flag
Flag: EXEMPT moving flag
Change-Id: I13065db6dcf42e26e87aba27f395e4345c569d6f
This commit is contained in:
Wen-Chien Wang
2025-03-31 23:34:00 +00:00
parent f0ab519440
commit 9d962c8c3e
4 changed files with 6 additions and 11 deletions
@@ -19,6 +19,7 @@ import static com.android.launcher3.LauncherSettings.Favorites.CONTAINER_ALL_APP
import static com.android.launcher3.LauncherSettings.Favorites.CONTAINER_HOTSEAT;
import static com.android.launcher3.model.data.AppInfo.COMPONENT_KEY_COMPARATOR;
import static com.android.launcher3.util.SplitConfigurationOptions.getLogEventForPosition;
import static com.android.window.flags.Flags.enablePinningAppWithContextMenu;
import android.content.Intent;
import android.content.pm.LauncherApps;
@@ -147,7 +148,7 @@ public class TaskbarPopupController implements TaskbarControllers.LoggableTaskba
ItemInfo itemInfo = null;
if (icon.getTag() instanceof ItemInfo item && ShortcutUtil.supportsShortcuts(item)) {
itemInfo = item;
} else if (Flags.enablePinningAppWithContextMenu()
} else if (enablePinningAppWithContextMenu()
&& icon.getTag() instanceof SingleTask task) {
Task.TaskKey key = task.getTask().getKey();
AppInfo appInfo = getApp(
@@ -172,7 +173,7 @@ public class TaskbarPopupController implements TaskbarControllers.LoggableTaskba
.collect(Collectors.toList());
// TODO(b/375648361): Revisit to see if this can be implemented within getSystemShortcuts().
if (Flags.enablePinningAppWithContextMenu()) {
if (enablePinningAppWithContextMenu()) {
SystemShortcut shortcut = createPinShortcut(context, itemInfo, icon);
if (shortcut != null) {
systemShortcuts.add(0, shortcut);