- We already do this with remote animations, need to do this with the
recents animation to ensure that layers are set correctly by default.
Bug:
77981669
Test: Open app, open translucent activity, swipe up and ensure that they
don't reorder during the transition
Change-Id: I492d12b871c602e348ea0623752787b8b0ac3f10
@Override
public void startAnimation(SurfaceControl animationLeash, Transaction t,
OnAnimationFinishedCallback finishCallback) {
+ // Restore z-layering, position and stack crop until client has a chance to modify it.
+ t.setLayer(animationLeash, mTask.getPrefixOrderIndex());
t.setPosition(animationLeash, mPosition.x, mPosition.y);
+ mTmpRect.set(mBounds);
+ mTmpRect.offsetTo(0, 0);
+ t.setWindowCrop(animationLeash, mTmpRect);
mCapturedLeash = animationLeash;
mCapturedFinishCallback = finishCallback;
}