Skip to content

Commit

Permalink
Change accessibility_node_to_ui_element() function from internal to p…
Browse files Browse the repository at this point in the history
…ublic.

PiperOrigin-RevId: 679673979
  • Loading branch information
The android_world Authors committed Sep 27, 2024
1 parent 899d4d6 commit 8bc0c84
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions android_world/env/representation_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class UIElement:
resource_id: Optional[str] = None


def _accessibility_node_to_ui_element(
def accessibility_node_to_ui_element(
node: Any,
screen_size: Optional[tuple[int, int]] = None,
) -> UIElement:
Expand Down Expand Up @@ -158,7 +158,7 @@ def forest_to_ui_elements(
if exclude_invisible_elements and not node.is_visible_to_user:
continue
else:
elements.append(_accessibility_node_to_ui_element(node, screen_size))
elements.append(accessibility_node_to_ui_element(node, screen_size))
return elements


Expand Down
2 changes: 1 addition & 1 deletion android_world/env/representation_utils_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def test_normalize_bboxes(
node = mock.MagicMock()
node.bounds_in_screen = node_bounds

ui_element = representation_utils._accessibility_node_to_ui_element(
ui_element = representation_utils.accessibility_node_to_ui_element(
node, screen_size
)
self.assertEqual(ui_element.bbox_pixels.x_min, node_bounds.left)
Expand Down

0 comments on commit 8bc0c84

Please sign in to comment.