Handle Desktop app launches from Taskbar/AllApps icon clicks.

- Provide both launch and minimize animations from
  DesktopAppLaunchTransition
- Add support to TaskbarRecentAppsController to check whether an app is
  visible vs. minimized vs. not showing at all in Desktop Mode
- Use DesktopAppLaunchTransition when clicking a Taskbar/AllApps app
  icon (when in Desktop Mode and the app is not visible) to animate the
  app launch
- The animation / transition is passed to Shell through ActivityOptions

Note: this CL does not add animations for launching managed/work
profile apps. That will be handled in b/376819104.

Test: launch apps in Desktop from Taskbar/AllApps
Bug: 327428659
Flag: com.android.window.flags.enable_desktop_app_launch_transitions
Change-Id: I44be96b9c53718b2082d2f630e1921356785fc4b
This commit is contained in:
Gustav Sennton
2024-10-31 14:29:25 +00:00
parent a2603e829a
commit da2c2c0f7f
5 changed files with 223 additions and 31 deletions
@@ -36,6 +36,7 @@ import com.android.launcher3.R;
import com.android.launcher3.Utilities;
import com.android.launcher3.anim.AnimatorListeners;
import com.android.launcher3.desktop.DesktopAppLaunchTransition;
import com.android.launcher3.desktop.DesktopAppLaunchTransition.AppLaunchType;
import com.android.launcher3.taskbar.overlay.TaskbarOverlayContext;
import com.android.launcher3.taskbar.overlay.TaskbarOverlayDragLayer;
import com.android.launcher3.util.DisplayController;
@@ -251,7 +252,8 @@ public class KeyboardQuickSwitchViewController {
) {
// This app is being unminimized - use our own transition runner.
remoteTransition = new RemoteTransition(
new DesktopAppLaunchTransition(context, MAIN_EXECUTOR));
new DesktopAppLaunchTransition(
context, MAIN_EXECUTOR, AppLaunchType.UNMINIMIZE));
}
mControllers.taskbarActivityContext.handleGroupTaskLaunch(
task,