Split DesktopModeWindowDecoration relayout into two stages.
The idea here is to delay ViewHost (SurfaceControlViewHost) creation in
WindowDecoration#relayout() to avoid blocking the animation that will be
posted from TransitionPlayer.
We split WindowDecoration#relayout() in two:
1. View / Surface / Transaction updates.
2. SCVH creation / VRI creation
To delay stage 2 here we simply repost it to the shell-main thread with
a 0ms delay.
We should only split the two stages for app handles; for app headers
it's important to
1. show the header whenever the task/window is visible
2. keep transactions and ViewHost-draw in sync for resize events
Test: WMShellUnitTests
Bug: 346316691
Flag: com.android.window.flags.enable_desktop_windowing_mode
Change-Id: Id1f76cb106e2f9152f4d52c682829fffe53bd026
4 files changed