diff options
| author | Svetoslav Ganov <svetoslavganov@google.com> | 2011-07-27 15:42:53 -0700 |
|---|---|---|
| committer | Svetoslav Ganov <svetoslavganov@google.com> | 2011-07-27 16:02:55 -0700 |
| commit | 93b2182a2e1a42ef60d3c0fa79fbdc4b27875685 (patch) | |
| tree | a4c715db738f834fb772767f6eeba0b0109f1d4a /core/java/android | |
| parent | effe10fd67645bcaeb987dfefa154c284771064e (diff) | |
| download | frameworks_base-93b2182a2e1a42ef60d3c0fa79fbdc4b27875685.zip frameworks_base-93b2182a2e1a42ef60d3c0fa79fbdc4b27875685.tar.gz frameworks_base-93b2182a2e1a42ef60d3c0fa79fbdc4b27875685.tar.bz2 | |
AccessibilityNodeInfo reports no children for the topmost view in the tree.
1. My previous change to restrain AccessibilityNodeInfo to report children
if it is root namespace did not take into account that the tompost view
i.e. the decor view actually is a root namespace. Adding check to allow
the info to report children of rthe topmost view but do not do so if a
descendant is flagged as root namespace.
bug:5086988
Change-Id: Ib82b8ebe5a2c287ab1c5333d130ec50eb9ced78c
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/view/ViewGroup.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/core/java/android/view/ViewGroup.java b/core/java/android/view/ViewGroup.java index 697636e..c89e039 100644 --- a/core/java/android/view/ViewGroup.java +++ b/core/java/android/view/ViewGroup.java @@ -2162,7 +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) { + // If the view is not the topmost one in the view hierarchy and it is + // marked as the logical root of a view hierarchy, do not go any deeper. + if ((!(getParent() instanceof ViewRootImpl)) && (mPrivateFlags & IS_ROOT_NAMESPACE) != 0) { return; } for (int i = 0, count = mChildrenCount; i < count; i++) { |
