Skip sending TaskInfo change while not in pip

When recents animation finishes, it eventually triggers
ActivityRecord.setPictureInPictureParams if the Activity is pip-able.
And in the autoEnterPip case, this happens before the windowing mode
being flipped to PINNED and therefore callbacks the
FullscreenTaskListener and resets the leash to (0, 0).

Since it does not make sense dispatching TaskInfo change
while not in pinned mode, we simply skip it here.

Video: http://rcll/aaaaaabFQoRHlzixHdtY/eFlluOg7dAqjzsS6G8UYoX
Bug: 177073398
Test: see video
Change-Id: I782f94a1b5fe19973f21e1694b8d688575f1b7e8
This commit is contained in:
Hongwei Wang
2021-01-08 16:03:17 -08:00
parent 9f053e5fb8
commit fa10d0a3da

View File

@@ -5098,7 +5098,9 @@ class Task extends WindowContainer<WindowContainer> {
}
void onPictureInPictureParamsChanged() {
dispatchTaskInfoChangedIfNeeded(true /* force */);
if (inPinnedWindowingMode()) {
dispatchTaskInfoChangedIfNeeded(true /* force */);
}
}
/**