My goal is to be able to modify compose hierarchy on entering/leaving picture-in-picture mode. If it is in full mode, activity holds the full hierarchy of composables. But if it's not - just a PlayerView.
I know that there is onPictureInPictureModeChanged method. But it doesn't get invoked when configuration changes are not restricted. And I do want layout to change, for example, on a rotation or a window size change. What should I do in this case? Should I still restrict them and handle those changes somehow else?