Do not capture activity snapshot if starting window is associated to task.

There doesn't need to capture snapshot from an activity if the starting
window is associated to task, everything should be hide behide the
window.

Bug: 290319270
Test: atest TransitionTests SyncEngineTests
Change-Id: I78eda58c3ec8405498b3c32ecc66b3d529cdb38c
This commit is contained in:
wilsonshih
2023-07-10 05:38:56 +00:00
committed by Wei Sheng Shih
parent 11dcac2a25
commit 2bb3be0276

View File

@@ -712,6 +712,14 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener {
mFlags |= WindowManager.TRANSIT_FLAG_INVISIBLE;
return;
}
// Activity doesn't need to capture snapshot if the starting window has associated to task.
if (wc.asActivityRecord() != null) {
final ActivityRecord activityRecord = wc.asActivityRecord();
if (activityRecord.mStartingData != null
&& activityRecord.mStartingData.mAssociatedTask != null) {
return;
}
}
if (mContainerFreezer == null) {
mContainerFreezer = new ScreenshotFreezer();