Fix touch goes to the window behide PiP
When an Acitivty enter PictureInPicture mode, the pip input consumer would be created and show the PipMenuActivity at first entry (MENU_STATE_CLOSE) or show full menu (MENU_STATE_FULL) if user clicks the pip window. So in order to control the pip wndow dragging and menu, the pip input consumer would be destoryed when menu window has shown, and it would be created when the pip window starts to drag or the menu has hidden. And the menu window should also has the flag FLAG_SLIPPERY to make sure touch can through to the pip input consumer, but it could not guarantee which window can receive the touch. This patch would make sure all touch events except ACTION_OUTSIDE can go through pip input consumer because it's above the pip window and it can integrate all behaviors like window dragging or show menu in PipTouchHandler without doing same thing and adding FLAG_SLIPPERY in PipMenuActivity. Test: atest PinnedStackTests Test: atest SystemUITests Bug: 139805619 Change-Id: I35f9eba867561168384d0a0d6c0608a6dbdf6a09
Loading
Please register or sign in to comment