Make the flingFinishedCallback be executed

Exit split if the side stage no longer has children. We should invoke
flingFinishedCallback even if there is no need to run animation when
fling divider to dismiss.

Bug: 244540465
Test: Drag Chrome to create multi-instance in split screen repeatly
Change-Id: I101044515c366287e37951a32a1b57618f1c8f3e
This commit is contained in:
Jeff Chang
2022-09-13 21:33:30 +08:00
parent de5f0ae846
commit 500f2ea912

View File

@@ -561,6 +561,10 @@ public final class SplitLayout implements DisplayInsetsController.OnInsetsChange
if (from == to) {
// No animation run, still callback to stop resizing.
mSplitLayoutHandler.onLayoutSizeChanged(this);
if (flingFinishedCallback != null) {
flingFinishedCallback.run();
}
InteractionJankMonitorUtils.endTracing(
CUJ_SPLIT_SCREEN_RESIZE);
return;