Fix regression in rotation rect being clobbered.
- We should not be using the tmp rect as it's already being used
by the caller in onTaskStackBoundsChanged().
Test: Rotate device while PiP is up.
Change-Id: I826f6379666c72be505185cd0c101b18a8277177
diff --git a/services/core/java/com/android/server/wm/PinnedStackController.java b/services/core/java/com/android/server/wm/PinnedStackController.java
index 1d50d0d..0e6b1b6 100644
--- a/services/core/java/com/android/server/wm/PinnedStackController.java
+++ b/services/core/java/com/android/server/wm/PinnedStackController.java
@@ -108,6 +108,7 @@
private final DisplayMetrics mTmpMetrics = new DisplayMetrics();
private final Rect mTmpInsets = new Rect();
private final Rect mTmpRect = new Rect();
+ private final Rect mTmpAnimatingBoundsRect = new Rect();
private final Point mTmpDisplaySize = new Point();
/**
@@ -359,7 +360,7 @@
if (isValidPictureInPictureAspectRatio(mAspectRatio)) {
transformBoundsToAspectRatio(normalBounds, mAspectRatio);
}
- final Rect animatingBounds = mTmpRect;
+ final Rect animatingBounds = mTmpAnimatingBoundsRect;
final TaskStack pinnedStack = mDisplayContent.getStackById(PINNED_STACK_ID);
if (pinnedStack != null) {
pinnedStack.getAnimatingBounds(animatingBounds);