public static boolean isActionableForAccessibility(@Nullable AccessibilityNodeInfoCompat node) {
    if (node == null) {
      return false;
    }

    if (node.isClickable() || node.isLongClickable() || node.isFocusable()) {
      return true;
    }

    final List actionList = node.getActionList();
    return Preconditions.checkNotNull(actionList).contains(AccessibilityNodeInfoCompat.ACTION_CLICK)
        || actionList.contains(AccessibilityNodeInfoCompat.ACTION_LONG_CLICK)
        || actionList.contains(AccessibilityNodeInfoCompat.ACTION_FOCUS);
  }
Returns whether a node is actionable. That is, the node supports one of {@link
AccessibilityNodeInfoCompat#isClickable()}, {@link AccessibilityNodeInfoCompat#isFocusable()},
or {@link AccessibilityNodeInfoCompat#isLongClickable()}.

@param node The {@link AccessibilityNodeInfoCompat} to evaluate
@return {@code true} if node is actionable.
core/src/main/java/com/facebook/testing/screenshot/layouthierarchy/AccessibilityUtil.java