Disable split screen option in app menu in Desktop Mode

The split screen app shortcut is not intended to work in Desktop Mode.
This change removes it from Taskbar and all apps in this mode to avoid
a crash.

Fix: 346333758
Test: Launch the app menu for different apps in Desktop mode and in
normal mode. Check that the split option only shows up in normal mode.
Flag: EXEMPT bugfix

Change-Id: I6e2535b41a490ad3eb5c0ebd924c49eaf5028669
This commit is contained in:
Saumya Prakash
2024-08-13 22:12:50 +00:00
parent 1a7bd33654
commit eb950c1f44
2 changed files with 6 additions and 3 deletions

View File

@@ -185,10 +185,13 @@ public class TaskbarPopupController implements TaskbarControllers.LoggableTaskba
// Create a Stream of all applicable system shortcuts
private Stream<SystemShortcut.Factory> getSystemShortcuts() {
// append split options to APP_INFO shortcut, the order here will reflect in the popup
// append split options to APP_INFO shortcut if not in Desktop Windowing mode, the order
// here will reflect in the popup
ArrayList<SystemShortcut.Factory> shortcuts = new ArrayList<>();
shortcuts.add(APP_INFO);
shortcuts.addAll(mControllers.uiController.getSplitMenuOptions().toList());
if (!mControllers.taskbarRecentAppsController.isInDesktopMode()) {
shortcuts.addAll(mControllers.uiController.getSplitMenuOptions().toList());
}
if (com.android.wm.shell.Flags.enableBubbleAnything()) {
shortcuts.add(BUBBLE);
}