Merge "Do not prematurely update position while bounds animating." into nyc-dev

This commit is contained in:
Rob Carr
2016-04-20 21:37:10 +00:00
committed by Android (Google) Code Review

View File

@@ -129,15 +129,19 @@ public class BoundsAnimationController {
public void onAnimationStart(Animator animation) { public void onAnimationStart(Animator animation) {
if (DEBUG) Slog.d(TAG, "onAnimationStart: mTarget=" + mTarget if (DEBUG) Slog.d(TAG, "onAnimationStart: mTarget=" + mTarget
+ " mReplacement=" + mReplacement); + " mReplacement=" + mReplacement);
// Ensure that we have prepared the target for animation before
// we trigger any size changes, so it can swap surfaces
// in to appropriate modes, or do as it wishes otherwise.
if (!mReplacement) { if (!mReplacement) {
mTarget.onAnimationStart(); mTarget.onAnimationStart();
} }
// Ensure that we have prepared the target for animation before // Immediately update the task bounds if they have to become larger, but preserve
// we trigger any size changes, so it can swap surfaces // the starting position so we don't jump at the beginning of the animation.
// in to appropriate modes, or do as it wishes otherwise.
if (animatingToLargerSize()) { if (animatingToLargerSize()) {
mTarget.setPinnedStackSize(mFrom, mTo); mTmpRect.set(mFrom.left, mFrom.top,
mFrom.left + mFrozenTaskWidth, mFrom.top + mFrozenTaskHeight);
mTarget.setPinnedStackSize(mFrom, mTmpRect);
} }
} }