Ensure the correct animation bounds for STACK_CLIP_BEFORE

Previously the animation clip was intersected with the stack bounds.
Instead, the stack bounds should be intersected with the animation clip.
Also make sure the stack bounds are offset to 0,0 so they don't take
into account position.

Test: Minimize primary in split screen. Lock screen and unlock. Minimized
screen is now correct crop.
Test: Set an app in primary and secondary split screen. Lock screen and
unlock. Both primary and secondary should be in the correct place with
the correct crop.
Test: WindowAnimationSpecTest

Change-Id: Ia8b4f77a8e71b63c19e759b8af7de446a20d8a56
diff --git a/services/core/java/com/android/server/wm/AppWindowToken.java b/services/core/java/com/android/server/wm/AppWindowToken.java
index b24a8ca..1b56bfe 100644
--- a/services/core/java/com/android/server/wm/AppWindowToken.java
+++ b/services/core/java/com/android/server/wm/AppWindowToken.java
@@ -1541,6 +1541,7 @@
                 if (stack != null) {
                     stack.getRelativePosition(mTmpPoint);
                     stack.getBounds(mTmpRect);
+                    mTmpRect.offsetTo(0, 0);
                 }
                 final AnimationAdapter adapter = new LocalAnimationAdapter(
                         new WindowAnimationSpec(a, mTmpPoint, mTmpRect,