Improve docs for View#addChildrenForAccessibility

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

Bug 22053511

Change-Id: Id0200bba8e60242caee2547bce30764dcabe02fd
This commit is contained in:
Adam Powell
2015-06-25 14:48:45 -07:00
parent d4d802be39
commit cf392d143e
2 changed files with 9 additions and 9 deletions

View File

@@ -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) {
}

View File

@@ -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);
}
}
}