Merge "Fix visibility change during entering PIP app transition" into tm-dev

This commit is contained in:
Chris Li
2022-05-12 06:38:50 +00:00
committed by Android (Google) Code Review

View File

@@ -5095,13 +5095,15 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
// still check DC#okToAnimate again if the transition animation is fine to apply. // still check DC#okToAnimate again if the transition animation is fine to apply.
// TODO(new-app-transition): Rewrite this logic using WM Shell. // TODO(new-app-transition): Rewrite this logic using WM Shell.
final boolean recentsAnimating = isAnimating(PARENTS, ANIMATION_TYPE_RECENTS); final boolean recentsAnimating = isAnimating(PARENTS, ANIMATION_TYPE_RECENTS);
final boolean isEnteringPipWithoutVisibleChange = mWaitForEnteringPinnedMode
&& mVisible == visible;
if (okToAnimate(true /* ignoreFrozen */, canTurnScreenOn()) if (okToAnimate(true /* ignoreFrozen */, canTurnScreenOn())
&& (appTransition.isTransitionSet() && (appTransition.isTransitionSet()
|| (recentsAnimating && !isActivityTypeHome())) || (recentsAnimating && !isActivityTypeHome()))
// If the visibility change during enter PIP, we don't want to include it in app // If the visibility is not changed during enter PIP, we don't want to include it in
// transition to affect the animation theme, because the Pip organizer will animate // app transition to affect the animation theme, because the Pip organizer will
// the entering PIP instead. // animate the entering PIP instead.
&& !mWaitForEnteringPinnedMode) { && !isEnteringPipWithoutVisibleChange) {
if (visible) { if (visible) {
displayContent.mOpeningApps.add(this); displayContent.mOpeningApps.add(this);
mEnteringAnimation = true; mEnteringAnimation = true;