Pinned stack animation: Fix inset logic.

When animating to the fullscreen size, we need
to immediately report insets as if we were fullscreen so that
the app will draw its content in the appropriate aspect ratio
depending on whether or not it plans to paint behind the insets.
Two things were preventing this, first the pinned stack is
skipped for temp task inset calculation, and second we were
passing null as the temp inset bounds.

Bug: 35396882
Test: Move skeleton pinned app to fullscreen. Verify no aspect jump at end.
Change-Id: I670fe9423fbde45d55b95801c6dcbad97b0280d1
diff --git a/services/core/java/com/android/server/am/ActivityStackSupervisor.java b/services/core/java/com/android/server/am/ActivityStackSupervisor.java
index 95734a4..0662a5a 100644
--- a/services/core/java/com/android/server/am/ActivityStackSupervisor.java
+++ b/services/core/java/com/android/server/am/ActivityStackSupervisor.java
@@ -2394,7 +2394,18 @@
         mWindowManager.deferSurfaceLayout();
         try {
             ActivityRecord r = stack.topRunningActivityLocked();
-            stack.resize(pinnedBounds, tempPinnedTaskBounds, null);
+            Rect insetBounds = null;
+            if (tempPinnedTaskBounds != null) {
+                // We always use 0,0 as the position for the inset rect because
+                // if we are getting insets at all in the pinned stack it must mean
+                // we are headed for fullscreen.
+                insetBounds = tempRect;
+                insetBounds.top = 0;
+                insetBounds.left = 0;
+                insetBounds.right = tempPinnedTaskBounds.width();
+                insetBounds.bottom = tempPinnedTaskBounds.height();
+            }
+            stack.resize(pinnedBounds, tempPinnedTaskBounds, insetBounds);
             stack.ensureVisibleActivitiesConfigurationLocked(r, false);
         } finally {
             mWindowManager.continueSurfaceLayout();