diff options
| author | Svetoslav Ganov <svetoslavganov@google.com> | 2011-07-26 18:09:37 -0700 |
|---|---|---|
| committer | Svetoslav Ganov <svetoslavganov@google.com> | 2011-07-26 18:09:58 -0700 |
| commit | effe10fd67645bcaeb987dfefa154c284771064e (patch) | |
| tree | 6f0c67a1c103f5933b6d0c6f778f7b5de79da7c3 /core/java/android | |
| parent | 176f3e1b77d74b3b00cac98792f5d9564b935990 (diff) | |
| download | frameworks_base-effe10fd67645bcaeb987dfefa154c284771064e.zip frameworks_base-effe10fd67645bcaeb987dfefa154c284771064e.tar.gz frameworks_base-effe10fd67645bcaeb987dfefa154c284771064e.tar.bz2 | |
findViewWithText inconsistent with other findView* methods and AccessibilityNodeInfo not respecting root namespace.
1. Find viewsWithText does not respect if the current view group is a root name
space and keeps its traversal. This is inconsistent with the other findView*
methods. Also only visible views are returned witch is inconsistent with the other
findView* methods.
2. AccessibilityNodeInfo reports children it the source is root namespace. This is
not correct since thi flag denotes the beginning of a logically separate view
hierarchy.
bug:5082601
Change-Id: I9c7ca51f284d04728828d5e656112257c9a2c6e2
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/view/ViewGroup.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/core/java/android/view/ViewGroup.java b/core/java/android/view/ViewGroup.java index 8cf03a6..697636e 100644 --- a/core/java/android/view/ViewGroup.java +++ b/core/java/android/view/ViewGroup.java @@ -788,7 +788,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager final View[] children = mChildren; for (int i = 0; i < childrenCount; i++) { View child = children[i]; - if ((child.mViewFlags & VISIBILITY_MASK) == VISIBLE) { + if ((child.mPrivateFlags & IS_ROOT_NAMESPACE) == 0) { child.findViewsWithText(outViews, text); } } @@ -2162,6 +2162,9 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager @Override public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { super.onInitializeAccessibilityNodeInfo(info); + if ((mPrivateFlags & IS_ROOT_NAMESPACE) != 0) { + return; + } for (int i = 0, count = mChildrenCount; i < count; i++) { View child = mChildren[i]; if ((child.mViewFlags & VISIBILITY_MASK) == VISIBLE) { |
