Fixing test due to null PiP default bounds.
- Also moving the default bounds call into the pinned stack window
controller
Bug: 37682538
Test: bit FrameworksServicesTests:com.android.server.am.ActivityStackSupervisorTests\#testReplacingTaskInPinnedStack
Change-Id: Id6608d484617ec1a596e608aab649a082b4b1e95
diff --git a/services/core/java/com/android/server/am/PinnedActivityStack.java b/services/core/java/com/android/server/am/PinnedActivityStack.java
index a4932bb..672f563 100644
--- a/services/core/java/com/android/server/am/PinnedActivityStack.java
+++ b/services/core/java/com/android/server/am/PinnedActivityStack.java
@@ -43,6 +43,11 @@
return new PinnedStackWindowController(mStackId, this, displayId, onTop, outBounds);
}
+ Rect getPictureInPictureBounds(float aspectRatio, boolean useExistingStackBounds) {
+ return getWindowContainerController().getPictureInPictureBounds(aspectRatio,
+ useExistingStackBounds);
+ }
+
void animateResizePinnedStack(Rect sourceHintBounds, Rect toBounds, int animationDuration,
boolean schedulePipModeChangedOnAnimationEnd) {
getWindowContainerController().animateResizePinnedStack(toBounds, sourceHintBounds,