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
This commit is contained in:
Svet Ganov
2014-12-19 11:59:18 -08:00
parent 63c79ce4bf
commit 257ffbda60

View File

@@ -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);