Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e54dbef9 authored by Ming-Shin Lu's avatar Ming-Shin Lu
Browse files

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
parent 1bf40c21
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -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();