Splitscreen#launchIntent: Allow usage with non-fullscreen displays.
When displays are not in fullscreen, tasks that are in fullscreen are explicitly set as WINDOWING_MODE_FULLSCREEN as opposed to UNDEFINED that inherits from parent windowing mode. Because of this, when we try to then start a splitscreen pair with the existing task, which starts off with reparenting the task to Main Stage, its windowing mode sticks - it does not change (stays as FULLSCREEN). Then, Shell Transition framework sees it as a no-op and does not include the Task as part of the Change list, and so Splitscreen transition code fails to see a task to animate and aborts the splitscreen setup. By resetting the windowing mode and explicitly look for it in the Hop processing, we can allow the task to be reparented and detected by shell transition correctly. This also introduces a new flag to disable a logic in which we restore the task bounds to mLastNonFullscreenBounds when the task is in freeform, which on a desktop-first / freeform display this will happen now as we temporarily switch the task to UNDEFINED before reparenting. This disables restoring the bounds since we are not using this variable anymore - most of the bounds logic is all done at the Shell side. Test: Manual. Open Chrome and attempt to start New Window using the app handle (so it starts from shell side) Bug: 372315420 Flag:com.android.window.flags.disable_restore_non_fullscreen_bounds_on_configuration_change Change-Id: I9c2608888ce2a46f3bf9786ff8a4f713f7b4dd57
Loading
Please register or sign in to comment