From b80a55cda8d9bdd865f3e5d0560b9f26ee79a418 Mon Sep 17 00:00:00 2001 From: Robert Carr Date: Tue, 5 May 2020 15:17:51 -0700 Subject: [PATCH] PipAnimationController: Make sure we set crop when resetting scale For example if we are going from small to large, then the crop needs to be expanded in the same frame that we reset the scale and complete the resize. This is how the free resize path works, so we just make the animate resize path also work this way. Bug: 150810705 Test: Resize pip small to big. Everything works! Change-Id: I41c8b41bada159908227991001dfa24e70bf8545 --- .../src/com/android/systemui/pip/PipAnimationController.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/SystemUI/src/com/android/systemui/pip/PipAnimationController.java b/packages/SystemUI/src/com/android/systemui/pip/PipAnimationController.java index f322489b8dc24..f72de11a01ed2 100644 --- a/packages/SystemUI/src/com/android/systemui/pip/PipAnimationController.java +++ b/packages/SystemUI/src/com/android/systemui/pip/PipAnimationController.java @@ -376,7 +376,8 @@ public class PipAnimationController { // NOTE: intentionally does not apply the transaction here. // this end transaction should get executed synchronously with the final // WindowContainerTransaction in task organizer - getSurfaceTransactionHelper().resetScale(tx, leash, getDestinationBounds()); + getSurfaceTransactionHelper().resetScale(tx, leash, getDestinationBounds()) + .crop(tx, leash, getDestinationBounds()); } }; }