Fix task root bounds be overwritten when dismiss split screen.

WindowManagerProxy#applyDismissSplit is getting the root task of
secondary split screen instead of freeHomeAndRecents tasks then set
the bounds to empty, and becuase the transaction is queued with
applySyncTransaction, so even the correct root task bounds should
applied when DividerView#exitSplitMode, the bounds could be
overwritten if the SyncTransactionQueue apply to WM later.

Next time when we start an activity with a new task on the secondary
split screen, the activity will be relaunch because the initialization
bounds is full screen.

Fixes: 158637716
Test: atest ActivityLifecycleSplitScreenTests, repeat several times.
Test: run testResumedWhenRecreatedFromInNonFocusedStack then verify
the bounds of split-screen-secondary doesn't become empty.

Change-Id: Ie344b573f42a47d703ad15f7c1983b6c18905665
1 file changed