Always update the PictureInPictureParams
In PipTaskListener#setPictureInPictureParams, we used to do a
copyOnlySet when receive a different PictureInPictureParams.
For the following scenario, given the internal mPictureInPictureParams
variable contains 3 actions
- App sends a param with 0 action
- Detected action change, actions are wiped out from menu
- copyOnlySet is called, 3 actions remain in mPictureInPictureParams
- App sends a param with 3 actions
- Detected no action change, due to copyOnlySet
- PiP menu remains empty
Fixes this issue by directly assign the value, instead of copyOnlyset
Flag: com.android.wm.shell.enable_pip2
Bug: 401557393
Video: http://recall/-/aaaaaabFQoRHlzixHdtY/bWFkgdCmLEGPyx2sTBYyP0
Test: manually, follow the reproduce steps in bug
Test: atest WMShellUnitTests:PipTaskListenerTest
Change-Id: I3a79082b71401a93a3a04707cf60ba494ceeb8ce
Loading
Please register or sign in to comment