From 257ffbda601d287a0f5d54160a0b30be1b2ebe5e Mon Sep 17 00:00:00 2001 From: Svet Ganov Date: Fri, 19 Dec 2014 11:59:18 -0800 Subject: [PATCH] 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 --- core/java/android/view/View.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java index 75411fe39aa8c..27c1978743016 100644 --- a/core/java/android/view/View.java +++ b/core/java/android/view/View.java @@ -5942,8 +5942,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, * @hide */ public void addClickableRectsForAccessibility(List 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);