diff options
author | Svetoslav Ganov <svetoslavganov@google.com> | 2011-11-02 10:13:55 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-11-02 10:13:55 -0700 |
commit | 6e42470f928bbf60c9fd3d17a2a69a4b96cec170 (patch) | |
tree | 22253efb447472cb72bf6e7fcb4e28aef1f1dc50 | |
parent | 7f0c850b7a4a2b8a135a110a33d053f4d6689559 (diff) | |
parent | 57f3b566db630233087b121d3d43ecd81a6dfd95 (diff) | |
download | frameworks_base-6e42470f928bbf60c9fd3d17a2a69a4b96cec170.zip frameworks_base-6e42470f928bbf60c9fd3d17a2a69a4b96cec170.tar.gz frameworks_base-6e42470f928bbf60c9fd3d17a2a69a4b96cec170.tar.bz2 |
Merge "Accessibility window query APIs should respect root name space." into ics-mr1
-rw-r--r-- | core/java/android/view/View.java | 10 | ||||
-rw-r--r-- | core/java/android/view/ViewGroup.java | 8 |
2 files changed, 8 insertions, 10 deletions
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java index 70681ac..62e6ebd 100644 --- a/core/java/android/view/View.java +++ b/core/java/android/view/View.java @@ -4171,10 +4171,12 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal bounds.offset(locationOnScreen[0], locationOnScreen[1]); info.setBoundsInScreen(bounds); - ViewParent parent = getParent(); - if (parent instanceof View) { - View parentView = (View) parent; - info.setParent(parentView); + if ((mPrivateFlags & IS_ROOT_NAMESPACE) == 0) { + ViewParent parent = getParent(); + if (parent instanceof View) { + View parentView = (View) parent; + info.setParent(parentView); + } } info.setPackageName(mContext.getPackageName()); diff --git a/core/java/android/view/ViewGroup.java b/core/java/android/view/ViewGroup.java index 9b0cd25..e366e72 100644 --- a/core/java/android/view/ViewGroup.java +++ b/core/java/android/view/ViewGroup.java @@ -2229,14 +2229,10 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager @Override void onInitializeAccessibilityNodeInfoInternal(AccessibilityNodeInfo info) { super.onInitializeAccessibilityNodeInfoInternal(info); - // 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++) { View child = mChildren[i]; - if ((child.mViewFlags & VISIBILITY_MASK) == VISIBLE) { + if ((child.mViewFlags & VISIBILITY_MASK) == VISIBLE + && (child.mPrivateFlags & IS_ROOT_NAMESPACE) == 0) { info.addChild(child); } } |