Merge "Do not trigger move animation during PiP transition" into rvc-qpr-dev am: 96bcb1b255

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12419402

Change-Id: I4d2fd1165ed0cc42e42a03c1f4a556afc1d9a6c8
This commit is contained in:
Hongwei Wang
2020-08-21 00:50:09 +00:00
committed by Automerger Merge Worker

View File

@@ -2052,10 +2052,17 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
// animating... let's do something.
final int left = mWindowFrames.mFrame.left;
final int top = mWindowFrames.mFrame.top;
// During the transition from pip to fullscreen, the activity windowing mode is set to
// fullscreen at the beginning while the task is kept in pinned mode. Skip the move
// animation in such case since the transition is handled in SysUI.
final boolean hasMovementAnimation = getTask() == null
? getWindowConfiguration().hasMovementAnimations()
: getTask().getWindowConfiguration().hasMovementAnimations();
if (mToken.okToAnimate()
&& (mAttrs.privateFlags & PRIVATE_FLAG_NO_MOVE_ANIMATION) == 0
&& !isDragResizing()
&& getWindowConfiguration().hasMovementAnimations()
&& hasMovementAnimation
&& !mWinAnimator.mLastHidden
&& !mSeamlesslyRotated) {
startMoveAnimation(left, top);