[PiP2] Only accept aspect ratio change if present
If the client is setting new PictureInPictureParams, we should check whether a valid aspect ratio is provided. Cause otherwise, even if we block the actual resize transition, internal state might get updated leading to wrong bounds scales. These are later on used if a re-entry state is being saved, and might reflect incorrect reentry bounds. We also make sure to clean-up any re-entry state and component related state in PipBoundsState if the PiP task or activity are CLOSED (e.g. after a client app crash). This is needed, since some tests, for instance, do not go through normal PiP removal and just force stop the test app. Note: the regression in the BR listed was happening due to app icon overlay being used when we swipe PiP to home, so one way to verify is to run the test suite on forrest and check if src-rect-hint is larger than the destination bounds, Bug: 380535601 Flag: com.android.wm.shell.enable_pip2 Test: run android.platform.test.scenario \ .launcher.integration_tests \ .swipeupapptopip_tests on go/forrest Change-Id: I40a93f79b5a1db0b2a01b88cfafe0d07374a10c1
Loading
Please register or sign in to comment