Fixes minimized state to match task and stack bounds for cts test

Fixes minimized state for its task and stack bounds to always match
inline with the cts test that was failing.

This also fixes multiple state issues related to splitting home and
recents into different stacks when recents incorrectly reads home stack
bounds to determine bounds for recents.

Test: cts/hostsidetests/services/activityandwindowmanager/util/run-test
CtsServicesHostTestCases
android.server.cts.ActivityManagerActivityVisibilityTests or
ActivityManagerDockedStackTests
Fixes: 35351074, 35145587
Change-Id: I6417a567e937c647818ff26dc08df463e6ef4257
diff --git a/services/core/java/com/android/server/wm/StackWindowController.java b/services/core/java/com/android/server/wm/StackWindowController.java
index b0e115b..8186d30 100644
--- a/services/core/java/com/android/server/wm/StackWindowController.java
+++ b/services/core/java/com/android/server/wm/StackWindowController.java
@@ -199,17 +199,19 @@
         }
     }
 
-    public void getStackDockedModeBounds(Rect outBounds, Rect outTempBounds,
-            Rect outTempInsetBounds, boolean ignoreVisibility) {
+    /**
+     * @see TaskStack.getStackDockedModeBoundsLocked(Rect, Rect, Rect, boolean)
+     */
+   public void getStackDockedModeBounds(Rect currentTempTaskBounds, Rect outStackBounds,
+           Rect outTempTaskBounds, boolean ignoreVisibility) {
         synchronized (mWindowMap) {
             if (mContainer != null) {
-                mContainer.getStackDockedModeBoundsLocked(outBounds, outTempBounds,
-                        outTempInsetBounds, ignoreVisibility);
+                mContainer.getStackDockedModeBoundsLocked(currentTempTaskBounds, outStackBounds,
+                        outTempTaskBounds, ignoreVisibility);
                 return;
             }
-            outBounds.setEmpty();
-            outTempBounds.setEmpty();
-            outTempInsetBounds.setEmpty();
+            outStackBounds.setEmpty();
+            outTempTaskBounds.setEmpty();
         }
     }
 
@@ -241,9 +243,9 @@
         }
     }
 
-    public void getBoundsForNewConfiguration(Rect outBounds, Rect outTempBounds) {
+    public void getBoundsForNewConfiguration(Rect outBounds) {
         synchronized(mWindowMap) {
-            mContainer.getBoundsForNewConfiguration(outBounds, outTempBounds);
+            mContainer.getBoundsForNewConfiguration(outBounds);
         }
     }