Fix some flakiness with rotation
- We can't use WM.getStableInsets() because this returns the insets from
the previous orientation when handling the display changing callback.
Instead we need to track and update a display layout
- On rotation, the existing offsets from the previous orientation can
trigger the pip to shift to the bottom due to
mMovementBoundsExtraOffsets still being set. Since we are positioning
the PIP at a specific snap fraction on rotation, we can reset all the
offsets as they will (or will not) be reapplied in the new orientation
Change-Id: I675283c9c4edf02b302b08a99fd8a82d2e7c5be2
Bug: 156791199
Test: atest PinnedStackTests
Test: atest PipAnimationControllerTest
Test: atest PipBoundsHandlerTest
4 files changed