Use surface size instead of frame size when adjusting layer bounds

When exiting splitscreen we can end up cropping the SurfaceView
incorrectly. This is because when drag drag resizing, the surface is
resized to full screen and the window frame is updated in a
subsequent relayout call.

To fix this we use the surface size after adjusting for surface insets.

Test: exit chrome from splitscreen to fullscreen, check that SV resizes
correctly
Test: atest SurfaceViewSyncTest
Test: go/wm-smoke
Fixes: 179911825

Change-Id: I0ccbdb5afa507b7a67e6aa7071ab5fb71f8a8cb8
1 file changed