android-env 1.2.1__py3-none-any.whl → 1.2.3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (145) hide show
  1. android_env/__init__.py +1 -1
  2. android_env/components/__init__.py +1 -1
  3. android_env/components/a11y/__init__.py +15 -0
  4. android_env/components/a11y/a11y_events.py +118 -0
  5. android_env/components/a11y/a11y_events_test.py +173 -0
  6. android_env/components/a11y/a11y_forests.py +128 -0
  7. android_env/components/a11y/a11y_forests_test.py +237 -0
  8. android_env/components/a11y/a11y_servicer.py +199 -0
  9. android_env/components/a11y/a11y_servicer_test.py +224 -0
  10. android_env/components/action_fns.py +132 -0
  11. android_env/components/action_fns_test.py +227 -0
  12. android_env/components/action_type.py +26 -3
  13. android_env/components/adb_call_parser.py +239 -196
  14. android_env/components/adb_call_parser_test.py +179 -209
  15. android_env/components/adb_controller.py +90 -52
  16. android_env/components/adb_controller_test.py +187 -16
  17. android_env/components/adb_log_stream.py +17 -5
  18. android_env/components/adb_log_stream_test.py +17 -3
  19. android_env/components/app_screen_checker.py +17 -15
  20. android_env/components/app_screen_checker_test.py +7 -8
  21. android_env/components/config_classes.py +203 -0
  22. android_env/components/coordinator.py +102 -338
  23. android_env/components/coordinator_test.py +59 -199
  24. android_env/components/device_settings.py +174 -0
  25. android_env/components/device_settings_test.py +228 -0
  26. android_env/components/dumpsys_thread.py +3 -4
  27. android_env/components/dumpsys_thread_test.py +1 -1
  28. android_env/components/errors.py +52 -10
  29. android_env/components/errors_test.py +110 -0
  30. android_env/components/log_stream.py +7 -5
  31. android_env/components/log_stream_test.py +1 -1
  32. android_env/components/logcat_thread.py +9 -8
  33. android_env/components/logcat_thread_test.py +3 -4
  34. android_env/components/{utils.py → pixel_fns.py} +20 -20
  35. android_env/components/{utils_test.py → pixel_fns_test.py} +20 -15
  36. android_env/components/setup_step_interpreter.py +47 -39
  37. android_env/components/setup_step_interpreter_test.py +4 -4
  38. android_env/components/simulators/__init__.py +1 -1
  39. android_env/components/simulators/base_simulator.py +116 -44
  40. android_env/components/simulators/base_simulator_test.py +131 -9
  41. android_env/components/simulators/emulator/__init__.py +1 -1
  42. android_env/components/simulators/emulator/emulator_launcher.py +67 -77
  43. android_env/components/simulators/emulator/emulator_launcher_test.py +153 -49
  44. android_env/components/simulators/emulator/emulator_simulator.py +276 -95
  45. android_env/components/simulators/emulator/emulator_simulator_test.py +314 -89
  46. android_env/components/simulators/fake/__init__.py +1 -1
  47. android_env/components/simulators/fake/fake_simulator.py +17 -25
  48. android_env/components/simulators/fake/fake_simulator_test.py +29 -12
  49. android_env/components/specs.py +18 -28
  50. android_env/components/specs_test.py +1 -44
  51. android_env/components/task_manager.py +48 -48
  52. android_env/components/task_manager_test.py +71 -60
  53. android_env/env_interface.py +37 -23
  54. android_env/environment.py +83 -51
  55. android_env/environment_test.py +68 -29
  56. android_env/loader.py +57 -43
  57. android_env/loader_test.py +115 -35
  58. android_env/proto/__init__.py +1 -1
  59. android_env/proto/a11y/__init__.py +15 -0
  60. android_env/proto/a11y/a11y.proto +75 -0
  61. android_env/proto/a11y/a11y_pb2.py +54 -0
  62. android_env/proto/a11y/a11y_pb2.pyi +49 -0
  63. android_env/proto/a11y/a11y_pb2_grpc.py +202 -0
  64. android_env/proto/a11y/android_accessibility_action.proto +32 -0
  65. android_env/proto/a11y/android_accessibility_action_pb2.py +37 -0
  66. android_env/proto/a11y/android_accessibility_action_pb2.pyi +13 -0
  67. android_env/proto/a11y/android_accessibility_action_pb2_grpc.py +24 -0
  68. android_env/proto/a11y/android_accessibility_forest.proto +29 -0
  69. android_env/proto/a11y/android_accessibility_forest_pb2.py +38 -0
  70. android_env/proto/a11y/android_accessibility_forest_pb2.pyi +13 -0
  71. android_env/proto/a11y/android_accessibility_forest_pb2_grpc.py +24 -0
  72. android_env/proto/a11y/android_accessibility_node_info.proto +122 -0
  73. android_env/proto/a11y/android_accessibility_node_info_clickable_span.proto +49 -0
  74. android_env/proto/a11y/android_accessibility_node_info_clickable_span_pb2.py +39 -0
  75. android_env/proto/a11y/android_accessibility_node_info_clickable_span_pb2.pyi +28 -0
  76. android_env/proto/a11y/android_accessibility_node_info_clickable_span_pb2_grpc.py +24 -0
  77. android_env/proto/a11y/android_accessibility_node_info_pb2.py +42 -0
  78. android_env/proto/a11y/android_accessibility_node_info_pb2.pyi +75 -0
  79. android_env/proto/a11y/android_accessibility_node_info_pb2_grpc.py +24 -0
  80. android_env/proto/a11y/android_accessibility_tree.proto +29 -0
  81. android_env/proto/a11y/android_accessibility_tree_pb2.py +38 -0
  82. android_env/proto/a11y/android_accessibility_tree_pb2.pyi +13 -0
  83. android_env/proto/a11y/android_accessibility_tree_pb2_grpc.py +24 -0
  84. android_env/proto/a11y/android_accessibility_window_info.proto +84 -0
  85. android_env/proto/a11y/android_accessibility_window_info_pb2.py +41 -0
  86. android_env/proto/a11y/android_accessibility_window_info_pb2.pyi +48 -0
  87. android_env/proto/a11y/android_accessibility_window_info_pb2_grpc.py +24 -0
  88. android_env/proto/a11y/rect.proto +30 -0
  89. android_env/proto/a11y/rect_pb2.py +37 -0
  90. android_env/proto/a11y/rect_pb2.pyi +17 -0
  91. android_env/proto/a11y/rect_pb2_grpc.py +24 -0
  92. android_env/proto/adb.proto +17 -6
  93. android_env/proto/adb_pb2.py +120 -107
  94. android_env/proto/adb_pb2.pyi +396 -0
  95. android_env/proto/adb_pb2_grpc.py +20 -0
  96. android_env/proto/emulator_controller.proto +68 -63
  97. android_env/proto/emulator_controller_pb2.py +142 -131
  98. android_env/proto/emulator_controller_pb2.pyi +672 -0
  99. android_env/proto/emulator_controller_pb2_grpc.py +505 -142
  100. android_env/proto/snapshot.proto +169 -0
  101. android_env/proto/snapshot_pb2.py +47 -0
  102. android_env/proto/snapshot_pb2.pyi +117 -0
  103. android_env/proto/snapshot_pb2_grpc.py +24 -0
  104. android_env/proto/snapshot_service.proto +289 -0
  105. android_env/proto/snapshot_service_pb2.py +54 -0
  106. android_env/proto/snapshot_service_pb2.pyi +86 -0
  107. android_env/proto/snapshot_service_pb2_grpc.py +487 -0
  108. android_env/proto/state.proto +63 -0
  109. android_env/proto/state_pb2.py +63 -0
  110. android_env/proto/state_pb2.pyi +85 -0
  111. android_env/proto/state_pb2_grpc.py +24 -0
  112. android_env/proto/task.proto +5 -1
  113. android_env/proto/task_pb2.py +42 -31
  114. android_env/proto/task_pb2.pyi +160 -0
  115. android_env/proto/task_pb2_grpc.py +20 -0
  116. android_env/wrappers/__init__.py +1 -1
  117. android_env/wrappers/a11y_grpc_wrapper.py +500 -0
  118. android_env/wrappers/a11y_grpc_wrapper_test.py +849 -0
  119. android_env/wrappers/base_wrapper.py +34 -13
  120. android_env/wrappers/base_wrapper_test.py +22 -16
  121. android_env/wrappers/discrete_action_wrapper.py +18 -17
  122. android_env/wrappers/discrete_action_wrapper_test.py +4 -4
  123. android_env/wrappers/flat_interface_wrapper.py +5 -5
  124. android_env/wrappers/flat_interface_wrapper_test.py +7 -11
  125. android_env/wrappers/float_pixels_wrapper.py +9 -10
  126. android_env/wrappers/float_pixels_wrapper_test.py +3 -3
  127. android_env/wrappers/gym_wrapper.py +19 -13
  128. android_env/wrappers/gym_wrapper_test.py +3 -5
  129. android_env/wrappers/image_rescale_wrapper.py +18 -21
  130. android_env/wrappers/image_rescale_wrapper_test.py +25 -37
  131. android_env/wrappers/last_action_wrapper.py +16 -13
  132. android_env/wrappers/last_action_wrapper_test.py +44 -51
  133. android_env/wrappers/rate_limit_wrapper.py +6 -3
  134. android_env/wrappers/rate_limit_wrapper_test.py +22 -1
  135. android_env/wrappers/tap_action_wrapper.py +16 -17
  136. android_env/wrappers/tap_action_wrapper_test.py +51 -16
  137. {android_env-1.2.1.dist-info → android_env-1.2.3.dist-info}/METADATA +14 -18
  138. android_env-1.2.3.dist-info/RECORD +141 -0
  139. {android_env-1.2.1.dist-info → android_env-1.2.3.dist-info}/WHEEL +1 -1
  140. android_env/proto/raw_observation.proto +0 -39
  141. android_env/proto/raw_observation_pb2.py +0 -27
  142. android_env/proto/raw_observation_pb2_grpc.py +0 -4
  143. android_env-1.2.1.dist-info/RECORD +0 -81
  144. {android_env-1.2.1.dist-info → android_env-1.2.3.dist-info/licenses}/LICENSE +0 -0
  145. {android_env-1.2.1.dist-info → android_env-1.2.3.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,39 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # NO CHECKED-IN PROTOBUF GENCODE
4
+ # source: android_env/proto/a11y/android_accessibility_node_info_clickable_span.proto
5
+ # Protobuf Python Version: 5.29.0
6
+ """Generated protocol buffer code."""
7
+ from google.protobuf import descriptor as _descriptor
8
+ from google.protobuf import descriptor_pool as _descriptor_pool
9
+ from google.protobuf import runtime_version as _runtime_version
10
+ from google.protobuf import symbol_database as _symbol_database
11
+ from google.protobuf.internal import builder as _builder
12
+ _runtime_version.ValidateProtobufRuntimeVersion(
13
+ _runtime_version.Domain.PUBLIC,
14
+ 5,
15
+ 29,
16
+ 0,
17
+ '',
18
+ 'android_env/proto/a11y/android_accessibility_node_info_clickable_span.proto'
19
+ )
20
+ # @@protoc_insertion_point(imports)
21
+
22
+ _sym_db = _symbol_database.Default()
23
+
24
+
25
+
26
+
27
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\nKandroid_env/proto/a11y/android_accessibility_node_info_clickable_span.proto\x12\x0b\x61ndroid_env\"\xfc\x01\n)AndroidAccessibilityNodeInfoClickableSpan\x12\x0c\n\x04text\x18\x01 \x01(\t\x12\x0b\n\x03url\x18\x02 \x01(\t\x12Q\n\x06source\x18\x03 \x01(\x0e\x32\x41.android_env.AndroidAccessibilityNodeInfoClickableSpan.SpanSource\x12\r\n\x05start\x18\x04 \x01(\x05\x12\x0f\n\x07node_id\x18\x05 \x01(\x05\"A\n\nSpanSource\x12\x10\n\x0cUNKNOWN_TYPE\x10\x00\x12\x08\n\x04TEXT\x10\x01\x12\x17\n\x13\x43ONTENT_DESCRIPTION\x10\x02\x42\x30\n,com.google.androidenv.accessibilityforwarderP\x01\x62\x06proto3')
28
+
29
+ _globals = globals()
30
+ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
31
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'android_env.proto.a11y.android_accessibility_node_info_clickable_span_pb2', _globals)
32
+ if not _descriptor._USE_C_DESCRIPTORS:
33
+ _globals['DESCRIPTOR']._loaded_options = None
34
+ _globals['DESCRIPTOR']._serialized_options = b'\n,com.google.androidenv.accessibilityforwarderP\001'
35
+ _globals['_ANDROIDACCESSIBILITYNODEINFOCLICKABLESPAN']._serialized_start=93
36
+ _globals['_ANDROIDACCESSIBILITYNODEINFOCLICKABLESPAN']._serialized_end=345
37
+ _globals['_ANDROIDACCESSIBILITYNODEINFOCLICKABLESPAN_SPANSOURCE']._serialized_start=280
38
+ _globals['_ANDROIDACCESSIBILITYNODEINFOCLICKABLESPAN_SPANSOURCE']._serialized_end=345
39
+ # @@protoc_insertion_point(module_scope)
@@ -0,0 +1,28 @@
1
+ from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper
2
+ from google.protobuf import descriptor as _descriptor
3
+ from google.protobuf import message as _message
4
+ from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union
5
+
6
+ DESCRIPTOR: _descriptor.FileDescriptor
7
+
8
+ class AndroidAccessibilityNodeInfoClickableSpan(_message.Message):
9
+ __slots__ = ("text", "url", "source", "start", "node_id")
10
+ class SpanSource(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
11
+ __slots__ = ()
12
+ UNKNOWN_TYPE: _ClassVar[AndroidAccessibilityNodeInfoClickableSpan.SpanSource]
13
+ TEXT: _ClassVar[AndroidAccessibilityNodeInfoClickableSpan.SpanSource]
14
+ CONTENT_DESCRIPTION: _ClassVar[AndroidAccessibilityNodeInfoClickableSpan.SpanSource]
15
+ UNKNOWN_TYPE: AndroidAccessibilityNodeInfoClickableSpan.SpanSource
16
+ TEXT: AndroidAccessibilityNodeInfoClickableSpan.SpanSource
17
+ CONTENT_DESCRIPTION: AndroidAccessibilityNodeInfoClickableSpan.SpanSource
18
+ TEXT_FIELD_NUMBER: _ClassVar[int]
19
+ URL_FIELD_NUMBER: _ClassVar[int]
20
+ SOURCE_FIELD_NUMBER: _ClassVar[int]
21
+ START_FIELD_NUMBER: _ClassVar[int]
22
+ NODE_ID_FIELD_NUMBER: _ClassVar[int]
23
+ text: str
24
+ url: str
25
+ source: AndroidAccessibilityNodeInfoClickableSpan.SpanSource
26
+ start: int
27
+ node_id: int
28
+ def __init__(self, text: _Optional[str] = ..., url: _Optional[str] = ..., source: _Optional[_Union[AndroidAccessibilityNodeInfoClickableSpan.SpanSource, str]] = ..., start: _Optional[int] = ..., node_id: _Optional[int] = ...) -> None: ...
@@ -0,0 +1,24 @@
1
+ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
2
+ """Client and server classes corresponding to protobuf-defined services."""
3
+ import grpc
4
+ import warnings
5
+
6
+
7
+ GRPC_GENERATED_VERSION = '1.71.0'
8
+ GRPC_VERSION = grpc.__version__
9
+ _version_not_supported = False
10
+
11
+ try:
12
+ from grpc._utilities import first_version_is_lower
13
+ _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
14
+ except ImportError:
15
+ _version_not_supported = True
16
+
17
+ if _version_not_supported:
18
+ raise RuntimeError(
19
+ f'The grpc package installed is at version {GRPC_VERSION},'
20
+ + f' but the generated code in android_env/proto/a11y/android_accessibility_node_info_clickable_span_pb2_grpc.py depends on'
21
+ + f' grpcio>={GRPC_GENERATED_VERSION}.'
22
+ + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
23
+ + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
24
+ )
@@ -0,0 +1,42 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # NO CHECKED-IN PROTOBUF GENCODE
4
+ # source: android_env/proto/a11y/android_accessibility_node_info.proto
5
+ # Protobuf Python Version: 5.29.0
6
+ """Generated protocol buffer code."""
7
+ from google.protobuf import descriptor as _descriptor
8
+ from google.protobuf import descriptor_pool as _descriptor_pool
9
+ from google.protobuf import runtime_version as _runtime_version
10
+ from google.protobuf import symbol_database as _symbol_database
11
+ from google.protobuf.internal import builder as _builder
12
+ _runtime_version.ValidateProtobufRuntimeVersion(
13
+ _runtime_version.Domain.PUBLIC,
14
+ 5,
15
+ 29,
16
+ 0,
17
+ '',
18
+ 'android_env/proto/a11y/android_accessibility_node_info.proto'
19
+ )
20
+ # @@protoc_insertion_point(imports)
21
+
22
+ _sym_db = _symbol_database.Default()
23
+
24
+
25
+ from android_env.proto.a11y import android_accessibility_action_pb2 as android__env_dot_proto_dot_a11y_dot_android__accessibility__action__pb2
26
+ from android_env.proto.a11y import android_accessibility_node_info_clickable_span_pb2 as android__env_dot_proto_dot_a11y_dot_android__accessibility__node__info__clickable__span__pb2
27
+ from android_env.proto.a11y import rect_pb2 as android__env_dot_proto_dot_a11y_dot_rect__pb2
28
+
29
+
30
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n<android_env/proto/a11y/android_accessibility_node_info.proto\x12\x0b\x61ndroid_env\x1a\x39\x61ndroid_env/proto/a11y/android_accessibility_action.proto\x1aKandroid_env/proto/a11y/android_accessibility_node_info_clickable_span.proto\x1a!android_env/proto/a11y/rect.proto\"\xcd\x06\n\x1c\x41ndroidAccessibilityNodeInfo\x12\x11\n\tunique_id\x18\x01 \x01(\x05\x12\x30\n\x10\x62ounds_in_screen\x18\x02 \x01(\x0b\x32\x16.android_env.ProtoRect\x12\x12\n\nclass_name\x18\x03 \x01(\t\x12\x1b\n\x13\x63ontent_description\x18\x04 \x01(\t\x12\x11\n\thint_text\x18\x05 \x01(\t\x12\x14\n\x0cpackage_name\x18\x06 \x01(\t\x12\x0c\n\x04text\x18\x07 \x01(\t\x12\x1c\n\x14text_selection_start\x18\x08 \x01(\x03\x12\x1a\n\x12text_selection_end\x18\t \x01(\x03\x12\x1d\n\x15view_id_resource_name\x18\n \x01(\t\x12\x11\n\twindow_id\x18\x0b \x01(\x05\x12\x14\n\x0cis_checkable\x18\x0c \x01(\x08\x12\x12\n\nis_checked\x18\r \x01(\x08\x12\x14\n\x0cis_clickable\x18\x0e \x01(\x08\x12\x13\n\x0bis_editable\x18\x0f \x01(\x08\x12\x12\n\nis_enabled\x18\x10 \x01(\x08\x12\x14\n\x0cis_focusable\x18\x11 \x01(\x08\x12\x12\n\nis_focused\x18\x12 \x01(\x08\x12\x19\n\x11is_long_clickable\x18\x13 \x01(\x08\x12\x13\n\x0bis_password\x18\x14 \x01(\x08\x12\x15\n\ris_scrollable\x18\x15 \x01(\x08\x12\x13\n\x0bis_selected\x18\x16 \x01(\x08\x12\x1a\n\x12is_visible_to_user\x18\x17 \x01(\x08\x12\x38\n\x07\x61\x63tions\x18\x18 \x03(\x0b\x32\'.android_env.AndroidAccessibilityAction\x12\x15\n\tchild_ids\x18\x19 \x03(\x05\x42\x02\x10\x01\x12O\n\x0f\x63lickable_spans\x18\x1a \x03(\x0b\x32\x36.android_env.AndroidAccessibilityNodeInfoClickableSpan\x12\r\n\x05\x64\x65pth\x18\x1b \x01(\x05\x12\x15\n\rlabeled_by_id\x18\x1c \x01(\x05\x12\x14\n\x0clabel_for_id\x18\x1d \x01(\x05\x12\x15\n\rdrawing_order\x18\x1e \x01(\x05\x12\x14\n\x0ctooltip_text\x18\x1f \x01(\tB0\n,com.google.androidenv.accessibilityforwarderP\x01\x62\x06proto3')
31
+
32
+ _globals = globals()
33
+ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
34
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'android_env.proto.a11y.android_accessibility_node_info_pb2', _globals)
35
+ if not _descriptor._USE_C_DESCRIPTORS:
36
+ _globals['DESCRIPTOR']._loaded_options = None
37
+ _globals['DESCRIPTOR']._serialized_options = b'\n,com.google.androidenv.accessibilityforwarderP\001'
38
+ _globals['_ANDROIDACCESSIBILITYNODEINFO'].fields_by_name['child_ids']._loaded_options = None
39
+ _globals['_ANDROIDACCESSIBILITYNODEINFO'].fields_by_name['child_ids']._serialized_options = b'\020\001'
40
+ _globals['_ANDROIDACCESSIBILITYNODEINFO']._serialized_start=249
41
+ _globals['_ANDROIDACCESSIBILITYNODEINFO']._serialized_end=1094
42
+ # @@protoc_insertion_point(module_scope)
@@ -0,0 +1,75 @@
1
+ from android_env.proto.a11y import android_accessibility_action_pb2 as _android_accessibility_action_pb2
2
+ from android_env.proto.a11y import android_accessibility_node_info_clickable_span_pb2 as _android_accessibility_node_info_clickable_span_pb2
3
+ from android_env.proto.a11y import rect_pb2 as _rect_pb2
4
+ from google.protobuf.internal import containers as _containers
5
+ from google.protobuf import descriptor as _descriptor
6
+ from google.protobuf import message as _message
7
+ from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union
8
+
9
+ DESCRIPTOR: _descriptor.FileDescriptor
10
+
11
+ class AndroidAccessibilityNodeInfo(_message.Message):
12
+ __slots__ = ("unique_id", "bounds_in_screen", "class_name", "content_description", "hint_text", "package_name", "text", "text_selection_start", "text_selection_end", "view_id_resource_name", "window_id", "is_checkable", "is_checked", "is_clickable", "is_editable", "is_enabled", "is_focusable", "is_focused", "is_long_clickable", "is_password", "is_scrollable", "is_selected", "is_visible_to_user", "actions", "child_ids", "clickable_spans", "depth", "labeled_by_id", "label_for_id", "drawing_order", "tooltip_text")
13
+ UNIQUE_ID_FIELD_NUMBER: _ClassVar[int]
14
+ BOUNDS_IN_SCREEN_FIELD_NUMBER: _ClassVar[int]
15
+ CLASS_NAME_FIELD_NUMBER: _ClassVar[int]
16
+ CONTENT_DESCRIPTION_FIELD_NUMBER: _ClassVar[int]
17
+ HINT_TEXT_FIELD_NUMBER: _ClassVar[int]
18
+ PACKAGE_NAME_FIELD_NUMBER: _ClassVar[int]
19
+ TEXT_FIELD_NUMBER: _ClassVar[int]
20
+ TEXT_SELECTION_START_FIELD_NUMBER: _ClassVar[int]
21
+ TEXT_SELECTION_END_FIELD_NUMBER: _ClassVar[int]
22
+ VIEW_ID_RESOURCE_NAME_FIELD_NUMBER: _ClassVar[int]
23
+ WINDOW_ID_FIELD_NUMBER: _ClassVar[int]
24
+ IS_CHECKABLE_FIELD_NUMBER: _ClassVar[int]
25
+ IS_CHECKED_FIELD_NUMBER: _ClassVar[int]
26
+ IS_CLICKABLE_FIELD_NUMBER: _ClassVar[int]
27
+ IS_EDITABLE_FIELD_NUMBER: _ClassVar[int]
28
+ IS_ENABLED_FIELD_NUMBER: _ClassVar[int]
29
+ IS_FOCUSABLE_FIELD_NUMBER: _ClassVar[int]
30
+ IS_FOCUSED_FIELD_NUMBER: _ClassVar[int]
31
+ IS_LONG_CLICKABLE_FIELD_NUMBER: _ClassVar[int]
32
+ IS_PASSWORD_FIELD_NUMBER: _ClassVar[int]
33
+ IS_SCROLLABLE_FIELD_NUMBER: _ClassVar[int]
34
+ IS_SELECTED_FIELD_NUMBER: _ClassVar[int]
35
+ IS_VISIBLE_TO_USER_FIELD_NUMBER: _ClassVar[int]
36
+ ACTIONS_FIELD_NUMBER: _ClassVar[int]
37
+ CHILD_IDS_FIELD_NUMBER: _ClassVar[int]
38
+ CLICKABLE_SPANS_FIELD_NUMBER: _ClassVar[int]
39
+ DEPTH_FIELD_NUMBER: _ClassVar[int]
40
+ LABELED_BY_ID_FIELD_NUMBER: _ClassVar[int]
41
+ LABEL_FOR_ID_FIELD_NUMBER: _ClassVar[int]
42
+ DRAWING_ORDER_FIELD_NUMBER: _ClassVar[int]
43
+ TOOLTIP_TEXT_FIELD_NUMBER: _ClassVar[int]
44
+ unique_id: int
45
+ bounds_in_screen: _rect_pb2.ProtoRect
46
+ class_name: str
47
+ content_description: str
48
+ hint_text: str
49
+ package_name: str
50
+ text: str
51
+ text_selection_start: int
52
+ text_selection_end: int
53
+ view_id_resource_name: str
54
+ window_id: int
55
+ is_checkable: bool
56
+ is_checked: bool
57
+ is_clickable: bool
58
+ is_editable: bool
59
+ is_enabled: bool
60
+ is_focusable: bool
61
+ is_focused: bool
62
+ is_long_clickable: bool
63
+ is_password: bool
64
+ is_scrollable: bool
65
+ is_selected: bool
66
+ is_visible_to_user: bool
67
+ actions: _containers.RepeatedCompositeFieldContainer[_android_accessibility_action_pb2.AndroidAccessibilityAction]
68
+ child_ids: _containers.RepeatedScalarFieldContainer[int]
69
+ clickable_spans: _containers.RepeatedCompositeFieldContainer[_android_accessibility_node_info_clickable_span_pb2.AndroidAccessibilityNodeInfoClickableSpan]
70
+ depth: int
71
+ labeled_by_id: int
72
+ label_for_id: int
73
+ drawing_order: int
74
+ tooltip_text: str
75
+ def __init__(self, unique_id: _Optional[int] = ..., bounds_in_screen: _Optional[_Union[_rect_pb2.ProtoRect, _Mapping]] = ..., class_name: _Optional[str] = ..., content_description: _Optional[str] = ..., hint_text: _Optional[str] = ..., package_name: _Optional[str] = ..., text: _Optional[str] = ..., text_selection_start: _Optional[int] = ..., text_selection_end: _Optional[int] = ..., view_id_resource_name: _Optional[str] = ..., window_id: _Optional[int] = ..., is_checkable: bool = ..., is_checked: bool = ..., is_clickable: bool = ..., is_editable: bool = ..., is_enabled: bool = ..., is_focusable: bool = ..., is_focused: bool = ..., is_long_clickable: bool = ..., is_password: bool = ..., is_scrollable: bool = ..., is_selected: bool = ..., is_visible_to_user: bool = ..., actions: _Optional[_Iterable[_Union[_android_accessibility_action_pb2.AndroidAccessibilityAction, _Mapping]]] = ..., child_ids: _Optional[_Iterable[int]] = ..., clickable_spans: _Optional[_Iterable[_Union[_android_accessibility_node_info_clickable_span_pb2.AndroidAccessibilityNodeInfoClickableSpan, _Mapping]]] = ..., depth: _Optional[int] = ..., labeled_by_id: _Optional[int] = ..., label_for_id: _Optional[int] = ..., drawing_order: _Optional[int] = ..., tooltip_text: _Optional[str] = ...) -> None: ...
@@ -0,0 +1,24 @@
1
+ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
2
+ """Client and server classes corresponding to protobuf-defined services."""
3
+ import grpc
4
+ import warnings
5
+
6
+
7
+ GRPC_GENERATED_VERSION = '1.71.0'
8
+ GRPC_VERSION = grpc.__version__
9
+ _version_not_supported = False
10
+
11
+ try:
12
+ from grpc._utilities import first_version_is_lower
13
+ _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
14
+ except ImportError:
15
+ _version_not_supported = True
16
+
17
+ if _version_not_supported:
18
+ raise RuntimeError(
19
+ f'The grpc package installed is at version {GRPC_VERSION},'
20
+ + f' but the generated code in android_env/proto/a11y/android_accessibility_node_info_pb2_grpc.py depends on'
21
+ + f' grpcio>={GRPC_GENERATED_VERSION}.'
22
+ + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
23
+ + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
24
+ )
@@ -0,0 +1,29 @@
1
+ // Copyright 2024 DeepMind Technologies Limited.
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+
15
+ syntax = "proto3";
16
+
17
+ package android_env;
18
+
19
+ import "android_env/proto/a11y/android_accessibility_node_info.proto";
20
+
21
+ option java_multiple_files = true;
22
+ option java_package = "com.google.androidenv.accessibilityforwarder";
23
+
24
+ // A tree (actually a graph) of Android accessibility nodes.
25
+ // Next index: 3
26
+ message AndroidAccessibilityTree {
27
+ // All of the nodes in the graph. The root node is the node whose ID is 0.
28
+ repeated AndroidAccessibilityNodeInfo nodes = 1;
29
+ }
@@ -0,0 +1,38 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # NO CHECKED-IN PROTOBUF GENCODE
4
+ # source: android_env/proto/a11y/android_accessibility_tree.proto
5
+ # Protobuf Python Version: 5.29.0
6
+ """Generated protocol buffer code."""
7
+ from google.protobuf import descriptor as _descriptor
8
+ from google.protobuf import descriptor_pool as _descriptor_pool
9
+ from google.protobuf import runtime_version as _runtime_version
10
+ from google.protobuf import symbol_database as _symbol_database
11
+ from google.protobuf.internal import builder as _builder
12
+ _runtime_version.ValidateProtobufRuntimeVersion(
13
+ _runtime_version.Domain.PUBLIC,
14
+ 5,
15
+ 29,
16
+ 0,
17
+ '',
18
+ 'android_env/proto/a11y/android_accessibility_tree.proto'
19
+ )
20
+ # @@protoc_insertion_point(imports)
21
+
22
+ _sym_db = _symbol_database.Default()
23
+
24
+
25
+ from android_env.proto.a11y import android_accessibility_node_info_pb2 as android__env_dot_proto_dot_a11y_dot_android__accessibility__node__info__pb2
26
+
27
+
28
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n7android_env/proto/a11y/android_accessibility_tree.proto\x12\x0b\x61ndroid_env\x1a<android_env/proto/a11y/android_accessibility_node_info.proto\"T\n\x18\x41ndroidAccessibilityTree\x12\x38\n\x05nodes\x18\x01 \x03(\x0b\x32).android_env.AndroidAccessibilityNodeInfoB0\n,com.google.androidenv.accessibilityforwarderP\x01\x62\x06proto3')
29
+
30
+ _globals = globals()
31
+ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
32
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'android_env.proto.a11y.android_accessibility_tree_pb2', _globals)
33
+ if not _descriptor._USE_C_DESCRIPTORS:
34
+ _globals['DESCRIPTOR']._loaded_options = None
35
+ _globals['DESCRIPTOR']._serialized_options = b'\n,com.google.androidenv.accessibilityforwarderP\001'
36
+ _globals['_ANDROIDACCESSIBILITYTREE']._serialized_start=134
37
+ _globals['_ANDROIDACCESSIBILITYTREE']._serialized_end=218
38
+ # @@protoc_insertion_point(module_scope)
@@ -0,0 +1,13 @@
1
+ from android_env.proto.a11y import android_accessibility_node_info_pb2 as _android_accessibility_node_info_pb2
2
+ from google.protobuf.internal import containers as _containers
3
+ from google.protobuf import descriptor as _descriptor
4
+ from google.protobuf import message as _message
5
+ from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union
6
+
7
+ DESCRIPTOR: _descriptor.FileDescriptor
8
+
9
+ class AndroidAccessibilityTree(_message.Message):
10
+ __slots__ = ("nodes",)
11
+ NODES_FIELD_NUMBER: _ClassVar[int]
12
+ nodes: _containers.RepeatedCompositeFieldContainer[_android_accessibility_node_info_pb2.AndroidAccessibilityNodeInfo]
13
+ def __init__(self, nodes: _Optional[_Iterable[_Union[_android_accessibility_node_info_pb2.AndroidAccessibilityNodeInfo, _Mapping]]] = ...) -> None: ...
@@ -0,0 +1,24 @@
1
+ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
2
+ """Client and server classes corresponding to protobuf-defined services."""
3
+ import grpc
4
+ import warnings
5
+
6
+
7
+ GRPC_GENERATED_VERSION = '1.71.0'
8
+ GRPC_VERSION = grpc.__version__
9
+ _version_not_supported = False
10
+
11
+ try:
12
+ from grpc._utilities import first_version_is_lower
13
+ _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
14
+ except ImportError:
15
+ _version_not_supported = True
16
+
17
+ if _version_not_supported:
18
+ raise RuntimeError(
19
+ f'The grpc package installed is at version {GRPC_VERSION},'
20
+ + f' but the generated code in android_env/proto/a11y/android_accessibility_tree_pb2_grpc.py depends on'
21
+ + f' grpcio>={GRPC_GENERATED_VERSION}.'
22
+ + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
23
+ + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
24
+ )
@@ -0,0 +1,84 @@
1
+ // Copyright 2024 DeepMind Technologies Limited.
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+
15
+ syntax = "proto3";
16
+
17
+ package android_env;
18
+
19
+ import "android_env/proto/a11y/android_accessibility_tree.proto";
20
+ import "android_env/proto/a11y/rect.proto";
21
+
22
+ option java_multiple_files = true;
23
+ option java_package = "com.google.androidenv.accessibilityforwarder";
24
+
25
+ // An Android AccessibilityWindowInfo.
26
+ // Next index: 12
27
+ message AndroidAccessibilityWindowInfo {
28
+ // Type of the window.
29
+ // Next index: 6
30
+ enum WindowType {
31
+ // The window type is an unknown value.
32
+ UNKNOWN_TYPE = 0;
33
+
34
+ // A standard application window.
35
+ TYPE_APPLICATION = 1;
36
+
37
+ // An IME window (e.g. GBoard).
38
+ TYPE_INPUT_METHOD = 2;
39
+
40
+ // A system window (e.g., a notification).
41
+ TYPE_SYSTEM = 3;
42
+
43
+ // An accessibility overlay.
44
+ TYPE_ACCESSIBILITY_OVERLAY = 4;
45
+
46
+ // A system window used to divide the screen in split-screen mode. This type
47
+ // of window is present only in split-screen mode.
48
+ TYPE_SPLIT_SCREEN_DIVIDER = 5;
49
+ }
50
+
51
+ // Bounds of this window in the device's screen.
52
+ ProtoRect bounds_in_screen = 1;
53
+
54
+ // A unique ID identifying the display in which this window is shown.
55
+ int32 display_id = 2;
56
+
57
+ // Unique ID as defined by the Android platform.
58
+ int32 id = 3;
59
+
60
+ // Z-index of the window. Windows with a greater z-index appear in front of
61
+ // those with a lesser z-index.
62
+ int32 layer = 4;
63
+
64
+ // The title of the window, if set.
65
+ string title = 5;
66
+
67
+ // The type of the window.
68
+ WindowType window_type = 6;
69
+
70
+ // If true, the window is currently accessibility-focused.
71
+ bool is_accessibility_focused = 7;
72
+
73
+ // If true, the window is currently active.
74
+ bool is_active = 8;
75
+
76
+ // If true, the window is currently focused.
77
+ bool is_focused = 9;
78
+
79
+ // If true, the window is in Picture in Picture mode.
80
+ bool is_in_picture_in_picture_mode = 10;
81
+
82
+ // The associated accessibility tree for this window.
83
+ AndroidAccessibilityTree tree = 11;
84
+ }
@@ -0,0 +1,41 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # NO CHECKED-IN PROTOBUF GENCODE
4
+ # source: android_env/proto/a11y/android_accessibility_window_info.proto
5
+ # Protobuf Python Version: 5.29.0
6
+ """Generated protocol buffer code."""
7
+ from google.protobuf import descriptor as _descriptor
8
+ from google.protobuf import descriptor_pool as _descriptor_pool
9
+ from google.protobuf import runtime_version as _runtime_version
10
+ from google.protobuf import symbol_database as _symbol_database
11
+ from google.protobuf.internal import builder as _builder
12
+ _runtime_version.ValidateProtobufRuntimeVersion(
13
+ _runtime_version.Domain.PUBLIC,
14
+ 5,
15
+ 29,
16
+ 0,
17
+ '',
18
+ 'android_env/proto/a11y/android_accessibility_window_info.proto'
19
+ )
20
+ # @@protoc_insertion_point(imports)
21
+
22
+ _sym_db = _symbol_database.Default()
23
+
24
+
25
+ from android_env.proto.a11y import android_accessibility_tree_pb2 as android__env_dot_proto_dot_a11y_dot_android__accessibility__tree__pb2
26
+ from android_env.proto.a11y import rect_pb2 as android__env_dot_proto_dot_a11y_dot_rect__pb2
27
+
28
+
29
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n>android_env/proto/a11y/android_accessibility_window_info.proto\x12\x0b\x61ndroid_env\x1a\x37\x61ndroid_env/proto/a11y/android_accessibility_tree.proto\x1a!android_env/proto/a11y/rect.proto\"\xa0\x04\n\x1e\x41ndroidAccessibilityWindowInfo\x12\x30\n\x10\x62ounds_in_screen\x18\x01 \x01(\x0b\x32\x16.android_env.ProtoRect\x12\x12\n\ndisplay_id\x18\x02 \x01(\x05\x12\n\n\x02id\x18\x03 \x01(\x05\x12\r\n\x05layer\x18\x04 \x01(\x05\x12\r\n\x05title\x18\x05 \x01(\t\x12K\n\x0bwindow_type\x18\x06 \x01(\x0e\x32\x36.android_env.AndroidAccessibilityWindowInfo.WindowType\x12 \n\x18is_accessibility_focused\x18\x07 \x01(\x08\x12\x11\n\tis_active\x18\x08 \x01(\x08\x12\x12\n\nis_focused\x18\t \x01(\x08\x12%\n\x1dis_in_picture_in_picture_mode\x18\n \x01(\x08\x12\x33\n\x04tree\x18\x0b \x01(\x0b\x32%.android_env.AndroidAccessibilityTree\"\x9b\x01\n\nWindowType\x12\x10\n\x0cUNKNOWN_TYPE\x10\x00\x12\x14\n\x10TYPE_APPLICATION\x10\x01\x12\x15\n\x11TYPE_INPUT_METHOD\x10\x02\x12\x0f\n\x0bTYPE_SYSTEM\x10\x03\x12\x1e\n\x1aTYPE_ACCESSIBILITY_OVERLAY\x10\x04\x12\x1d\n\x19TYPE_SPLIT_SCREEN_DIVIDER\x10\x05\x42\x30\n,com.google.androidenv.accessibilityforwarderP\x01\x62\x06proto3')
30
+
31
+ _globals = globals()
32
+ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
33
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'android_env.proto.a11y.android_accessibility_window_info_pb2', _globals)
34
+ if not _descriptor._USE_C_DESCRIPTORS:
35
+ _globals['DESCRIPTOR']._loaded_options = None
36
+ _globals['DESCRIPTOR']._serialized_options = b'\n,com.google.androidenv.accessibilityforwarderP\001'
37
+ _globals['_ANDROIDACCESSIBILITYWINDOWINFO']._serialized_start=172
38
+ _globals['_ANDROIDACCESSIBILITYWINDOWINFO']._serialized_end=716
39
+ _globals['_ANDROIDACCESSIBILITYWINDOWINFO_WINDOWTYPE']._serialized_start=561
40
+ _globals['_ANDROIDACCESSIBILITYWINDOWINFO_WINDOWTYPE']._serialized_end=716
41
+ # @@protoc_insertion_point(module_scope)
@@ -0,0 +1,48 @@
1
+ from android_env.proto.a11y import android_accessibility_tree_pb2 as _android_accessibility_tree_pb2
2
+ from android_env.proto.a11y import rect_pb2 as _rect_pb2
3
+ from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper
4
+ from google.protobuf import descriptor as _descriptor
5
+ from google.protobuf import message as _message
6
+ from typing import ClassVar as _ClassVar, Mapping as _Mapping, Optional as _Optional, Union as _Union
7
+
8
+ DESCRIPTOR: _descriptor.FileDescriptor
9
+
10
+ class AndroidAccessibilityWindowInfo(_message.Message):
11
+ __slots__ = ("bounds_in_screen", "display_id", "id", "layer", "title", "window_type", "is_accessibility_focused", "is_active", "is_focused", "is_in_picture_in_picture_mode", "tree")
12
+ class WindowType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
13
+ __slots__ = ()
14
+ UNKNOWN_TYPE: _ClassVar[AndroidAccessibilityWindowInfo.WindowType]
15
+ TYPE_APPLICATION: _ClassVar[AndroidAccessibilityWindowInfo.WindowType]
16
+ TYPE_INPUT_METHOD: _ClassVar[AndroidAccessibilityWindowInfo.WindowType]
17
+ TYPE_SYSTEM: _ClassVar[AndroidAccessibilityWindowInfo.WindowType]
18
+ TYPE_ACCESSIBILITY_OVERLAY: _ClassVar[AndroidAccessibilityWindowInfo.WindowType]
19
+ TYPE_SPLIT_SCREEN_DIVIDER: _ClassVar[AndroidAccessibilityWindowInfo.WindowType]
20
+ UNKNOWN_TYPE: AndroidAccessibilityWindowInfo.WindowType
21
+ TYPE_APPLICATION: AndroidAccessibilityWindowInfo.WindowType
22
+ TYPE_INPUT_METHOD: AndroidAccessibilityWindowInfo.WindowType
23
+ TYPE_SYSTEM: AndroidAccessibilityWindowInfo.WindowType
24
+ TYPE_ACCESSIBILITY_OVERLAY: AndroidAccessibilityWindowInfo.WindowType
25
+ TYPE_SPLIT_SCREEN_DIVIDER: AndroidAccessibilityWindowInfo.WindowType
26
+ BOUNDS_IN_SCREEN_FIELD_NUMBER: _ClassVar[int]
27
+ DISPLAY_ID_FIELD_NUMBER: _ClassVar[int]
28
+ ID_FIELD_NUMBER: _ClassVar[int]
29
+ LAYER_FIELD_NUMBER: _ClassVar[int]
30
+ TITLE_FIELD_NUMBER: _ClassVar[int]
31
+ WINDOW_TYPE_FIELD_NUMBER: _ClassVar[int]
32
+ IS_ACCESSIBILITY_FOCUSED_FIELD_NUMBER: _ClassVar[int]
33
+ IS_ACTIVE_FIELD_NUMBER: _ClassVar[int]
34
+ IS_FOCUSED_FIELD_NUMBER: _ClassVar[int]
35
+ IS_IN_PICTURE_IN_PICTURE_MODE_FIELD_NUMBER: _ClassVar[int]
36
+ TREE_FIELD_NUMBER: _ClassVar[int]
37
+ bounds_in_screen: _rect_pb2.ProtoRect
38
+ display_id: int
39
+ id: int
40
+ layer: int
41
+ title: str
42
+ window_type: AndroidAccessibilityWindowInfo.WindowType
43
+ is_accessibility_focused: bool
44
+ is_active: bool
45
+ is_focused: bool
46
+ is_in_picture_in_picture_mode: bool
47
+ tree: _android_accessibility_tree_pb2.AndroidAccessibilityTree
48
+ def __init__(self, bounds_in_screen: _Optional[_Union[_rect_pb2.ProtoRect, _Mapping]] = ..., display_id: _Optional[int] = ..., id: _Optional[int] = ..., layer: _Optional[int] = ..., title: _Optional[str] = ..., window_type: _Optional[_Union[AndroidAccessibilityWindowInfo.WindowType, str]] = ..., is_accessibility_focused: bool = ..., is_active: bool = ..., is_focused: bool = ..., is_in_picture_in_picture_mode: bool = ..., tree: _Optional[_Union[_android_accessibility_tree_pb2.AndroidAccessibilityTree, _Mapping]] = ...) -> None: ...
@@ -0,0 +1,24 @@
1
+ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
2
+ """Client and server classes corresponding to protobuf-defined services."""
3
+ import grpc
4
+ import warnings
5
+
6
+
7
+ GRPC_GENERATED_VERSION = '1.71.0'
8
+ GRPC_VERSION = grpc.__version__
9
+ _version_not_supported = False
10
+
11
+ try:
12
+ from grpc._utilities import first_version_is_lower
13
+ _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
14
+ except ImportError:
15
+ _version_not_supported = True
16
+
17
+ if _version_not_supported:
18
+ raise RuntimeError(
19
+ f'The grpc package installed is at version {GRPC_VERSION},'
20
+ + f' but the generated code in android_env/proto/a11y/android_accessibility_window_info_pb2_grpc.py depends on'
21
+ + f' grpcio>={GRPC_GENERATED_VERSION}.'
22
+ + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
23
+ + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
24
+ )
@@ -0,0 +1,30 @@
1
+ // Copyright 2024 DeepMind Technologies Limited.
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+
15
+ syntax = "proto3";
16
+
17
+ package android_env;
18
+
19
+ option java_multiple_files = true;
20
+ option java_package = "com.google.androidenv.accessibilityforwarder";
21
+
22
+ // Proto representation of Android Rect.
23
+ // https://developer.android.com/reference/android/graphics/Rect
24
+ // Next index: 5
25
+ message ProtoRect {
26
+ int32 left = 1;
27
+ int32 top = 2;
28
+ int32 right = 3;
29
+ int32 bottom = 4;
30
+ }
@@ -0,0 +1,37 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # NO CHECKED-IN PROTOBUF GENCODE
4
+ # source: android_env/proto/a11y/rect.proto
5
+ # Protobuf Python Version: 5.29.0
6
+ """Generated protocol buffer code."""
7
+ from google.protobuf import descriptor as _descriptor
8
+ from google.protobuf import descriptor_pool as _descriptor_pool
9
+ from google.protobuf import runtime_version as _runtime_version
10
+ from google.protobuf import symbol_database as _symbol_database
11
+ from google.protobuf.internal import builder as _builder
12
+ _runtime_version.ValidateProtobufRuntimeVersion(
13
+ _runtime_version.Domain.PUBLIC,
14
+ 5,
15
+ 29,
16
+ 0,
17
+ '',
18
+ 'android_env/proto/a11y/rect.proto'
19
+ )
20
+ # @@protoc_insertion_point(imports)
21
+
22
+ _sym_db = _symbol_database.Default()
23
+
24
+
25
+
26
+
27
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n!android_env/proto/a11y/rect.proto\x12\x0b\x61ndroid_env\"E\n\tProtoRect\x12\x0c\n\x04left\x18\x01 \x01(\x05\x12\x0b\n\x03top\x18\x02 \x01(\x05\x12\r\n\x05right\x18\x03 \x01(\x05\x12\x0e\n\x06\x62ottom\x18\x04 \x01(\x05\x42\x30\n,com.google.androidenv.accessibilityforwarderP\x01\x62\x06proto3')
28
+
29
+ _globals = globals()
30
+ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
31
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'android_env.proto.a11y.rect_pb2', _globals)
32
+ if not _descriptor._USE_C_DESCRIPTORS:
33
+ _globals['DESCRIPTOR']._loaded_options = None
34
+ _globals['DESCRIPTOR']._serialized_options = b'\n,com.google.androidenv.accessibilityforwarderP\001'
35
+ _globals['_PROTORECT']._serialized_start=50
36
+ _globals['_PROTORECT']._serialized_end=119
37
+ # @@protoc_insertion_point(module_scope)
@@ -0,0 +1,17 @@
1
+ from google.protobuf import descriptor as _descriptor
2
+ from google.protobuf import message as _message
3
+ from typing import ClassVar as _ClassVar, Optional as _Optional
4
+
5
+ DESCRIPTOR: _descriptor.FileDescriptor
6
+
7
+ class ProtoRect(_message.Message):
8
+ __slots__ = ("left", "top", "right", "bottom")
9
+ LEFT_FIELD_NUMBER: _ClassVar[int]
10
+ TOP_FIELD_NUMBER: _ClassVar[int]
11
+ RIGHT_FIELD_NUMBER: _ClassVar[int]
12
+ BOTTOM_FIELD_NUMBER: _ClassVar[int]
13
+ left: int
14
+ top: int
15
+ right: int
16
+ bottom: int
17
+ def __init__(self, left: _Optional[int] = ..., top: _Optional[int] = ..., right: _Optional[int] = ..., bottom: _Optional[int] = ...) -> None: ...