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

Commit 09381e11 authored by Hongwei Wang's avatar Hongwei Wang
Browse files

Ignore moveTaskToBack transition for PiP

YT calls Activity#moveTaskToBack(false) when tapping on background play
in PiP mode. Simply ignore any system transition in this case.

See also go/pip-move-task-to-back

Video: http://recall/-/aaaaaabFQoRHlzixHdtY/g1i3IAyUeSJua1dA61OhXQ
Bug: 175279237
Test: Tap background play when in PiP, see Video
Change-Id: I7319fe6e12208e51e516bc4ea82ee7325ccecc11
parent 9338f70d
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -7176,8 +7176,11 @@ class Task extends WindowContainer<WindowContainer> {
        if (DEBUG_TRANSITION) Slog.v(TAG_TRANSITION, "Prepare to back transition: task="
                + tr.mTaskId);

        // Skip the transition for pinned task.
        if (!inPinnedWindowingMode()) {
            mDisplayContent.prepareAppTransition(TRANSIT_TO_BACK);
            mDisplayContent.requestTransitionAndLegacyPrepare(TRANSIT_TO_BACK, tr);
        }
        moveToBack("moveTaskToBackLocked", tr);

        if (inPinnedWindowingMode()) {