code: private static boolean hasText(AccessibilityNodeInfoCompat node) {
          if (node == null) {
              return false;
          }
  
          return (!TextUtils.isEmpty(node.getText())
                  || !TextUtils.isEmpty(node.getContentDescription()));
      }
docs: Returns whether the specified node has text.
  
  @param node The node to check.
  @return {@code true} if the node has text.