Verify the pinned stack boundary when adjusting offset.

When user touch home key and moved activity to pinned stack, Nexus
launcher also calls setShelfHeight to adjust pinned bounds, and then the
PinnedStackController sends the animation bounds to system ui to update
it to current bounds.
However, if system ui receives this bounds before system server process
configuration changes(such as rotation), the bounds sent to system ui will
become obsolete. Then system ui will call
ActivityTaskManager#resizeStack to overwrite the correct bounds with
the obsolete one.
In this case, what system ui want to do is adjust the PIP position with
an offset, so sending an offset is sufficient instead of sending a new
bounds to system server.

Fix: 122058651
Test: Manual test the pinned stack can be adjust with show/hide IME and shelf.
Test: atest ActivityManagerPinnedStackTests ActivityManagerAppConfigurationTests

Change-Id: I5e9271812c00b8e1d45af7a774b99b780102ad23
5 files changed