Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6e42470f authored by Svetoslav Ganov's avatar Svetoslav Ganov Committed by Android (Google) Code Review
Browse files

Merge "Accessibility window query APIs should respect root name space." into ics-mr1

parents 7f0c850b 57f3b566
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -4171,11 +4171,13 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal
        bounds.offset(locationOnScreen[0], locationOnScreen[1]);
        info.setBoundsInScreen(bounds);
        if ((mPrivateFlags & IS_ROOT_NAMESPACE) == 0) {
            ViewParent parent = getParent();
            if (parent instanceof View) {
                View parentView = (View) parent;
                info.setParent(parentView);
            }
        }
        info.setPackageName(mContext.getPackageName());
        info.setClassName(getClass().getName());
+2 −6
Original line number Diff line number Diff line
@@ -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);
            }
        }