Fixing animating bounds regression.
- Prior to ag/1954388, we used getAnimatingBounds() to get the final target
bounds if animating or the current otherwise, but since we needed the
target bounds to calculate the window scale even after the animation
completes, the clearing of mBoundsAnimationTarget was removed.
This inadvertently broke the check in getAnimatingBounds() from ever
returning the current bounds (as it's never empty)! This CL fixes the
issue, and renames the related methods to better reflect what they are
doing going forward.
This caused a regression when calculating and notifying SysUI of the
movement bounds, which was never the current bounds, but the default
bounds. Leading the IME change to trigger the PIP to move down.
Bug: 37242422
Test: android.server.cts.ActivityManagerPinnedStackTests
Test: Source hint rect animation still works
Change-Id: I532b0928ebfeaf95e9754a0254306af6fbb35833
diff --git a/services/core/java/com/android/server/am/PinnedActivityStack.java b/services/core/java/com/android/server/am/PinnedActivityStack.java
index 924e4af..cd9c42c 100644
--- a/services/core/java/com/android/server/am/PinnedActivityStack.java
+++ b/services/core/java/com/android/server/am/PinnedActivityStack.java
@@ -22,7 +22,6 @@
import com.android.server.am.ActivityStackSupervisor.ActivityContainer;
import com.android.server.wm.PinnedStackWindowController;
import com.android.server.wm.PinnedStackWindowListener;
-import com.android.server.wm.StackWindowController;
import java.util.ArrayList;
import java.util.List;
@@ -57,8 +56,8 @@
getWindowContainerController().setPictureInPictureActions(actions);
}
- boolean isBoundsAnimatingToFullscreen() {
- return getWindowContainerController().isBoundsAnimatingToFullscreen();
+ boolean isAnimatingBoundsToFullscreen() {
+ return getWindowContainerController().isAnimatingBoundsToFullscreen();
}
@Override