Merge "Make rotation leash for rotated multi-activity pip expand" into udc-dev

This commit is contained in:
Evan Rosky
2023-05-03 16:38:26 +00:00
committed by Android (Google) Code Review

View File

@@ -4614,6 +4614,13 @@ class Task extends TaskFragment {
topActivity.reparent(lastParentBeforePip,
lastParentBeforePip.getChildCount() /* top */,
"movePinnedActivityToOriginalTask");
final DisplayContent dc = topActivity.getDisplayContent();
if (dc != null && dc.isFixedRotationLaunchingApp(topActivity)) {
// Expanding pip into new rotation, so create a rotation leash
// until the display is rotated.
topActivity.getOrCreateFixedRotationLeash(
topActivity.getSyncTransaction());
}
lastParentBeforePip.moveToFront("movePinnedActivityToOriginalTask");
}
}