Cascade freeform tasks if not visible

Apply cascading effect to tasks launched in freeform in desktop mode if
task has not been added to desktop yet via handleFullscreenTaskLaunch.
This can happen with a trampoline activity which will inherit freeform
windowing mode from its source task and launch via
handleFreeformTaskLaunch.

Flag: com.android.window.flags.enable_cascading_windows
Fix: 357645618
Test: atest DesktopTasksControllerTest
      Open Gmail -> Compose
      Open Play Store -> open installed app
      Open Chrome -> new window
Change-Id: Ifd282ac726f2f8486ab0be5ed7214f2922279f01
2 files changed