summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Svetoslav <svetoslavganov@google.com> 2014-09-23 18:48:18 -0700
committer Svetoslav <svetoslavganov@google.com> 2014-09-23 18:48:28 -0700
commite7482460af6c0a2ea02d6cc42df129b583132571 (patch)
treee799c35b7817b92551e96bf1028dcf046cff81e6
parentdef101127a3ad0a65eb1c3ef53e9f41c4d6be5d2 (diff)
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
-rw-r--r--core/java/android/view/ViewGroup.java5
1 files changed, 5 insertions, 0 deletions
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;