Fixes regression on preserving PiP position
The reentry fraction of PiP is used to be saved in
ActivityRecord.onConfigurationChanged when activity leaves PiP mode to
fullscreen. With ag/9539033, the pinned stack gets removed ahead of this
configuration change and therefore, there is no bounds to save.
The new approach is to move the saving logic to TaskRecord.reparent,
right before the pinned stack is removed due to reparenting.
Bug: 144099989
Test: atest PinnedStackTests#testEnterPictureInPictureSavePosition
Change-Id: Iceaf7244f16ed0ca1450e3117b85fd6b3d97313c
2 files changed