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
This commit is contained in:
Winson Chung
2017-03-10 18:06:25 -08:00
parent 1f1416e51a
commit 34a07f43e4

View File

@@ -108,6 +108,7 @@ class PinnedStackController {
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 @@ class PinnedStackController {
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);