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

Commit 51ac901b authored by Sally's avatar Sally Committed by Sally Yuen
Browse files

Remove a check for hovered child when dispatching events to TouchDelegates

Bug: If there is a touch delegate on a target's non-direct ancestor,
a hover event may not be dispatched to the target if the hover
event intersects an ancestor's bounds. This manifests as a bug in
Youtube's playlist page, where the target does not get the event sent to their grandparent's delegate.

Investigation: The "pointInHoveredChild" check causing the issue was
introduced in the case of the delegate's bounds covering the hovered
child's bounds completely.

Settings in Android P, a switch bar with a TextView
and Button has a delegate covering its entire area with the button as
the target. Since touching the text should dispatch the hover event to the text, not to the delegate nor button, this check was added so pointInHoveredChild would return true, i.e. the delegate wouldn't dispatch the event.

Since this case no longer exists in Settings, and this is not a common
pattern (covering another view with enlarged bounds) when adding touch delegates, we remove the check and the
corresponding CTS test completely (flagged).But if this manifests again we should re-investigate.

Flag: android.view.accessibility.remove_child_hover_check_for_touch_exploration
Bug: 304770837
Test: atest AccessibilityEndToEndTest with flag on/off, manual check
of youtube

Change-Id: I09fb51d4451a82591afdbdc95a11779baecec9a8
parent 976207c4
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