Loading quickstep/src/com/android/quickstep/TaskShortcutFactory.java +8 −1 Original line number Diff line number Diff line Loading @@ -45,6 +45,7 @@ import com.android.launcher3.R; import com.android.launcher3.config.FeatureFlags; import com.android.launcher3.logging.StatsLogManager.LauncherEvent; import com.android.launcher3.model.WellbeingModel; import com.android.launcher3.model.data.ItemInfoWithIcon; import com.android.launcher3.popup.SystemShortcut; import com.android.launcher3.popup.SystemShortcut.AppInfo; import com.android.launcher3.util.InstantAppResolver; Loading @@ -61,6 +62,7 @@ import com.android.systemui.shared.recents.view.AppTransitionAnimationSpecsFutur import com.android.systemui.shared.recents.view.RecentsTransition; import com.android.systemui.shared.system.ActivityManagerWrapper; import java.util.Arrays; import java.util.Collections; import java.util.List; import java.util.function.Function; Loading Loading @@ -319,13 +321,18 @@ public interface TaskShortcutFactory { recentsView.isTaskInExpectedScrollPosition(recentsView.indexOfChild(taskView)); boolean shouldShowActionsButtonInstead = isLargeTileFocusedTask && isInExpectedScrollPosition; boolean hasUnpinnableApp = Arrays.stream(taskView.getTaskIdAttributeContainers()) .anyMatch(att -> att != null && att.getItemInfo() != null && ((att.getItemInfo().runtimeStatusFlags & ItemInfoWithIcon.FLAG_NOT_PINNABLE) != 0)); // No "save app pair" menu item if: // - app pairs feature is not enabled // - the task in question is a single task // - at least one app in app pair is unpinnable // - the Overview Actions Button should be visible if (!FeatureFlags.enableAppPairs() || !taskView.containsMultipleTasks() || shouldShowActionsButtonInstead) { || hasUnpinnableApp || shouldShowActionsButtonInstead) { return null; } Loading quickstep/src/com/android/quickstep/views/TaskView.java +7 −0 Original line number Diff line number Diff line Loading @@ -29,6 +29,7 @@ import static com.android.launcher3.LauncherState.BACKGROUND_APP; import static com.android.launcher3.Utilities.getDescendantCoordRelativeToAncestor; import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_TASK_ICON_TAP_OR_LONGPRESS; import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_TASK_LAUNCH_TAP; import static com.android.launcher3.model.data.ItemInfoWithIcon.FLAG_NOT_PINNABLE; import static com.android.launcher3.util.Executors.MAIN_EXECUTOR; import static com.android.launcher3.util.Executors.UI_HELPER_EXECUTOR; import static com.android.launcher3.util.SplitConfigurationOptions.STAGE_POSITION_BOTTOM_OR_RIGHT; Loading Loading @@ -83,6 +84,7 @@ import com.android.launcher3.R; import com.android.launcher3.Utilities; import com.android.launcher3.config.FeatureFlags; import com.android.launcher3.model.data.WorkspaceItemInfo; import com.android.launcher3.pm.UserCache; import com.android.launcher3.popup.SystemShortcut; import com.android.launcher3.statemanager.StatefulActivity; import com.android.launcher3.testing.TestLogging; Loading Loading @@ -501,6 +503,11 @@ public class TaskView extends FrameLayout implements Reusable { if (getRecentsView() != null) { stubInfo.screenId = getRecentsView().indexOfChild(this); } if (Flags.privateSpaceRestrictAccessibilityDrag()) { if (UserCache.getInstance(getContext()).getUserInfo(componentKey.user).isPrivate()) { stubInfo.runtimeStatusFlags |= FLAG_NOT_PINNABLE; } } return stubInfo; } Loading Loading
quickstep/src/com/android/quickstep/TaskShortcutFactory.java +8 −1 Original line number Diff line number Diff line Loading @@ -45,6 +45,7 @@ import com.android.launcher3.R; import com.android.launcher3.config.FeatureFlags; import com.android.launcher3.logging.StatsLogManager.LauncherEvent; import com.android.launcher3.model.WellbeingModel; import com.android.launcher3.model.data.ItemInfoWithIcon; import com.android.launcher3.popup.SystemShortcut; import com.android.launcher3.popup.SystemShortcut.AppInfo; import com.android.launcher3.util.InstantAppResolver; Loading @@ -61,6 +62,7 @@ import com.android.systemui.shared.recents.view.AppTransitionAnimationSpecsFutur import com.android.systemui.shared.recents.view.RecentsTransition; import com.android.systemui.shared.system.ActivityManagerWrapper; import java.util.Arrays; import java.util.Collections; import java.util.List; import java.util.function.Function; Loading Loading @@ -319,13 +321,18 @@ public interface TaskShortcutFactory { recentsView.isTaskInExpectedScrollPosition(recentsView.indexOfChild(taskView)); boolean shouldShowActionsButtonInstead = isLargeTileFocusedTask && isInExpectedScrollPosition; boolean hasUnpinnableApp = Arrays.stream(taskView.getTaskIdAttributeContainers()) .anyMatch(att -> att != null && att.getItemInfo() != null && ((att.getItemInfo().runtimeStatusFlags & ItemInfoWithIcon.FLAG_NOT_PINNABLE) != 0)); // No "save app pair" menu item if: // - app pairs feature is not enabled // - the task in question is a single task // - at least one app in app pair is unpinnable // - the Overview Actions Button should be visible if (!FeatureFlags.enableAppPairs() || !taskView.containsMultipleTasks() || shouldShowActionsButtonInstead) { || hasUnpinnableApp || shouldShowActionsButtonInstead) { return null; } Loading
quickstep/src/com/android/quickstep/views/TaskView.java +7 −0 Original line number Diff line number Diff line Loading @@ -29,6 +29,7 @@ import static com.android.launcher3.LauncherState.BACKGROUND_APP; import static com.android.launcher3.Utilities.getDescendantCoordRelativeToAncestor; import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_TASK_ICON_TAP_OR_LONGPRESS; import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_TASK_LAUNCH_TAP; import static com.android.launcher3.model.data.ItemInfoWithIcon.FLAG_NOT_PINNABLE; import static com.android.launcher3.util.Executors.MAIN_EXECUTOR; import static com.android.launcher3.util.Executors.UI_HELPER_EXECUTOR; import static com.android.launcher3.util.SplitConfigurationOptions.STAGE_POSITION_BOTTOM_OR_RIGHT; Loading Loading @@ -83,6 +84,7 @@ import com.android.launcher3.R; import com.android.launcher3.Utilities; import com.android.launcher3.config.FeatureFlags; import com.android.launcher3.model.data.WorkspaceItemInfo; import com.android.launcher3.pm.UserCache; import com.android.launcher3.popup.SystemShortcut; import com.android.launcher3.statemanager.StatefulActivity; import com.android.launcher3.testing.TestLogging; Loading Loading @@ -501,6 +503,11 @@ public class TaskView extends FrameLayout implements Reusable { if (getRecentsView() != null) { stubInfo.screenId = getRecentsView().indexOfChild(this); } if (Flags.privateSpaceRestrictAccessibilityDrag()) { if (UserCache.getInstance(getContext()).getUserInfo(componentKey.user).isPrivate()) { stubInfo.runtimeStatusFlags |= FLAG_NOT_PINNABLE; } } return stubInfo; } Loading