Consolidate updating bounds in ActivityStarter.
ActivityStarter updates the bounds of the host stack or task in
multiple places. This changelist consolidates this duplicated logic
into a single place and adds tests to ensure the expected behavior.
This change also makes ActivityStack create its controller using the
same WindowManagerService instance as its ActivityStackSupervisor.
Fixes: 67091889
Bug: 64144308
Test: bit FrameworksServicesTests:com.android.server.am.ActivityStarterTests
Change-Id: Ibaa8f7966bbeb190723caab0d2788c79cf848f04
diff --git a/services/core/java/com/android/server/am/PinnedActivityStack.java b/services/core/java/com/android/server/am/PinnedActivityStack.java
index 468b867..2726979 100644
--- a/services/core/java/com/android/server/am/PinnedActivityStack.java
+++ b/services/core/java/com/android/server/am/PinnedActivityStack.java
@@ -43,7 +43,8 @@
@Override
PinnedStackWindowController createStackWindowController(int displayId, boolean onTop,
Rect outBounds) {
- return new PinnedStackWindowController(mStackId, this, displayId, onTop, outBounds);
+ return new PinnedStackWindowController(mStackId, this, displayId, onTop, outBounds,
+ mStackSupervisor.mWindowManager);
}
Rect getDefaultPictureInPictureBounds(float aspectRatio) {