Reset PiP params on PiP component change
In PipTaskListener, the internal PictureInPictureParams is updated via the copyOnlySet method. Therefore, if an app enters PiP with empty aspect ratio, it would accidentally inherit the aspect ratio from the last Activity in pip. There is a similar issue: when enter PiP from Maps after exit Meet PiP, the menu controls would be accidentally inherited. Fix this issue by reset the PictureInPictureParams value once we detect a PiP component change, i.e. a different app enters PiP. And in PhonePipMenuController, cleanup the actions accordingly. Flag: com.android.wm.shell.enable_pip2 Bug: 381181514 Video: http://recall/-/aaaaaabFQoRHlzixHdtY/eb99XBhbvNmwWawpeIqPM0 Test: atest WMShellUnitTests:PipTaskListenerTest \ WMShellUnitTests:PipBoundsStateTest Test: manually following the reproduce steps in bug, see Video Change-Id: I6796afda4a13b5110bd5fc5af076c6bf719f1c4d
Loading
Please register or sign in to comment