Capture task snapshot with initial bounds during finish transition.

In WindowOrganizerController#finishTransition, there could apply window
container transaction to modify the hierarchy of window containers.
When move a split pair to back, there will dismiss all tasks in
StageCoordinator#prepareExitSplitScreen, and the snapshot of the split
tasks will be captured after it's config become fullscreen, which is
the reason there won't use snapshot strating window when move split to
front.

Bug: 279547115
Test: manual, create a split pair, move it to back. Then verify both
tasks will show snapshot starting window when launch split to front by
quick switch or recents.

Change-Id: Ie77c97f88b0ab7ba47a1cb1771f1b61fdcf02ae2
This commit is contained in:
wilsonshih
2023-04-25 07:36:52 +00:00
parent cf71476fd8
commit 1a7d29e79b

View File

@@ -239,7 +239,17 @@ abstract class AbsAppSnapshotController<TYPE extends WindowContainer,
}
return null;
}
source.getBounds(mTmpRect);
mTmpRect.setEmpty();
if (source.mTransitionController.inFinishingTransition(source)) {
final Transition.ChangeInfo changeInfo = source.mTransitionController
.mFinishingTransition.mChanges.get(source);
if (changeInfo != null) {
mTmpRect.set(changeInfo.mAbsoluteBounds);
}
}
if (mTmpRect.isEmpty()) {
source.getBounds(mTmpRect);
}
mTmpRect.offsetTo(0, 0);
SurfaceControl[] excludeLayers;
final WindowState imeWindow = source.getDisplayContent().mInputMethodWindow;