Taskbar on home should open all apps that support drag to workspace

If taskbar is shown on home screen, have the taskbar all apps button
toggle the launcher activity version of all apps UI. This makes the
behavior consistent with how all apps system action (keyboard shortcut)
works, and addresses a gap in functionality where users are unable to
drag apps from the taskbar all apps UI to the workspace.

Bug: 392118517
Flag: com.android.window.flags.enter_desktop_by_default_on_freeform_displays
Test: On desktop device, toggle all apps from taskbar on home screen,
      drag and app from all apps to workspace.
Change-Id: Ida0f230bf38c6e1e35041556f33de1be85daf785
This commit is contained in:
Toni Barzic
2025-02-13 17:50:08 +00:00
parent c383866630
commit 26ad16592a
7 changed files with 44 additions and 31 deletions
@@ -66,7 +66,16 @@ public class TaskbarViewCallbacks {
InteractionJankMonitorWrapper.begin(v, Cuj.CUJ_LAUNCHER_OPEN_ALL_APPS,
/* tag= */ "TASKBAR_BUTTON");
mActivity.getStatsLogManager().logger().log(LAUNCHER_TASKBAR_ALLAPPS_BUTTON_TAP);
mControllers.taskbarAllAppsController.toggle();
if (DisplayController.showLockedTaskbarOnHome(mActivity)
|| DisplayController.showDesktopTaskbarForFreeformDisplay(mActivity)) {
// If the taskbar can be shown on the home screen, use mAllAppsToggler to toggle all
// apps, which will toggle the launcher activity all apps when on home screen.
// TODO(b/395913143): Reconsider this if a gap in taskbar all apps functionality that
// prevents users to drag items to workspace is addressed.
mControllers.uiController.toggleAllApps(false);
} else {
mControllers.taskbarAllAppsController.toggle();
}
}
/** Trigger All Apps button long click action. */