Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6a213e98 authored by Hongwei Wang's avatar Hongwei Wang
Browse files

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
parent d86e4698
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment