Collect task in getOrCreateRootTask

Some CTS tests launch a freeform task and then replaces the activity
with a new one with fullscreen ActivityOptions. As the new windowing
mode is set in getOrCreateRootTask(), currently this task isn't
collected, and there's no way for Shell to transition this task
properly.

Bug: 242483894
Test: KeyboardVisibilityControlTest
Test: ImeInsetsControllerTest
Change-Id: Ibf0efddf3dea1cb9ed8b874348a4d4d75d609371
1 file changed