Skip record snapshot for changes from PiP task

The transition framework would try to record snapshot before any
transition animation. This in turn causes a bad snapshot being taken
when we leave/exit PiP. Ignore that code path since we do not record
snapshot for PiP task anyway.

Video: http://recall/-/aaaaaabFQoRHlzixHdtY/hkm5SwtKZ2i6kyFMOyeJxf
Bug: 281783504
Test: manually, see video
Change-Id: Iea19a4bb63d03cd18c95c39f68a469d83ac4d018
This commit is contained in:
Hongwei Wang
2023-05-11 17:02:41 -07:00
parent 65f443a6eb
commit c9b84b7d27

View File

@@ -1470,6 +1470,9 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener {
final ActivityRecord ar = mParticipants.valueAt(i).asActivityRecord();
if (ar == null || ar.getTask() == null
|| ar.getTask().isVisibleRequested()) continue;
final ChangeInfo change = mChanges.get(ar);
// Intentionally skip record snapshot for changes originated from PiP.
if (change != null && change.mWindowingMode == WINDOWING_MODE_PINNED) continue;
mController.mSnapshotController.mTaskSnapshotController.recordSnapshot(
ar.getTask(), false /* allowSnapshotHome */);
}