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

Commit 257ffbda authored by Svet Ganov's avatar Svet Ganov
Browse files

Remove a bad heuristic when determining click location for accessibility.

As a bride-gap solution to click on partially covered views in accessibility
mode we compute a point on the screen where to send a down/up event pair.
A heuristic we used was that if the action target is covered by a view that
that has a touch listener we consider the target obscured by the one with
the listener. However, this generates false positives, for example the target
is covered by a view that observers touches for scrolling but not clicking.

bug:18782023

Change-Id: I31ff34011d45667f1eddda47373ec00e4a23dbf6
parent 63c79ce4
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -5942,8 +5942,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
     * @hide
     */
    public void addClickableRectsForAccessibility(List<RectF> outRects) {
        if (isClickable() || isLongClickable()
                || (mListenerInfo != null && mListenerInfo.mOnTouchListener != null)) {
        if (isClickable() || isLongClickable()) {
            RectF bounds = new RectF();
            bounds.set(0, 0, getWidth(), getHeight());
            outRects.add(bounds);