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

Commit 4bb43f98 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Use start-bounds for animation leash crop"

parents 72d6d459 b96326e4
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -401,10 +401,14 @@ class RemoteAnimationController implements DeathRecipient {

            // Restore z-layering, position and stack crop until client has a chance to modify it.
            t.setLayer(animationLeash, mRecord.mAppWindowToken.getPrefixOrderIndex());
            if (mRecord.mStartBounds != null) {
                t.setPosition(animationLeash, mRecord.mStartBounds.left, mRecord.mStartBounds.top);
                t.setWindowCrop(animationLeash, mRecord.mStartBounds.width(),
                        mRecord.mStartBounds.height());
            } else {
                t.setPosition(animationLeash, mPosition.x, mPosition.y);
            mTmpRect.set(mStackBounds);
            mTmpRect.offsetTo(0, 0);
            t.setWindowCrop(animationLeash, mTmpRect);
                t.setWindowCrop(animationLeash, mStackBounds.width(), mStackBounds.height());
            }
            mCapturedLeash = animationLeash;
            mCapturedFinishCallback = finishCallback;
        }
+4 −3
Original line number Diff line number Diff line
@@ -110,7 +110,7 @@ public class RemoteAnimationControllerTest extends WindowTestsBase {
            assertEquals(false, app.isTranslucent);
            verify(mMockTransaction).setLayer(mMockLeash, app.prefixOrderIndex);
            verify(mMockTransaction).setPosition(mMockLeash, app.position.x, app.position.y);
            verify(mMockTransaction).setWindowCrop(mMockLeash, new Rect(0, 0, 100, 50));
            verify(mMockTransaction).setWindowCrop(mMockLeash, 100, 50);

            finishedCaptor.getValue().onAnimationFinished();
            verify(mFinishedCallback).onAnimationFinished(eq(adapter));
@@ -251,8 +251,9 @@ public class RemoteAnimationControllerTest extends WindowTestsBase {
            assertEquals(win.mWinAnimator.mLastClipRect, app.clipRect);
            assertEquals(false, app.isTranslucent);
            verify(mMockTransaction).setLayer(mMockLeash, app.prefixOrderIndex);
            verify(mMockTransaction).setPosition(mMockLeash, app.position.x, app.position.y);
            verify(mMockTransaction).setWindowCrop(mMockLeash, new Rect(0, 0, 200, 200));
            verify(mMockTransaction).setPosition(
                    mMockLeash, app.startBounds.left, app.startBounds.top);
            verify(mMockTransaction).setWindowCrop(mMockLeash, 200, 200);
            verify(mMockTransaction).setPosition(mMockThumbnailLeash, 0, 0);

            finishedCaptor.getValue().onAnimationFinished();