Fix accessibility regression.

Instead of setting mHideMenuAfterShown to true for all cases, only do it
when accessibility isn't enabled.

Bug: 158662766
Test: Double tap when PIP focused
Change-Id: I18713ab1fdf511b74108df355204b2c54913a078
This commit is contained in:
Ben Lin
2020-06-16 13:01:32 -07:00
parent c4568caf2c
commit a6024e8652

View File

@@ -688,11 +688,11 @@ public class PipTouchHandler {
break;
}
case MotionEvent.ACTION_HOVER_EXIT: {
mHideMenuAfterShown = true;
// If Touch Exploration is enabled, some a11y services (e.g. Talkback) is probably
// on and changing MotionEvents into HoverEvents.
// Let's not enable menu show/hide for a11y services.
if (!mAccessibilityManager.isTouchExplorationEnabled()) {
mHideMenuAfterShown = true;
mMenuController.hideMenu();
}
if (!shouldDeliverToMenu && mSendingHoverAccessibilityEvents) {