SYMBOL INDEX (809 symbols across 75 files) FILE: android_env/components/action_fns.py function send_action_to_simulator (line 26) | def send_action_to_simulator( function _prepare_touch_action (line 69) | def _prepare_touch_action( function _split_touch_action (line 101) | def _split_touch_action( function lift_all_fingers_action (line 118) | def lift_all_fingers_action(num_fingers: int) -> dict[str, np.ndarray]: FILE: android_env/components/action_fns_test.py class ActionFnsTest (line 27) | class ActionFnsTest(parameterized.TestCase): method test_send_action_to_simulator_missing_action_type (line 29) | def test_send_action_to_simulator_missing_action_type(self): method test_send_action_to_simulator_sendactionerror (line 47) | def test_send_action_to_simulator_sendactionerror(self): method test_send_action_to_simulator_touch_success_one_finger (line 71) | def test_send_action_to_simulator_touch_success_one_finger(self): method test_send_action_to_simulator_touch_success_multiple_finger (line 96) | def test_send_action_to_simulator_touch_success_multiple_finger(self): method test_send_action_to_simulator_keydown_success (line 127) | def test_send_action_to_simulator_keydown_success(self): method test_send_action_to_simulator_keyup_success (line 150) | def test_send_action_to_simulator_keyup_success(self): method test_send_action_to_simulator_keypress_success (line 173) | def test_send_action_to_simulator_keypress_success(self): method test_lift_all_fingers_action (line 216) | def test_lift_all_fingers_action( FILE: android_env/components/action_type.py class ActionType (line 30) | class ActionType(enum.IntEnum): FILE: android_env/components/adb_call_parser.py class AdbCallParser (line 40) | class AdbCallParser: method __init__ (line 43) | def __init__(self, adb_controller: adb_control.AdbController): method _execute_command (line 65) | def _execute_command( method parse (line 93) | def parse(self, request: adb_pb2.AdbRequest) -> adb_pb2.AdbResponse: method _force_stop (line 113) | def _force_stop( method _fetch_current_task_id (line 138) | def _fetch_current_task_id( method _start_screen_pinning (line 185) | def _start_screen_pinning( method _send_broadcast (line 219) | def _send_broadcast( method _install_apk (line 252) | def _install_apk( method _start_activity (line 307) | def _start_activity( method _press_button (line 355) | def _press_button( method _handle_uninstall_package (line 382) | def _handle_uninstall_package( method _get_current_activity (line 421) | def _get_current_activity( method _get_orientation (line 475) | def _get_orientation( method _push (line 536) | def _push( method _pull (line 567) | def _pull( method _input_text (line 600) | def _input_text( method _tap (line 623) | def _tap( method _handle_settings (line 653) | def _handle_settings( method _handle_generic (line 756) | def _handle_generic( method _handle_package_manager (line 775) | def _handle_package_manager( method _handle_dumpsys (line 847) | def _handle_dumpsys( FILE: android_env/components/adb_call_parser_test.py class AdbCallParserTest (line 30) | class AdbCallParserTest(parameterized.TestCase): method test_unknown_command (line 32) | def test_unknown_command(self): method test_invalid_timeout (line 42) | def test_invalid_timeout(self): method test_install_apk_file_not_found (line 55) | def test_install_apk_file_not_found(self, mock_exists): method test_install_apk_successful (line 69) | def test_install_apk_successful(self, mock_exists): method test_install_apk_from_blob (line 84) | def test_install_apk_from_blob(self, mock_tempfile): method test_start_activity_empty_full_activity (line 114) | def test_start_activity_empty_full_activity(self): method test_start_activity_successful (line 125) | def test_start_activity_successful(self): method test_start_activity_successful_no_force_stop (line 146) | def test_start_activity_successful_no_force_stop(self): method test_start_activity_error (line 167) | def test_start_activity_error(self): method test_force_stop (line 183) | def test_force_stop(self): method test_grant_permissions_empty_package_name (line 194) | def test_grant_permissions_empty_package_name(self): method test_grant_permissions_empty_permissions (line 204) | def test_grant_permissions_empty_permissions(self): method test_grant_permissions_successful (line 214) | def test_grant_permissions_successful(self): method test_press_button_invalid_button (line 229) | def test_press_button_invalid_button(self): method test_press_button_successful (line 239) | def test_press_button_successful(self): method test_start_screen_pinning_package_not_found (line 268) | def test_start_screen_pinning_package_not_found(self): method test_start_screen_pinning_successful (line 282) | def test_start_screen_pinning_successful(self): method test_start_screen_pinning_base_activity (line 298) | def test_start_screen_pinning_base_activity(self): method test_start_screen_pinning_top_activity (line 314) | def test_start_screen_pinning_top_activity(self): method test_send_broadcast_empty_action (line 330) | def test_send_broadcast_empty_action(self): method test_send_broadcast_successful (line 340) | def test_send_broadcast_successful(self): method test_send_broadcast_with_component_successful (line 349) | def test_send_broadcast_with_component_successful(self): method test_uninstall_package_empty_package_name (line 359) | def test_uninstall_package_empty_package_name(self): method test_uninstall_package_successful (line 369) | def test_uninstall_package_successful(self): method test_get_current_activity_no_visible_task (line 379) | def test_get_current_activity_no_visible_task(self): method test_get_orientation_empty_dumpsys (line 395) | def test_get_orientation_empty_dumpsys(self): method test_get_orientation_invalid_device_no_surface_orientation (line 407) | def test_get_orientation_invalid_device_no_surface_orientation(self): method test_get_orientation_success (line 429) | def test_get_orientation_success( method test_get_current_activity_no_matches (line 449) | def test_get_current_activity_no_matches(self): method test_get_current_activity_successful (line 470) | def test_get_current_activity_successful(self): method test_push_no_path (line 489) | def test_push_no_path(self): method test_push_successful (line 501) | def test_push_successful(self): method test_pull_no_path (line 523) | def test_pull_no_path(self): method test_pull_successful (line 535) | def test_pull_successful(self, mock_open): method test_input_text_no_text (line 559) | def test_input_text_no_text(self): method test_input_text_successful (line 570) | def test_input_text_successful(self): method test_tap_failed (line 591) | def test_tap_failed(self, request: adb_pb2.AdbRequest): method test_tap_successful (line 601) | def test_tap_successful(self): method test_settings_failures (line 638) | def test_settings_failures(self, request): method test_settings_success_get (line 649) | def test_settings_success_get(self): method test_settings_success_put (line 666) | def test_settings_success_put(self): method test_settings_success_delete (line 683) | def test_settings_success_delete(self): method test_settings_success_reset (line 724) | def test_settings_success_reset(self, mode, package_name, expected_arg): method test_settings_success_list (line 742) | def test_settings_success_list(self): method test_generic_command (line 760) | def test_generic_command(self): method test_generic_command_adb_error (line 776) | def test_generic_command_adb_error(self): method test_generic_command_timeout (line 792) | def test_generic_command_timeout(self): method test_package_manager_list_bad_output (line 828) | def test_package_manager_list_bad_output(self, request): method test_package_manager_list_features (line 839) | def test_package_manager_list_features(self): method test_package_manager_list_libraries (line 873) | def test_package_manager_list_libraries(self): method test_package_manager_list_packages (line 927) | def test_package_manager_list_packages(self): method test_package_manager_clear_no_package_name (line 953) | def test_package_manager_clear_no_package_name(self): method test_package_manager_clear_successful_no_user_id (line 970) | def test_package_manager_clear_successful_no_user_id(self): method test_package_manager_clear_successful_with_user_id (line 988) | def test_package_manager_clear_successful_with_user_id(self): method test_dumpsys_empty_request (line 1006) | def test_dumpsys_empty_request(self): method test_dumpsys_negative_timeouts (line 1028) | def test_dumpsys_negative_timeouts(self, request): method test_dumpsys_timeout_successful (line 1046) | def test_dumpsys_timeout_successful(self, timeout_sec, timeout_ms, exp... method test_dumpsys_priority_timeout_successful (line 1073) | def test_dumpsys_priority_timeout_successful(self, priority, expected): method test_dumpsys_list_only_cannot_be_combined (line 1104) | def test_dumpsys_list_only_cannot_be_combined( method test_dumpsys_list_only_success (line 1125) | def test_dumpsys_list_only_success(self): method test_dumpsys_skip_services_cannot_combine_with_service (line 1139) | def test_dumpsys_skip_services_cannot_combine_with_service(self): method test_dumpsys_skip_services (line 1155) | def test_dumpsys_skip_services(self): method test_dumpsys_single_service (line 1170) | def test_dumpsys_single_service(self): method test_dumpsys_single_service_with_args (line 1184) | def test_dumpsys_single_service_with_args(self): method test_dumpsys_single_service_with_proto (line 1199) | def test_dumpsys_single_service_with_proto(self): FILE: android_env/components/adb_controller.py class AdbController (line 27) | class AdbController: method __init__ (line 30) | def __init__(self, config: config_classes.AdbControllerConfig): method command_prefix (line 53) | def command_prefix(self, include_device_name: bool = True) -> list[str]: method init_server (line 71) | def init_server(self, timeout: float | None = None): method _restart_server (line 85) | def _restart_server(self, timeout: float | None = None): method execute_command (line 105) | def execute_command( FILE: android_env/components/adb_controller_test.py class AdbControllerTest (line 31) | class AdbControllerTest(absltest.TestCase): method setUp (line 33) | def setUp(self): method tearDown (line 40) | def tearDown(self): method test_init_server (line 49) | def test_init_server(self, mock_sleep, mock_check_output): method test_init_server_with_adb_server_port_from_os_env (line 77) | def test_init_server_with_adb_server_port_from_os_env( method test_restart_server (line 114) | def test_restart_server(self, mock_sleep, mock_check_output): method test_invalid_command (line 173) | def test_invalid_command(self, mock_sleep, mock_check_output): method test_avoid_infinite_recursion (line 242) | def test_avoid_infinite_recursion(self, mock_sleep, mock_check_output): class AdbControllerInitTest (line 264) | class AdbControllerInitTest(absltest.TestCase): method test_deletes_problem_env_vars (line 266) | def test_deletes_problem_env_vars(self): method test_use_adb_server_port_from_os_env_retains_os_env_vars (line 280) | def test_use_adb_server_port_from_os_env_retains_os_env_vars(self): FILE: android_env/components/adb_log_stream.py class AdbLogStream (line 27) | class AdbLogStream(log_stream.LogStream): method __init__ (line 30) | def __init__(self, adb_command_prefix: list[str], verbose: bool = False): method _get_stream_output (line 34) | def _get_stream_output(self): method stop_stream (line 52) | def stop_stream(self): FILE: android_env/components/adb_log_stream_test.py class FakeAdbSubprocess (line 25) | class FakeAdbSubprocess: method stdout (line 28) | def stdout(self): method kill (line 31) | def kill(self): class AdbLogStreamTest (line 35) | class AdbLogStreamTest(absltest.TestCase): method test_get_stream_output (line 39) | def test_get_stream_output(self, mock_popen, unused_mock_check_output): method test_stop_stream_before_get_stream_output (line 54) | def test_stop_stream_before_get_stream_output(self): FILE: android_env/components/app_screen_checker.py class _DumpsysNode (line 31) | class _DumpsysNode: method __init__ (line 34) | def __init__(self, data: str): method data (line 39) | def data(self) -> str: method children (line 43) | def children(self) -> list[Self]: method find_child (line 46) | def find_child( method __repr__ (line 75) | def __repr__(self): method print_tree (line 78) | def print_tree(self, indent: int = 2): function build_tree_from_dumpsys_output (line 85) | def build_tree_from_dumpsys_output(dumpsys_output: str) -> _DumpsysNode: function matches_path (line 129) | def matches_path( class AppScreenChecker (line 176) | class AppScreenChecker: class Outcome (line 179) | class Outcome(enum.IntEnum): method __init__ (line 192) | def __init__(self, adb_call_parser: adb_call_parser_lib.AdbCallParser, method matches_current_app_screen (line 202) | def matches_current_app_screen(self) -> enum.IntEnum: method wait_for_app_screen (line 241) | def wait_for_app_screen(self, timeout_sec: float) -> float: FILE: android_env/components/app_screen_checker_test.py function _flatten_tree (line 29) | def _flatten_tree( class AppScreenCheckerTest (line 38) | class AppScreenCheckerTest(absltest.TestCase): method test_build_tree_from_dumpsys_output (line 42) | def test_build_tree_from_dumpsys_output(self): method test_build_forest_from_dumpsys_output (line 96) | def test_build_forest_from_dumpsys_output(self): method test_no_view_hierarchy_matches_path (line 140) | def test_no_view_hierarchy_matches_path(self): method test_matches_path (line 160) | def test_matches_path(self): method test_matches_path_one_level_deep (line 195) | def test_matches_path_one_level_deep(self): method test_wait_for_app_screen_zero_timeout (line 232) | def test_wait_for_app_screen_zero_timeout(self): method test_wait_for_app_screen_successful (line 246) | def test_wait_for_app_screen_successful(self): FILE: android_env/components/config_classes.py class AdbControllerConfig (line 23) | class AdbControllerConfig: class DeviceSettingsConfig (line 47) | class DeviceSettingsConfig: class CoordinatorConfig (line 61) | class CoordinatorConfig: class SimulatorConfig (line 79) | class SimulatorConfig: class GPUMode (line 91) | class GPUMode(enum.Enum): class EmulatorLauncherConfig (line 100) | class EmulatorLauncherConfig: class EmulatorConfig (line 144) | class EmulatorConfig(SimulatorConfig): class FakeSimulatorConfig (line 167) | class FakeSimulatorConfig(SimulatorConfig): class TaskManagerConfig (line 175) | class TaskManagerConfig: class TaskConfig (line 193) | class TaskConfig: class FilesystemTaskConfig (line 201) | class FilesystemTaskConfig(TaskConfig): class AndroidEnvConfig (line 209) | class AndroidEnvConfig: FILE: android_env/components/coordinator.py class Coordinator (line 36) | class Coordinator: method __init__ (line 39) | def __init__( method action_spec (line 81) | def action_spec(self) -> dict[str, dm_env.specs.Array]: method observation_spec (line 87) | def observation_spec(self) -> dict[str, dm_env.specs.Array]: method _should_periodic_relaunch (line 93) | def _should_periodic_relaunch(self) -> bool: method _launch_simulator (line 114) | def _launch_simulator(self, max_retries: int = 3): method _create_adb_call_parser (line 171) | def _create_adb_call_parser(self): method execute_adb_call (line 177) | def execute_adb_call(self, call: adb_pb2.AdbRequest) -> adb_pb2.AdbRes... method rl_reset (line 180) | def rl_reset(self) -> dm_env.TimeStep: method rl_step (line 213) | def rl_step(self, agent_action: dict[str, np.ndarray]) -> dm_env.TimeS... method _gather_simulator_signals (line 248) | def _gather_simulator_signals(self) -> dict[str, np.ndarray]: method __del__ (line 266) | def __del__(self): method stats (line 269) | def stats(self) -> dict[str, Any]: method close (line 274) | def close(self): FILE: android_env/components/coordinator_test.py class CoordinatorTest (line 39) | class CoordinatorTest(parameterized.TestCase): method setUp (line 41) | def setUp(self): method tearDown (line 63) | def tearDown(self): method test_relaunch_simulator (line 68) | def test_relaunch_simulator(self, unused_mock_sleep): method test_reset (line 75) | def test_reset(self, unused_mock_sleep): method test_reset_error_sending_action (line 84) | def test_reset_error_sending_action(self, unused_mock_sleep): method test_lift_all_fingers (line 94) | def test_lift_all_fingers(self, unused_mock_sleep): method test_process_action (line 113) | def test_process_action(self, unused_mock_sleep): method test_process_action_error (line 142) | def test_process_action_error(self, unused_mock_sleep): method test_execute_action_touch (line 160) | def test_execute_action_touch(self, unused_mock_sleep): method test_execute_multitouch_action (line 186) | def test_execute_multitouch_action(self, unused_mock_sleep): method test_execute_action_repeat (line 224) | def test_execute_action_repeat(self, unused_mock_sleep): method test_execute_action_error (line 245) | def test_execute_action_error(self, unused_mock_sleep): method test_max_restarts_setup_steps (line 259) | def test_max_restarts_setup_steps(self, unused_mock_sleep): method test_execute_adb_call (line 269) | def test_execute_adb_call(self, unused_mock_sleep): FILE: android_env/components/device_settings.py class DeviceSettings (line 41) | class DeviceSettings: method __init__ (line 44) | def __init__(self, simulator: base_simulator.BaseSimulator): method update (line 54) | def update(self, config: config_classes.DeviceSettingsConfig) -> None: method screen_width (line 69) | def screen_width(self) -> int: method screen_height (line 74) | def screen_height(self) -> int: method get_orientation (line 79) | def get_orientation(self) -> np.ndarray: method _update_screen_size (line 90) | def _update_screen_size(self) -> None: method _set_show_touches (line 97) | def _set_show_touches(self, show: bool) -> None: method _set_show_pointer_location (line 111) | def _set_show_pointer_location(self, show: bool) -> None: method _set_status_navigation_bars (line 125) | def _set_status_navigation_bars( method _update_orientation (line 150) | def _update_orientation(self) -> None: FILE: android_env/components/device_settings_test.py class DeviceSettingsTest (line 26) | class DeviceSettingsTest(parameterized.TestCase): method test_screen_size_before_update (line 28) | def test_screen_size_before_update(self): method test_screen_size_after_update (line 43) | def test_screen_size_after_update(self): method test_update (line 159) | def test_update( method test_get_orientation_bad_response (line 178) | def test_get_orientation_bad_response(self): method test_get_orientation_bad_orientation (line 193) | def test_get_orientation_bad_orientation(self): method test_get_orientation_success (line 208) | def test_get_orientation_success(self): FILE: android_env/components/dumpsys_thread.py class DumpsysThread (line 26) | class DumpsysThread: method __init__ (line 29) | def __init__( method check_user_exited (line 60) | def check_user_exited(self, timeout: float | None = None) -> bool: method _check_impl (line 94) | def _check_impl(self) -> bool: FILE: android_env/components/dumpsys_thread_test.py class DumpsysThreadTest (line 25) | class DumpsysThreadTest(absltest.TestCase): method setUp (line 27) | def setUp(self): method test_unexpected_activity (line 32) | def test_unexpected_activity(self): method test_unexpected_view_hierarchy (line 43) | def test_unexpected_view_hierarchy(self): method test_success (line 51) | def test_success(self): method test_skipped (line 59) | def test_skipped(self): FILE: android_env/components/errors.py class AndroidEnvError (line 19) | class AndroidEnvError(Exception): class ReadObservationError (line 27) | class ReadObservationError(AndroidEnvError): class CoordinatorError (line 33) | class CoordinatorError(AndroidEnvError): class TooManyRestartsError (line 39) | class TooManyRestartsError(CoordinatorError): class AdbControllerError (line 45) | class AdbControllerError(AndroidEnvError): class SimulatorError (line 51) | class SimulatorError(AndroidEnvError): class SendActionError (line 57) | class SendActionError(AndroidEnvError): class StepCommandError (line 63) | class StepCommandError(AndroidEnvError): class WaitForAppScreenError (line 69) | class WaitForAppScreenError(StepCommandError): class CheckInstallError (line 75) | class CheckInstallError(StepCommandError): function from_code (line 81) | def from_code(code: int, msg: str = '') -> AndroidEnvError | None: FILE: android_env/components/errors_test.py class ErrorsTest (line 23) | class ErrorsTest(parameterized.TestCase): method test_error_codes (line 36) | def test_error_codes(self, error, expected_error_code): method test_error_codes_unique (line 41) | def test_error_codes_unique(self): method test_all_errors_are_androidenv_errors (line 69) | def test_all_errors_are_androidenv_errors(self, error): method test_from_code_unsupported_code (line 79) | def test_from_code_unsupported_code(self, code: int): method test_from_code (line 98) | def test_from_code(self, code: int, expected_class: errors.AndroidEnvE... FILE: android_env/components/log_stream.py class LogStream (line 24) | class LogStream(metaclass=abc.ABCMeta): method __init__ (line 27) | def __init__(self, verbose: bool = False): method get_stream_output (line 32) | def get_stream_output(self) -> Generator[str, None, None]: method _get_stream_output (line 41) | def _get_stream_output(self): method stop_stream (line 46) | def stop_stream(self) -> None: method pause_stream (line 52) | def pause_stream(self) -> None: method resume_stream (line 57) | def resume_stream(self) -> None: method set_log_filters (line 62) | def set_log_filters(self, log_filters: Sequence[str]): FILE: android_env/components/log_stream_test.py class FakeLogStream (line 22) | class FakeLogStream(log_stream.LogStream): method __init__ (line 24) | def __init__(self, filter_name: str): method _get_stream_output (line 28) | def _get_stream_output(self): method stop_stream (line 45) | def stop_stream(self): class LogStreamTest (line 50) | class LogStreamTest(absltest.TestCase): method test_get_stream_output (line 52) | def test_get_stream_output(self): method test_set_log_filters (line 68) | def test_set_log_filters(self): method test_pause_resume_stream (line 82) | def test_pause_resume_stream(self): FILE: android_env/components/logcat_thread.py class EventListener (line 28) | class EventListener: class LogcatThread (line 35) | class LogcatThread: method __init__ (line 38) | def __init__(self, log_stream: log_stream_lib.LogStream): method add_event_listener (line 57) | def add_event_listener(self, event_listener: EventListener) -> None: method remove_event_listener (line 64) | def remove_event_listener(self, event_listener: EventListener) -> None: method line_ready (line 72) | def line_ready(self) -> threading.Event: method pause (line 76) | def pause(self): method resume (line 79) | def resume(self): method kill (line 88) | def kill(self): method _process_logs (line 93) | def _process_logs(self) -> None: FILE: android_env/components/logcat_thread_test.py class FakeStream (line 27) | class FakeStream: method __init__ (line 30) | def __init__(self): method send_value (line 35) | def send_value(self, value): method has_next_value (line 39) | def has_next_value(self): method kill (line 42) | def kill(self): method reset (line 45) | def reset(self): method __iter__ (line 48) | def __iter__(self): function make_stdout (line 60) | def make_stdout(data): class FakeLogStream (line 65) | class FakeLogStream(log_stream.LogStream): method __init__ (line 68) | def __init__(self): method _get_stream_output (line 73) | def _get_stream_output(self): method stop_stream (line 76) | def stop_stream(self): method reset (line 80) | def reset(self): class LogcatThreadTest (line 85) | class LogcatThreadTest(absltest.TestCase): method setUp (line 87) | def setUp(self): method tearDown (line 91) | def tearDown(self): method test_set_filters (line 95) | def test_set_filters(self): method test_kill (line 102) | def test_kill(self): method test_listeners (line 108) | def test_listeners(self): method test_resume_does_not_recreate_alive_thread (line 145) | def test_resume_does_not_recreate_alive_thread(self): method test_resume_recreates_thread (line 154) | def test_resume_recreates_thread(self): FILE: android_env/components/pixel_fns.py function touch_position_to_pixel_position (line 24) | def touch_position_to_pixel_position( function transpose_pixels (line 34) | def transpose_pixels(frame: np.ndarray) -> np.ndarray: function orient_pixels (line 39) | def orient_pixels(frame: np.ndarray, orientation: int) -> np.ndarray: function convert_int_to_float (line 57) | def convert_int_to_float(data: np.ndarray, data_spec: specs.Array): FILE: android_env/components/pixel_fns_test.py class UtilsTest (line 25) | class UtilsTest(parameterized.TestCase): method test_touch_position_to_pixel_position (line 33) | def test_touch_position_to_pixel_position( method test_transpose_pixels (line 42) | def test_transpose_pixels(self): method test_orient_pixels (line 48) | def test_orient_pixels(self): method test_convert_int_to_float_bounded_array (line 74) | def test_convert_int_to_float_bounded_array(self): method test_convert_int_to_float_bounded_array_broadcast (line 87) | def test_convert_int_to_float_bounded_array_broadcast(self): method test_convert_int_to_float_no_bounds (line 95) | def test_convert_int_to_float_no_bounds(self): FILE: android_env/components/setup_step_interpreter.py class SetupStepInterpreter (line 31) | class SetupStepInterpreter: method __init__ (line 34) | def __init__(self, adb_call_parser: adb_call_parser_lib.AdbCallParser): method stats (line 49) | def stats(self) -> dict[str, Any]: method interpret (line 52) | def interpret(self, setup_steps: Sequence[task_pb2.SetupStep]) -> None: method _process_step_command (line 60) | def _process_step_command(self, step_cmd: task_pb2.SetupStep) -> None: method _execute_step_cmd (line 113) | def _execute_step_cmd( method _check_success (line 136) | def _check_success( method _check_install (line 161) | def _check_install(self, check_install: task_pb2.CheckInstall) -> None: FILE: android_env/components/setup_step_interpreter_test.py function _to_proto (line 30) | def _to_proto(proto_class, text): class SetupStepInterpreterTest (line 36) | class SetupStepInterpreterTest(absltest.TestCase): method setUp (line 38) | def setUp(self): method test_empty_setup_steps (line 43) | def test_empty_setup_steps(self): method test_none_setup_steps (line 52) | def test_none_setup_steps(self): method test_invalid_setup_step (line 62) | def test_invalid_setup_step(self): method test_adb_install_apk_filesystem (line 69) | def test_adb_install_apk_filesystem(self): method test_adb_force_stop (line 91) | def test_adb_force_stop(self): method test_adb_start_activity (line 106) | def test_adb_start_activity(self): method test_adb_single_tap (line 127) | def test_adb_single_tap(self): method test_adb_press_button (line 144) | def test_adb_press_button(self): method test_adb_start_screen_pinning (line 168) | def test_adb_start_screen_pinning(self): method test_time_sleep (line 188) | def test_time_sleep(self, mock_sleep): method test_wait_for_app_screen_empty_activity (line 197) | def test_wait_for_app_screen_empty_activity(self, unused_mock_sleep): method test_check_install_not_installed (line 207) | def test_check_install_not_installed(self, unused_mock_sleep): method test_check_install_installed (line 229) | def test_check_install_installed(self): method test_num_retries_failure (line 250) | def test_num_retries_failure(self): method test_num_retries_success (line 275) | def test_num_retries_success(self, unused_mock_sleep): method test_retry_step (line 311) | def test_retry_step(self): FILE: android_env/components/simulators/base_simulator.py class BaseSimulator (line 32) | class BaseSimulator(metaclass=abc.ABCMeta): method __init__ (line 35) | def __init__(self, config: config_classes.SimulatorConfig): method get_logs (line 52) | def get_logs(self) -> str: method adb_device_name (line 57) | def adb_device_name(self) -> str: method create_adb_controller (line 61) | def create_adb_controller(self) -> adb_controller.AdbController: method create_log_stream (line 65) | def create_log_stream(self) -> log_stream.LogStream: method launch (line 68) | def launch(self) -> None: method _launch_impl (line 95) | def _launch_impl(self) -> None: method send_touch (line 99) | def send_touch(self, touches: list[tuple[int, int, bool, int]]) -> None: method send_key (line 112) | def send_key(self, keycode: np.int32, event_type: str) -> None: method load_state (line 121) | def load_state( method save_state (line 136) | def save_state( method get_screenshot (line 151) | def get_screenshot(self) -> np.ndarray: method _get_screenshot_impl (line 161) | def _get_screenshot_impl(self) -> np.ndarray: method close (line 169) | def close(self): class InteractionThread (line 177) | class InteractionThread(threading.Thread): method __init__ (line 180) | def __init__( method run (line 191) | def run(self): method stop (line 203) | def stop(self): method screenshot (line 207) | def screenshot(self) -> np.ndarray: FILE: android_env/components/simulators/base_simulator_test.py class BaseSimulatorTest (line 30) | class BaseSimulatorTest(absltest.TestCase): method test_launch (line 32) | def test_launch(self): method test_launch_close (line 39) | def test_launch_close(self): method test_get_screenshot (line 48) | def test_get_screenshot(self): method test_print_logs_on_exception (line 58) | def test_print_logs_on_exception(self): method test_get_screenshot_error_async (line 71) | def test_get_screenshot_error_async(self): method test_get_screenshot_faster_than_screenshot_impl (line 98) | def test_get_screenshot_faster_than_screenshot_impl(self): method test_get_screenshot_slower_than_screenshot_impl (line 125) | def test_get_screenshot_slower_than_screenshot_impl(self): method test_interaction_thread_closes_upon_relaunch (line 153) | def test_interaction_thread_closes_upon_relaunch(self): FILE: android_env/components/simulators/emulator/emulator_launcher.py class EmulatorLauncher (line 27) | class EmulatorLauncher: method __init__ (line 30) | def __init__( method logfile_path (line 54) | def logfile_path(self) -> str: method launch_emulator_process (line 57) | def launch_emulator_process(self) -> None: method confirm_shutdown (line 145) | def confirm_shutdown(self) -> None: method close (line 161) | def close(self): method __del__ (line 168) | def __del__(self): FILE: android_env/components/simulators/emulator/emulator_launcher_test.py class EmulatorLauncherTest (line 30) | class EmulatorLauncherTest(parameterized.TestCase): method setUp (line 32) | def setUp(self): method test_launch (line 84) | def test_launch( method test_grpc_port (line 134) | def test_grpc_port( method test_snapshot (line 185) | def test_snapshot( method test_network_restrict (line 241) | def test_network_restrict( FILE: android_env/components/simulators/emulator/emulator_simulator.py function _is_existing_emulator_provided (line 45) | def _is_existing_emulator_provided( function _pick_adb_port (line 57) | def _pick_adb_port() -> int: function _pick_emulator_grpc_port (line 73) | def _pick_emulator_grpc_port() -> int: class EmulatorBootError (line 89) | class EmulatorBootError(errors.SimulatorError): class EmulatorCrashError (line 93) | class EmulatorCrashError(errors.SimulatorError): class EmulatorSimulator (line 97) | class EmulatorSimulator(base_simulator.BaseSimulator): method __init__ (line 100) | def __init__(self, config: config_classes.EmulatorConfig): method _reconnect_on_grpc_error (line 166) | def _reconnect_on_grpc_error(func): method get_logs (line 181) | def get_logs(self) -> str: method adb_device_name (line 189) | def adb_device_name(self) -> str: method create_adb_controller (line 192) | def create_adb_controller(self): method create_log_stream (line 196) | def create_log_stream(self) -> log_stream.LogStream: method _launch_impl (line 202) | def _launch_impl(self) -> None: method load_state (line 251) | def load_state( method save_state (line 299) | def save_state( method _connect_to_emulator (line 331) | def _connect_to_emulator( method _confirm_booted (line 363) | def _confirm_booted(self, startup_wait_time_sec: int = 300): method send_touch (line 394) | def send_touch(self, touches: list[tuple[int, int, bool, int]]) -> None: method send_key (line 418) | def send_key(self, keycode: np.int32, event_type: str) -> None: method _get_screenshot_impl (line 446) | def _get_screenshot_impl(self) -> np.ndarray: method _shutdown_emulator (line 460) | def _shutdown_emulator(self): method close (line 475) | def close(self): FILE: android_env/components/simulators/emulator/emulator_simulator_test.py class EmulatorSimulatorTest (line 39) | class EmulatorSimulatorTest(absltest.TestCase): method setUp (line 41) | def setUp(self): method test_adb_device_name_not_empty (line 77) | def test_adb_device_name_not_empty(self): method test_logfile_path (line 90) | def test_logfile_path(self): method test_grpc_port (line 115) | def test_grpc_port(self, unused_mock_portpicker): method test_grpc_port_unavailable (line 131) | def test_grpc_port_unavailable(self, unused_mock_portpicker): method test_launch_operation_order (line 146) | def test_launch_operation_order(self): method test_close (line 175) | def test_close(self): method test_value_error_if_launch_attempt_params_incorrect (line 195) | def test_value_error_if_launch_attempt_params_incorrect(self): method test_launch_attempt_reboot (line 212) | def test_launch_attempt_reboot(self): method test_launch_attempt_reinstall_after_zero_attempts (line 238) | def test_launch_attempt_reinstall_after_zero_attempts(self): method test_launch_attempt_reinstall (line 265) | def test_launch_attempt_reinstall(self): method test_get_screenshot (line 297) | def test_get_screenshot(self): method test_load_state (line 323) | def test_load_state(self): method test_save_state (line 377) | def test_save_state(self): method test_send_touch (line 419) | def test_send_touch(self): method test_send_key (line 476) | def test_send_key(self): FILE: android_env/components/simulators/fake/fake_simulator.py class FakeStream (line 30) | class FakeStream: method __init__ (line 33) | def __init__(self): method _make_stdout (line 44) | def _make_stdout(self, data): method kill (line 48) | def kill(self): method __iter__ (line 51) | def __iter__(self): class FakeLogStream (line 63) | class FakeLogStream(log_stream.LogStream): method __init__ (line 66) | def __init__(self): method _get_stream_output (line 70) | def _get_stream_output(self): method stop_stream (line 73) | def stop_stream(self): class FakeAdbController (line 77) | class FakeAdbController(adb_controller.AdbController): method execute_command (line 80) | def execute_command( class FakeSimulator (line 106) | class FakeSimulator(base_simulator.BaseSimulator): method __init__ (line 109) | def __init__(self, config: config_classes.FakeSimulatorConfig): method get_logs (line 115) | def get_logs(self) -> str: method adb_device_name (line 118) | def adb_device_name(self) -> str: method create_adb_controller (line 121) | def create_adb_controller(self): method create_log_stream (line 124) | def create_log_stream(self) -> log_stream.LogStream: method _launch_impl (line 127) | def _launch_impl(self) -> None: method send_touch (line 130) | def send_touch(self, touches: list[tuple[int, int, bool, int]]) -> None: method send_key (line 133) | def send_key(self, keycode: np.int32, event_type: str) -> None: method _get_screenshot_impl (line 136) | def _get_screenshot_impl(self) -> np.ndarray: FILE: android_env/components/simulators/fake/fake_simulator_test.py class FakeSimulatorTest (line 25) | class FakeSimulatorTest(absltest.TestCase): method test_device_name (line 27) | def test_device_name(self): method test_launch_close (line 33) | def test_launch_close(self): method test_get_screenshot (line 42) | def test_get_screenshot(self): method test_log_stream (line 52) | def test_log_stream(self): method test_adb_output (line 72) | def test_adb_output(self): method test_send_touch (line 92) | def test_send_touch(self): method test_send_key (line 102) | def test_send_key(self): FILE: android_env/components/specs.py function base_action_spec (line 45) | def base_action_spec( function base_observation_spec (line 102) | def base_observation_spec(height: int, width: int) -> dict[str, specs.Ar... FILE: android_env/components/specs_test.py class SpecsTest (line 26) | class SpecsTest(parameterized.TestCase): method test_base_action_spec (line 28) | def test_base_action_spec(self): method test_base_action_spec_with_key_events (line 37) | def test_base_action_spec_with_key_events(self): method test_base_action_spec_multitouch (line 48) | def test_base_action_spec_multitouch(self): method test_base_observation_spec (line 71) | def test_base_observation_spec(self, height, width): FILE: android_env/components/task_manager.py class TaskManager (line 42) | class TaskManager: method __init__ (line 45) | def __init__( method stats (line 89) | def stats(self) -> dict[str, Any]: method setup_task (line 99) | def setup_task(self) -> None: method stop (line 103) | def stop(self) -> None: method start (line 116) | def start( method reset_task (line 128) | def reset_task(self) -> None: method rl_reset (line 149) | def rl_reset(self, observation: dict[str, Any]) -> dm_env.TimeStep: method rl_step (line 167) | def rl_step(self, observation: dict[str, Any]) -> dm_env.TimeStep: method _get_current_reward (line 182) | def _get_current_reward(self) -> float: method _get_current_extras (line 188) | def _get_current_extras(self) -> dict[str, Any]: method _determine_transition_fn (line 196) | def _determine_transition_fn(self) -> Callable[..., dm_env.TimeStep]: method _start_setup_step_interpreter (line 236) | def _start_setup_step_interpreter( method _start_logcat_thread (line 243) | def _start_logcat_thread(self, log_stream: log_stream_lib.LogStream): method _start_dumpsys_thread (line 250) | def _start_dumpsys_thread( method _stop_logcat_thread (line 262) | def _stop_logcat_thread(self): method _increment_bad_state (line 267) | def _increment_bad_state(self) -> None: method _logcat_listeners (line 287) | def _logcat_listeners(self) -> Iterable[logcat_thread.EventListener]: method _reward_listeners (line 301) | def _reward_listeners( method _reward_event_listeners (line 317) | def _reward_event_listeners( method _score_listeners (line 338) | def _score_listeners( method _episode_end_listeners (line 355) | def _episode_end_listeners( method _process_extra (line 370) | def _process_extra(self, extra_name: str, extra: Sequence[int | float]): method _extras_listeners (line 386) | def _extras_listeners( method _json_extras_listeners (line 418) | def _json_extras_listeners( FILE: android_env/components/task_manager_test.py class TaskManagerTest (line 32) | class TaskManagerTest(absltest.TestCase): method setUp (line 34) | def setUp(self): method test_start (line 58) | def test_start(self): method test_setup_task (line 66) | def test_setup_task(self): method test_step_count (line 73) | def test_step_count(self): method test_get_current_reward (line 87) | def test_get_current_reward(self): method test_reward_event (line 114) | def test_reward_event(self): method test_get_current_reward_via_score (line 149) | def test_get_current_reward_via_score(self): method test_get_current_extras (line 180) | def test_get_current_extras(self): method test_get_current_extras_json_format (line 224) | def test_get_current_extras_json_format(self): method test_get_current_extras_failed_to_parse (line 287) | def test_get_current_extras_failed_to_parse(self): method test_multi_log_regexp (line 330) | def test_multi_log_regexp(self): method test_multi_reward_regexp (line 357) | def test_multi_reward_regexp(self): method test_determine_transition_fn (line 388) | def test_determine_transition_fn(self): FILE: android_env/env_interface.py class AndroidEnvInterface (line 32) | class AndroidEnvInterface(dm_env.Environment, metaclass=abc.ABCMeta): method action_spec (line 38) | def action_spec(self) -> dict[str, specs.Array]: method observation_spec (line 42) | def observation_spec(self) -> dict[str, specs.Array]: method reset (line 46) | def reset(self) -> dm_env.TimeStep: method step (line 50) | def step(self, action: dict[str, np.ndarray]) -> dm_env.TimeStep: method close (line 54) | def close(self) -> None: method task_extras (line 59) | def task_extras(self, latest_only: bool = True) -> dict[str, np.ndarray]: method raw_action (line 65) | def raw_action(self) -> Any: method raw_observation (line 69) | def raw_observation(self) -> Any: method stats (line 72) | def stats(self) -> dict[str, Any]: method execute_adb_call (line 77) | def execute_adb_call(self, call: adb_pb2.AdbRequest) -> adb_pb2.AdbRes... method load_state (line 82) | def load_state( method save_state (line 97) | def save_state( FILE: android_env/environment.py class AndroidEnv (line 32) | class AndroidEnv(env_interface.AndroidEnvInterface): method __init__ (line 35) | def __init__( method __del__ (line 55) | def __del__(self) -> None: method action_spec (line 60) | def action_spec(self) -> dict[str, dm_env.specs.Array]: method observation_spec (line 63) | def observation_spec(self) -> dict[str, dm_env.specs.Array]: method reset (line 66) | def reset(self) -> dm_env.TimeStep: method step (line 90) | def step(self, action: dict[str, np.ndarray]) -> dm_env.TimeStep: method close (line 116) | def close(self) -> None: method task_extras (line 127) | def task_extras(self, latest_only: bool = True) -> dict[str, np.ndarray]: method raw_action (line 137) | def raw_action(self): method raw_observation (line 141) | def raw_observation(self): method stats (line 144) | def stats(self) -> dict[str, Any]: method execute_adb_call (line 149) | def execute_adb_call(self, call: adb_pb2.AdbRequest) -> adb_pb2.AdbRes... method load_state (line 152) | def load_state( method save_state (line 176) | def save_state( FILE: android_env/environment_test.py function _create_mock_coordinator (line 33) | def _create_mock_coordinator() -> coordinator_lib.Coordinator: function _create_fake_simulator (line 50) | def _create_fake_simulator() -> fake_simulator.FakeSimulator: class AndroidEnvTest (line 56) | class AndroidEnvTest(absltest.TestCase): method test_specs (line 58) | def test_specs(self): method test_reset_and_step (line 93) | def test_reset_and_step(self): method test_adb_call (line 208) | def test_adb_call(self): method test_load_state (line 226) | def test_load_state(self): method test_save_state (line 244) | def test_save_state(self): method test_double_close (line 260) | def test_double_close(self): FILE: android_env/loader.py function _load_task (line 33) | def _load_task(task_config: config_classes.TaskConfig) -> task_pb2.Task: function load (line 47) | def load(config: config_classes.AndroidEnvConfig) -> environment.Android... function _process_emulator_launcher_config (line 71) | def _process_emulator_launcher_config( FILE: android_env/loader_test.py class LoaderTest (line 34) | class LoaderTest(absltest.TestCase): method test_load_emulator (line 41) | def test_load_emulator( method test_load_fake_simulator (line 103) | def test_load_fake_simulator( method test_task (line 142) | def test_task( FILE: android_env/wrappers/a11y/a11y_events.py function package_events_to_task_extras (line 31) | def package_events_to_task_extras( function extract_events_from_task_extras (line 40) | def extract_events_from_task_extras( function keep_latest_event_only (line 101) | def keep_latest_event_only(task_extras: dict[str, Any]): FILE: android_env/wrappers/a11y/a11y_events_test.py function _event_request (line 27) | def _event_request(d: dict[str, str]) -> a11y_pb2.EventRequest: function _event_request_as_any (line 34) | def _event_request_as_any(d: dict[str, str]) -> any_pb2.Any: class A11yEventsTest (line 41) | class A11yEventsTest(parameterized.TestCase): method test_no_events_in_task_extras (line 55) | def test_no_events_in_task_extras(self, task_extras): method test_task_extras (line 76) | def test_task_extras(self, task_extras, expected_events): method test_events_key_has_dict_event_requrests (line 87) | def test_events_key_has_dict_event_requrests(self): method test_events_key_has__event_requrests_packed_as_any (line 107) | def test_events_key_has__event_requrests_packed_as_any(self): method test_events_key_has_non_event_requrests (line 127) | def test_events_key_has_non_event_requrests(self): method test_keep_latest_only (line 160) | def test_keep_latest_only(self, task_extras, expected_extras): FILE: android_env/wrappers/a11y/a11y_forests.py function package_forests_to_task_extras (line 30) | def package_forests_to_task_extras( function task_extras_has_forests (line 39) | def task_extras_has_forests(task_extras: Mapping[str, Any]) -> bool: function convert_to_forest (line 64) | def convert_to_forest( function extract_forests_from_task_extras (line 87) | def extract_forests_from_task_extras( function keep_latest_forest_only (line 113) | def keep_latest_forest_only(task_extras: dict[str, Any]): FILE: android_env/wrappers/a11y/a11y_forests_test.py function _pack_any (line 27) | def _pack_any(proto_message) -> any_pb2.Any: function _empty_forest (line 33) | def _empty_forest() -> ( function _one_empty_window_forest (line 39) | def _one_empty_window_forest() -> ( function _two_window_forest (line 47) | def _two_window_forest() -> ( class A11YForestsTest (line 59) | class A11YForestsTest(parameterized.TestCase): method test_task_extras (line 156) | def test_task_extras(self, task_extras, expected_forests, convert_to_np): method test_keep_latest_only (line 215) | def test_keep_latest_only(self, task_extras, expected_extras): FILE: android_env/wrappers/a11y/a11y_servicer.py class A11yServicer (line 29) | class A11yServicer(a11y_pb2_grpc.A11yServiceServicer): method __init__ (line 32) | def __init__(self, latest_forest_only: bool = False): method SendForest (line 49) | def SendForest( method SendEvent (line 57) | def SendEvent( method Bidi (line 65) | async def Bidi( method get_forest (line 135) | async def get_forest( method gather_forests (line 145) | def gather_forests( method gather_events (line 154) | def gather_events(self) -> list[a11y_pb2.EventRequest]: method pause_and_clear (line 161) | def pause_and_clear(self) -> None: method resume (line 178) | def resume(self) -> None: method _process_event (line 182) | def _process_event(self, event: a11y_pb2.EventRequest) -> None: method _process_forest (line 189) | def _process_forest( FILE: android_env/wrappers/a11y/a11y_servicer_test.py function _aiter (line 34) | async def _aiter(xs: Iterable[_T]) -> AsyncIterator[_T]: function one_window_one_node_forest (line 41) | def one_window_one_node_forest() -> ( function one_window_two_nodes_forest (line 53) | def one_window_two_nodes_forest() -> ( function empty_dict (line 69) | def empty_dict() -> dict[str, str]: function single_item_dict_with_special_chars (line 73) | def single_item_dict_with_special_chars() -> dict[str, str]: class A11yServicerTest (line 77) | class A11yServicerTest(parameterized.TestCase, IsolatedAsyncioTestCase): method test_servicer_sendforest (line 79) | def test_servicer_sendforest(self): method test_servicer_bidi_forests (line 92) | async def test_servicer_bidi_forests(self): method test_servicer_sendforest_latest_only (line 123) | def test_servicer_sendforest_latest_only(self): method test_servicer_sendevent (line 135) | def test_servicer_sendevent(self): method test_servicer_bidi_events (line 153) | async def test_servicer_bidi_events(self): method test_servicer_pause_and_clear_pauses (line 187) | def test_servicer_pause_and_clear_pauses(self): method test_servicer_pause_and_clear_clears (line 203) | def test_servicer_pause_and_clear_clears(self): FILE: android_env/wrappers/a11y_grpc_wrapper.py function _get_accessibility_forwarder_apk (line 39) | def _get_accessibility_forwarder_apk() -> bytes: class EnableNetworkingError (line 47) | class EnableNetworkingError(ValueError): class A11yGrpcWrapper (line 51) | class A11yGrpcWrapper(base_wrapper.BaseWrapper): method __init__ (line 79) | def __init__( method _start_a11y_services (line 169) | def _start_a11y_services(self) -> None: method _install_a11y_forwarding_apk (line 195) | def _install_a11y_forwarding_apk(self) -> None: method _enable_a11y_tree_logs (line 210) | def _enable_a11y_tree_logs(self) -> None: method _reset_enable_networking_attempts (line 231) | def _reset_enable_networking_attempts(self) -> None: method get_port (line 236) | def get_port(self): method close (line 239) | def close(self): method attempt_enable_networking (line 244) | def attempt_enable_networking(self) -> None: method _configure_grpc (line 276) | def _configure_grpc(self) -> None: method _accumulate_and_return_a11y_info (line 346) | def _accumulate_and_return_a11y_info( method _fetch_task_extras_and_update_observation (line 385) | def _fetch_task_extras_and_update_observation( method reset (line 400) | def reset(self) -> dm_env.TimeStep: method step (line 416) | def step(self, action: Any) -> dm_env.TimeStep: method accumulate_new_extras (line 425) | def accumulate_new_extras(self) -> dict[str, Any]: method _fetch_task_extras (line 440) | def _fetch_task_extras(self) -> dict[str, Any]: method task_extras (line 499) | def task_extras(self, latest_only: bool = False) -> dict[str, Any]: FILE: android_env/wrappers/a11y_grpc_wrapper_test.py function empty_forest (line 34) | def empty_forest() -> ( function one_empty_window_forest (line 40) | def one_empty_window_forest() -> ( function one_window_one_node_forest (line 48) | def one_window_one_node_forest() -> ( function one_window_two_nodes_forest (line 60) | def one_window_two_nodes_forest() -> ( function three_windows_forest (line 76) | def three_windows_forest() -> ( function empty_dict (line 98) | def empty_dict() -> dict[str, str]: function single_item_dict (line 102) | def single_item_dict() -> dict[str, str]: function several_long_items_dict (line 106) | def several_long_items_dict() -> dict[str, str]: function single_item_dict_with_special_chars (line 113) | def single_item_dict_with_special_chars() -> dict[str, str]: function _ok_response (line 117) | def _ok_response(): class A11yGrpcWrapperTest (line 121) | class A11yGrpcWrapperTest(parameterized.TestCase): method test_server (line 123) | def test_server(self): method test_fetch_task_extras (line 169) | def test_fetch_task_extras( method test_fetch_task_extras_enable_networking (line 226) | def test_fetch_task_extras_enable_networking( method test_fetch_task_extras_enable_networking_twice (line 260) | def test_fetch_task_extras_enable_networking_twice( method test_task_extras_raises_a11y_info_exception (line 330) | def test_task_extras_raises_a11y_info_exception( method test_configure_grpc (line 380) | def test_configure_grpc( method test_task_extras_raises_before_reset (line 407) | def test_task_extras_raises_before_reset( method test_extras_accumulate_between_steps (line 426) | def test_extras_accumulate_between_steps( method test_a11y_info_disabled (line 521) | def test_a11y_info_disabled( method test_a11y_info_with_timer_info_present (line 554) | def test_a11y_info_with_timer_info_present( method test_a11y_info_with_timer_task_extra_returned (line 587) | def test_a11y_info_with_timer_task_extra_returned( method test_a11y_info_with_timer_from_action (line 622) | def test_a11y_info_with_timer_from_action( method test_task_extras_same_between_calls (line 657) | def test_task_extras_same_between_calls(self, mock_server, mock_add_se... method test_task_extras_clear_if_called_between_step (line 721) | def test_task_extras_clear_if_called_between_step( method test_apk_install_and_start (line 789) | def test_apk_install_and_start( method test_component_and_start (line 820) | def test_component_and_start(self, unused_mock_sleep): method test_broadcast_sent_default_grpc_server_ip (line 847) | def test_broadcast_sent_default_grpc_server_ip(self): method test_broadcast_sent_custom_grpc_server_ip (line 875) | def test_broadcast_sent_custom_grpc_server_ip(self, grpc_server_ip): method test_broadcast_sent_port (line 902) | def test_broadcast_sent_port(self): FILE: android_env/wrappers/base_wrapper.py class BaseWrapper (line 29) | class BaseWrapper(env_interface.AndroidEnvInterface): method __init__ (line 32) | def __init__(self, env: env_interface.AndroidEnvInterface) -> None: method reset (line 36) | def reset(self) -> dm_env.TimeStep: method step (line 41) | def step(self, action: Any) -> dm_env.TimeStep: method task_extras (line 45) | def task_extras(self, latest_only: bool = True) -> dict[str, np.ndarray]: method _reset_state (line 48) | def _reset_state(self): method _process_action (line 51) | def _process_action(self, action: Any) -> Any: method _process_timestep (line 54) | def _process_timestep(self, timestep: dm_env.TimeStep) -> dm_env.TimeS... method observation_spec (line 57) | def observation_spec(self) -> dict[str, specs.Array]: method action_spec (line 60) | def action_spec(self) -> dict[str, specs.Array]: method reward_spec (line 63) | def reward_spec(self) -> specs.Array: method discount_spec (line 66) | def discount_spec(self) -> specs.Array: method _wrapper_stats (line 69) | def _wrapper_stats(self) -> dict[str, Any]: method stats (line 73) | def stats(self) -> dict[str, Any]: method load_state (line 78) | def load_state( method save_state (line 84) | def save_state( method execute_adb_call (line 99) | def execute_adb_call( method raw_action (line 105) | def raw_action(self) -> Any: method raw_observation (line 109) | def raw_observation(self) -> Any: method raw_env (line 113) | def raw_env(self) -> env_interface.AndroidEnvInterface: method __getattr__ (line 120) | def __getattr__(self, attr) -> Any: method close (line 124) | def close(self) -> None: FILE: android_env/wrappers/base_wrapper_test.py class BaseWrapperTest (line 27) | class BaseWrapperTest(absltest.TestCase): method test_base_function_forwarding (line 30) | def test_base_function_forwarding(self, mock_info): method test_multiple_wrappers (line 95) | def test_multiple_wrappers(self): method test_raw_env (line 103) | def test_raw_env(self): method test_stats (line 109) | def test_stats(self): method test_wrapped_stats (line 117) | def test_wrapped_stats(self, mock_info): FILE: android_env/wrappers/discrete_action_wrapper.py class DiscreteActionWrapper (line 32) | class DiscreteActionWrapper(base_wrapper.BaseWrapper): method __init__ (line 35) | def __init__( method _assert_base_env (line 54) | def _assert_base_env(self) -> None: method num_actions (line 62) | def num_actions(self) -> int: method step (line 70) | def step(self, action: dict[str, int]) -> dm_env.TimeStep: method _process_action (line 75) | def _process_action(self, action: dict[str, int]) -> dict[str, np.ndar... method _get_action_type (line 87) | def _get_action_type(self, action_id: int) -> action_type.ActionType: method _get_touch_position (line 118) | def _get_touch_position(self, action_id: int) -> Sequence[float]: method action_spec (line 162) | def action_spec(self) -> dict[str, specs.Array]: FILE: android_env/wrappers/discrete_action_wrapper_test.py function _make_array_spec (line 30) | def _make_array_spec(shape, dtype, name): function _valid_shape (line 41) | def _valid_shape(action): function _valid_types (line 51) | def _valid_types(action, types): class DiscreteActionWrapperTest (line 56) | class DiscreteActionWrapperTest(absltest.TestCase): method setUp (line 58) | def setUp(self): method test_num_actions (line 70) | def test_num_actions(self): method test_num_actions_non_redundant (line 76) | def test_num_actions_non_redundant(self): method test_reset (line 84) | def test_reset(self): method test_step_no_noise (line 93) | def test_step_no_noise(self): method test_step_redundant_actions_invalid_action_id (line 158) | def test_step_redundant_actions_invalid_action_id(self): method test_step_no_noise_no_redudant_actions (line 167) | def test_step_no_noise_no_redudant_actions(self): method test_step_no_redundant_actions_invalid_action_id (line 227) | def test_step_no_redundant_actions_invalid_action_id(self): method test_step_with_noise (line 236) | def test_step_with_noise(self): method test_parent_spec_type (line 291) | def test_parent_spec_type(self): method test_observation_spec (line 315) | def test_observation_spec(self): method test_action_spec (line 324) | def test_action_spec(self): method test_action_spec_non_redundant (line 334) | def test_action_spec_non_redundant(self): method test_assert_base_env_action_spec_too_short (line 345) | def test_assert_base_env_action_spec_too_short(self): method test_assert_base_env_action_spec_too_long (line 353) | def test_assert_base_env_action_spec_too_long(self): method test_assert_base_env_action_spec_wrong_shapes (line 365) | def test_assert_base_env_action_spec_wrong_shapes(self): method test_assert_base_env_ok (line 375) | def test_assert_base_env_ok(self): FILE: android_env/wrappers/flat_interface_wrapper.py function _extract_screen_pixels (line 29) | def _extract_screen_pixels(obs: np.ndarray) -> np.ndarray: function _get_no_action_observation_spec (line 37) | def _get_no_action_observation_spec( class FlatInterfaceWrapper (line 53) | class FlatInterfaceWrapper(base_wrapper.BaseWrapper): method __init__ (line 62) | def __init__( method _assert_base_env (line 76) | def _assert_base_env(self) -> None: method _process_action (line 82) | def _process_action( method _process_timestep (line 90) | def _process_timestep(self, timestep: dm_env.TimeStep) -> dm_env.TimeS... method reset (line 107) | def reset(self) -> dm_env.TimeStep: method step (line 111) | def step(self, action: int) -> dm_env.TimeStep: method observation_spec (line 115) | def observation_spec(self) -> specs.Array | dict[str, specs.Array]: #... method action_spec (line 126) | def action_spec(self) -> specs.BoundedArray | dict[str, specs.Array]: ... FILE: android_env/wrappers/flat_interface_wrapper_test.py function _make_array_spec (line 28) | def _make_array_spec(shape, dtype=np.float32, name=None, maximum=3, mini... function _make_timestep (line 37) | def _make_timestep(observation): class FlatInterfaceWrapperTest (line 46) | class FlatInterfaceWrapperTest(absltest.TestCase): method setUp (line 48) | def setUp(self): method test_reset (line 86) | def test_reset(self): method test_reset_no_action_layer (line 92) | def test_reset_no_action_layer(self): method test_step (line 101) | def test_step(self): method test_step_no_action_layer (line 114) | def test_step_no_action_layer(self): method test_observation_spec (line 131) | def test_observation_spec(self): method test_observation_spec_no_action_layer (line 137) | def test_observation_spec_no_action_layer(self): method test_action_spec (line 145) | def test_action_spec(self): method test_bad_action_spec_structured_action (line 155) | def test_bad_action_spec_structured_action(self): FILE: android_env/wrappers/float_pixels_wrapper.py class FloatPixelsWrapper (line 26) | class FloatPixelsWrapper(base_wrapper.BaseWrapper): method __init__ (line 29) | def __init__(self, env: env_interface.AndroidEnvInterface) -> None: method _process_observation (line 35) | def _process_observation( method _process_timestep (line 45) | def _process_timestep(self, timestep: dm_env.TimeStep) -> dm_env.TimeS... method reset (line 53) | def reset(self) -> dm_env.TimeStep: method step (line 56) | def step(self, action: dict[str, np.ndarray]) -> dm_env.TimeStep: method observation_spec (line 59) | def observation_spec(self) -> dict[str, specs.Array]: FILE: android_env/wrappers/float_pixels_wrapper_test.py function _make_array_spec (line 27) | def _make_array_spec(shape, dtype=np.float32, name=None): function _make_bounded_array_spec (line 35) | def _make_bounded_array_spec( function _simple_timestep (line 46) | def _simple_timestep(obs_shape, obs_type): class FloatPixelsWrapperTest (line 55) | class FloatPixelsWrapperTest(absltest.TestCase): method setUp (line 57) | def setUp(self): method test_float_pixels_wrapper_spec (line 81) | def test_float_pixels_wrapper_spec(self): method test_float_pixels_wrapper_step (line 97) | def test_float_pixels_wrapper_step(self): method test_float_pixels_wrapper_reset (line 111) | def test_float_pixels_wrapper_reset(self): method test_float_pixels_wrapper_already_float (line 125) | def test_float_pixels_wrapper_already_float(self): FILE: android_env/wrappers/gym_wrapper.py class GymInterfaceWrapper (line 28) | class GymInterfaceWrapper(gym.Env): method __init__ (line 31) | def __init__(self, env: dm_env.Environment): method _spec_to_space (line 39) | def _spec_to_space(self, spec: specs.Array) -> spaces.Space: method render (line 75) | def render(self, mode='rgb_array'): method reset (line 85) | def reset(self) -> np.ndarray: method step (line 90) | def step(self, action: dict[str, int]) -> tuple[Any, ...]: FILE: android_env/wrappers/gym_wrapper_test.py class GymInterfaceWrapperTest (line 29) | class GymInterfaceWrapperTest(absltest.TestCase): method setUp (line 31) | def setUp(self): method test_render (line 68) | def test_render(self): method test_render_error (line 74) | def test_render_error(self): method test_reset (line 78) | def test_reset(self): method test_step (line 88) | def test_step(self): method test_spec_to_space (line 94) | def test_spec_to_space(self): FILE: android_env/wrappers/image_rescale_wrapper.py class ImageRescaleWrapper (line 36) | class ImageRescaleWrapper(base_wrapper.BaseWrapper): method __init__ (line 39) | def __init__( method _process_timestep (line 58) | def _process_timestep(self, timestep: dm_env.TimeStep) -> dm_env.TimeS... method _process_pixels (line 66) | def _process_pixels(self, raw_observation: np.ndarray) -> np.ndarray: method _resize_image_array (line 79) | def _resize_image_array( method reset (line 94) | def reset(self) -> dm_env.TimeStep: method step (line 98) | def step(self, action) -> dm_env.TimeStep: method observation_spec (line 102) | def observation_spec(self) -> dict[str, specs.Array]: FILE: android_env/wrappers/image_rescale_wrapper_test.py function _simple_spec (line 29) | def _simple_spec(): function _simple_timestep (line 38) | def _simple_timestep(): class ImageRescaleWrapperTest (line 47) | class ImageRescaleWrapperTest(absltest.TestCase): method test_100x50_grayscale (line 49) | def test_100x50_grayscale(self): method test_150x60_full_channels (line 67) | def test_150x60_full_channels(self): method test_list_zoom_factor (line 85) | def test_list_zoom_factor(self): FILE: android_env/wrappers/last_action_wrapper.py class LastActionWrapper (line 28) | class LastActionWrapper(base_wrapper.BaseWrapper): method __init__ (line 39) | def __init__(self, method _process_timestep (line 53) | def _process_timestep(self, timestep: dm_env.TimeStep) -> dm_env.TimeS... method _process_observation (line 58) | def _process_observation( method _get_last_action_layer (line 72) | def _get_last_action_layer(self, pixels: np.ndarray) -> np.ndarray: method reset (line 88) | def reset(self) -> dm_env.TimeStep: method step (line 92) | def step(self, action) -> dm_env.TimeStep: method observation_spec (line 96) | def observation_spec(self) -> dict[str, specs.Array]: FILE: android_env/wrappers/last_action_wrapper_test.py function _simple_spec (line 30) | def _simple_spec(): function _simple_timestep (line 39) | def _simple_timestep(): class LastActionWrapperTest (line 48) | class LastActionWrapperTest(absltest.TestCase): method test_concat_to_pixels (line 50) | def test_concat_to_pixels(self): method test_no_concat_to_pixels (line 105) | def test_no_concat_to_pixels(self): FILE: android_env/wrappers/rate_limit_wrapper.py class RateLimitWrapper (line 28) | class RateLimitWrapper(base_wrapper.BaseWrapper): class SleepType (line 31) | class SleepType(enum.IntEnum): method __init__ (line 49) | def __init__(self, method _assert_base_env (line 68) | def _assert_base_env(self): method reset (line 75) | def reset(self): method step (line 80) | def step(self, action: dict[str, np.ndarray]) -> dm_env.TimeStep: method _wait (line 112) | def _wait(self) -> None: FILE: android_env/wrappers/rate_limit_wrapper_test.py function _get_base_env (line 32) | def _get_base_env(): class _FnWithTimestamps (line 50) | class _FnWithTimestamps(Protocol): function _with_timestamp (line 57) | def _with_timestamp(fn: Any) -> _FnWithTimestamps: class RateLimitWrapperTest (line 61) | class RateLimitWrapperTest(parameterized.TestCase): method test_disabled (line 68) | def test_disabled(self, rate, mock_sleep): method test_enabled (line 83) | def test_enabled(self, mock_sleep): method test_enabled_sleep_type_before (line 110) | def test_enabled_sleep_type_before(self, mock_sleep): method test_enabled_sleep_type_after (line 150) | def test_enabled_sleep_type_after(self, mock_sleep): method test_enabled_sleep_type_after_with_repeat (line 189) | def test_enabled_sleep_type_after_with_repeat(self, mock_sleep): method test_enabled_sleep_type_after_with_repeat_last (line 244) | def test_enabled_sleep_type_after_with_repeat_last(self, mock_sleep): FILE: android_env/wrappers/tap_action_wrapper.py class TapActionWrapper (line 28) | class TapActionWrapper(base_wrapper.BaseWrapper): method __init__ (line 31) | def __init__(self, method stats (line 41) | def stats(self) -> dict[str, Any]: method _process_action (line 47) | def _process_action( method step (line 76) | def step(self, action: dict[str, np.ndarray]) -> dm_env.TimeStep: method action_spec (line 97) | def action_spec(self) -> dict[str, dm_env.specs.Array]: FILE: android_env/wrappers/tap_action_wrapper_test.py function _make_array_spec (line 29) | def _make_array_spec(shape, dtype, name): class TapActionWrapperTest (line 39) | class TapActionWrapperTest(absltest.TestCase): method setUp (line 41) | def setUp(self): method test_process_action_repeat (line 52) | def test_process_action_repeat(self): method test_process_action_lift (line 63) | def test_process_action_lift(self): method test_process_action_touch (line 74) | def test_process_action_touch(self): method test_reset (line 87) | def test_reset(self): method test_step (line 96) | def test_step(self): method test_observation_spec (line 122) | def test_observation_spec(self): method test_action_spec (line 131) | def test_action_spec(self): method test_stats (line 140) | def test_stats(self): FILE: examples/run_acme_agent.py function apply_wrappers (line 50) | def apply_wrappers(env): function main (line 60) | def main(_): FILE: examples/run_human_agent.py function _get_action_from_event (line 52) | def _get_action_from_event( function _get_action_from_mouse (line 69) | def _get_action_from_mouse( function _scale_position (line 86) | def _scale_position(position: np.ndarray, screen: pygame.Surface, function _accumulate_reward (line 97) | def _accumulate_reward( function _render_pygame_frame (line 114) | def _render_pygame_frame(surface: pygame.Surface, screen: pygame.Surface, function main (line 128) | def main(_): FILE: examples/run_random_agent.py function main (line 46) | def main(_): FILE: setup.py class _GenerateProtoFiles (line 48) | class _GenerateProtoFiles(setuptools.Command): method initialize_options (line 54) | def initialize_options(self): method finalize_options (line 57) | def finalize_options(self): method run (line 60) | def run(self): class _BuildExt (line 84) | class _BuildExt(build_ext): method run (line 87) | def run(self): class _BuildPy (line 92) | class _BuildPy(build_py): method run (line 95) | def run(self):