Partially revert the decor bounds calculation
Previous change uses the intersection to calculate the non-decor frame
to make sure the insets area is not deducted if the window is not even
overlap with the insets. This causes a zero result when a split screen
task is launched by another fullscreen task with an intent. The initial
bounds of that window is out of the display and hence the overlap is
zero.
Without changing the split screen launch implementation, we have no
better clue of the case. Revert the calculation back to the previous
strategy - deduct the insets from the window regardless of the position
relationship.
Added todo for long term solution. The shell should report to the WM
about the difference between the current window bounds and the final
bounds to let the insets system report a stable bounds to the app.
Bug: 364883053
Test: See reproduce steps in the bug
Test: WindowPolicyTests
Flag: EXEMPT bugfix
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:140e0710744d0426295d46863c233da6c1f6e8a6)
Merged-In: I599a000f609c6a9964d6d0bc1bce14b0b9c979e6
Change-Id: I599a000f609c6a9964d6d0bc1bce14b0b9c979e6
1 file changed