Make the caption window spy when requesting custom headers
The INPUT_FEATURE_SPY had been removed and replaced by custom caption touchable regions because the latter was an a11y-friendly alternative. It turns out that while that is still true (a11y services can see the custom content when setting touchable region carveouts but not when just making the caption window spy), removing the spy feature also caused a regression when the app's top window is transparent or semi-transparent modal. In such cases, the caption is still transparent and the custom content is still visible through the caption and through the modal, so the intended UX is that touching any area of the customizable caption would dismiss the modal, but the custom touchable region in this case is not set because the modal prevents the gesture exclusion regions from being reported to SystemUI. By making the window spy, we let the first motion event fall through before pilfering, which is enough to dismiss the modal through the caption window. Also fixes a bug in wd2 where |checkTouchEventInCustomizableRegion| only worked for AppHandleController but not AppHeaderController. Flag: com.android.window.flags.enable_accessible_custom_headers Fix: 414521306 Test: Open chrome in desktop with custom headers, open the 3-dot menu on the top-right of the search/toolbar, then tap on any part of the customizable caption region, customized or not (so a tab or the empty space) and verify the 3-dot dialog menu is dismissed. Change-Id: Ia5ac6b2658145dfb18cc27ad3fce1647e0714dbc
Loading
Please register or sign in to comment