Merge "Fix visibility change during entering PIP app transition" into tm-dev am: 7284a6a981

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

Change-Id: I4c1c864838ba79970bc9534d30e9aa031c4cf676
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Chris Li
2022-05-12 07:04:58 +00:00
committed by Automerger Merge Worker

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.
// TODO(new-app-transition): Rewrite this logic using WM Shell.
final boolean recentsAnimating = isAnimating(PARENTS, ANIMATION_TYPE_RECENTS);
final boolean isEnteringPipWithoutVisibleChange = mWaitForEnteringPinnedMode
&& mVisible == visible;
if (okToAnimate(true /* ignoreFrozen */, canTurnScreenOn())
&& (appTransition.isTransitionSet()
|| (recentsAnimating && !isActivityTypeHome()))
// If the visibility change during enter PIP, we don't want to include it in app
// transition to affect the animation theme, because the Pip organizer will animate
// the entering PIP instead.
&& !mWaitForEnteringPinnedMode) {
// If the visibility is not changed during enter PIP, we don't want to include it in
// app transition to affect the animation theme, because the Pip organizer will
// animate the entering PIP instead.
&& !isEnteringPipWithoutVisibleChange) {
if (visible) {
displayContent.mOpeningApps.add(this);
mEnteringAnimation = true;