Do not trigger move animation during PiP transition

When PiP is transiting to fullscreen mode, we set the activity windowing
mode to fullscreen at the beginning and keep the task windowing mode in
pinned mode. The hasMovementAnimation assertion should take that into
account.

Bug: 164101597
Bug: 159679271
Bug: 164321517
Video: http://rcll/aaaaaabFQoRHlzixHdtY/blXkl5mJF9lDto9RtnYcV2
Test: See video
Change-Id: I4d887d8d2f0deab3405fd3dd38b01c3649bb51df
This commit is contained in:
Hongwei Wang
2020-08-20 14:16:19 -07:00
parent 3743d5526a
commit 252f5173b7

View File

@@ -2051,10 +2051,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);