pin-shortcut: Move flag to lse
Bug: 375648361 Test: EXEMPT changing flag Flag: EXEMPT moving flag Change-Id: I13065db6dcf42e26e87aba27f395e4345c569d6f
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user