Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 423ec2a6 authored by Ikram Gabiyev's avatar Ikram Gabiyev
Browse files

Do not collect activity in finishTransition

Make sure that athe ActivityRecord of the pip activity
is not being collected upon finishing the transition
if it was already collected the part of
enter pip transition before playing.

Bug: 293132828
Test: manually repro steps in the bug
Change-Id: I9e430f5883d6b1d7cae93fb0029e145b4f34d7ff
parent 98b8623c
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -9177,7 +9177,13 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
                    getRequestedOverrideWindowingMode() == WINDOWING_MODE_UNDEFINED
                            ? newParentConfig.windowConfiguration.getWindowingMode()
                            : getRequestedOverrideWindowingMode();
            if (getWindowingMode() != projectedWindowingMode) {
            if (getWindowingMode() != projectedWindowingMode
                    // Do not collect a pip activity about to enter pinned mode
                    // as a part of WindowOrganizerController#finishTransition().
                    // If not checked the activity might be collected for the wrong transition,
                    // such as a TRANSIT_OPEN transition requested right after TRANSIT_PIP.
                    && !(mWaitForEnteringPinnedMode
                    && mTransitionController.inFinishingTransition(this))) {
                mTransitionController.collect(this);
            }
        }