public static boolean hasNonActionableSpeakingDescendants(
      @Nullable AccessibilityNodeInfoCompat node, @Nullable View view) {

    if (node == null || view == null || !(view instanceof ViewGroup)) {
      return false;
    }

    final ViewGroup viewGroup = (ViewGroup) view;
    for (int i = 0, count = viewGroup.getChildCount(); i < count; i++) {
      final View childView = viewGroup.getChildAt(i);

      if (childView == null) {
        continue;
      }

      final AccessibilityNodeInfoCompat childNode = createNodeInfoFromView(childView);
      try {
        if (childNode == null) {
          continue;
        }

        if (!childNode.isVisibleToUser()) {
          continue;
        }

        if (isAccessibilityFocusable(childNode, childView)) {
          continue;
        }

        if (isSpeakingNode(childNode, childView)) {
          return true;
        }
      } finally {
        if (childNode != null) {
          childNode.recycle();
        }
      }
    }

    return false;
  }
Determines if the supplied {@link View} and {@link AccessibilityNodeInfoCompat} has any
children which are not independently accessibility focusable and also have a spoken
description.

<p>NOTE: Accessibility services will include these children's descriptions in the closest
focusable ancestor.

@param view The {@link View} to evaluate
@param node The {@link AccessibilityNodeInfoCompat} to evaluate
@return {@code true} if it has any non-actionable speaking descendants within its subtree
core/src/main/java/com/facebook/testing/screenshot/layouthierarchy/AccessibilityUtil.java