summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Ming-Shin Lu <lumark@google.com> 2020-05-18 10:19:20 +0800
committer Ming-Shin Lu <lumark@google.com> 2020-05-18 22:59:20 +0800
commite54dbef9afcba0ccfcb0d49cfef39b256a77fe7a (patch)
treec455b2375a265d9d972c3029b8a399bf6849fe48
parent1bf40c2178211f13b6b1a479c714a14125cb451c (diff)
Set correct screenBounds for RemoteAnimation
Fix WindowContainer#getAnimationAdapter that creating RemoteAnimationRecord set wrong parameter for screenBounds. This can correct the position of split-screen task launching animation that may shifted because the initial task view in launcher side is base on screen coordinate. Fix: 153581126 Test: manual as below steps: 1) Launch a app, swipe up to overview screen. 2) Tap app icon and pressing "Split screen" item. 3) After entered split-screen mode, taps the task view. 4) Make sure the secondary task animation the movement is correct and smoothly. Change-Id: I793f01fb290fe65af1bbf8e29e429fbca63ac255
-rw-r--r--services/core/java/com/android/server/wm/WindowContainer.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/services/core/java/com/android/server/wm/WindowContainer.java b/services/core/java/com/android/server/wm/WindowContainer.java
index 7bfddd79f8a4..fb2c22ebae42 100644
--- a/services/core/java/com/android/server/wm/WindowContainer.java
+++ b/services/core/java/com/android/server/wm/WindowContainer.java
@@ -2182,7 +2182,8 @@ class WindowContainer<E extends WindowContainer> extends ConfigurationContainer<
final int appStackClipMode = getDisplayContent().mAppTransition.getAppStackClipMode();
// Separate position and size for use in animators.
- mTmpRect.set(getAnimationBounds(appStackClipMode));
+ final Rect screenBounds = getAnimationBounds(appStackClipMode);
+ mTmpRect.set(screenBounds);
getAnimationPosition(mTmpPoint);
if (!sHierarchicalAnimations) {
// Non-hierarchical animation uses position in global coordinates.
@@ -2201,7 +2202,7 @@ class WindowContainer<E extends WindowContainer> extends ConfigurationContainer<
localBounds.offsetTo(mTmpPoint.x, mTmpPoint.y);
final RemoteAnimationController.RemoteAnimationRecord adapters =
controller.createRemoteAnimationRecord(this, mTmpPoint, localBounds,
- mTmpRect, (isChanging ? mSurfaceFreezer.mFreezeBounds : null));
+ screenBounds, (isChanging ? mSurfaceFreezer.mFreezeBounds : null));
resultAdapters = new Pair<>(adapters.mAdapter, adapters.mThumbnailAdapter);
} else if (isChanging) {
final float durationScale = mWmService.getTransitionAnimationScaleLocked();