PIP: Fix transition to and from PiP when letterboxed

When an app is letterboxed, it cannot always take up the full
task bounds, and we need to constrain the PIP animations to
the constraints imposed by the layout.

Change-Id: If238ddfb4462c7e1e5c975f76666ad1d4ec3b076
Fixes: 77802617
Test: Enable cutout emulation, enter landscape, verify transitions both into and out of pip work as intended.
Test: atest ActivityManagerPinnedStackTests
2 files changed