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
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user