From e7482460af6c0a2ea02d6cc42df129b583132571 Mon Sep 17 00:00:00 2001 From: Svetoslav Date: Tue, 23 Sep 2014 18:48:18 -0700 Subject: Ignore not visible views computing click point for accessibility. In accessibility mode we compute a location to where to send down and up events to click a view (triggered by a double tap). This solves the problem of interacting with views that are partially covered by other interactive views. The logic that computes the click point was not ignoring siblings that are not visible. As a result a blind user cannot interact with some views. bug:17632224 Change-Id: I93e637ee6702e4ba3e79faa736205430e2196d01 --- core/java/android/view/ViewGroup.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/java/android/view/ViewGroup.java b/core/java/android/view/ViewGroup.java index 4e1db90912a0..6d3b419b1253 100644 --- a/core/java/android/view/ViewGroup.java +++ b/core/java/android/view/ViewGroup.java @@ -836,6 +836,11 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager break; } + // Ignore invisible views as they are not interactive. + if (sibling.getVisibility() != View.VISIBLE) { + continue; + } + // If sibling is not interactive we do not care. if (!sibling.isClickable() && !sibling.isLongClickable()) { continue; -- cgit v1.2.3-59-g8ed1b