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

Commit cf392d14 authored by Adam Powell's avatar Adam Powell
Browse files

Improve docs for View#addChildrenForAccessibility

Clarify the role of the list parameter and associated method
documentation.

Bug 22053511

Change-Id: Id0200bba8e60242caee2547bce30764dcabe02fd
parent d4d802be
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -8710,14 +8710,14 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
    }
    /**
     * Adds the children of a given View for accessibility. Since some Views are
     * not important for accessibility the children for accessibility are not
     * necessarily direct children of the view, rather they are the first level of
     * descendants important for accessibility.
     * Adds the children of this View relevant for accessibility to the given list
     * as output. Since some Views are not important for accessibility the added
     * child views are not necessarily direct children of this view, rather they are
     * the first level of descendants important for accessibility.
     *
     * @param children The list of children for accessibility.
     * @param outChildren The output list that will receive children for accessibility.
     */
    public void addChildrenForAccessibility(ArrayList<View> children) {
    public void addChildrenForAccessibility(ArrayList<View> outChildren) {
    }
+3 −3
Original line number Diff line number Diff line
@@ -1919,7 +1919,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
    }

    @Override
    public void addChildrenForAccessibility(ArrayList<View> childrenForAccessibility) {
    public void addChildrenForAccessibility(ArrayList<View> outChildren) {
        if (getAccessibilityNodeProvider() != null) {
            return;
        }
@@ -1930,9 +1930,9 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
                View child = children.getChildAt(i);
                if ((child.mViewFlags & VISIBILITY_MASK) == VISIBLE) {
                    if (child.includeForAccessibility()) {
                        childrenForAccessibility.add(child);
                        outChildren.add(child);
                    } else {
                        child.addChildrenForAccessibility(childrenForAccessibility);
                        child.addChildrenForAccessibility(outChildren);
                    }
                }
            }