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
This commit is contained in:
Hongwei Wang
2021-02-02 11:29:33 -08:00
parent 9338f70ddd
commit 09381e117e

View File

@@ -7176,8 +7176,11 @@ class Task extends WindowContainer<WindowContainer> {
if (DEBUG_TRANSITION) Slog.v(TAG_TRANSITION, "Prepare to back transition: task="
+ tr.mTaskId);
mDisplayContent.prepareAppTransition(TRANSIT_TO_BACK);
mDisplayContent.requestTransitionAndLegacyPrepare(TRANSIT_TO_BACK, tr);
// Skip the transition for pinned task.
if (!inPinnedWindowingMode()) {
mDisplayContent.prepareAppTransition(TRANSIT_TO_BACK);
mDisplayContent.requestTransitionAndLegacyPrepare(TRANSIT_TO_BACK, tr);
}
moveToBack("moveTaskToBackLocked", tr);
if (inPinnedWindowingMode()) {