From a3e5395931f51aa522b97d8aebe399bac965e2d2 Mon Sep 17 00:00:00 2001 From: DeepMind Date: Tue, 22 Oct 2024 10:25:57 -0700 Subject: [PATCH] Add real device simulator to AndroidEnv loader. PiperOrigin-RevId: 688601471 --- android_env/loader.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/android_env/loader.py b/android_env/loader.py index 0588ff3..9b2ad53 100644 --- a/android_env/loader.py +++ b/android_env/loader.py @@ -25,6 +25,7 @@ from android_env.components import task_manager as task_manager_lib from android_env.components.simulators.emulator import emulator_simulator from android_env.components.simulators.fake import fake_simulator +from android_env.components.simulators.real_device import real_device_simulator from android_env.proto import task_pb2 from google.protobuf import text_format @@ -56,6 +57,10 @@ def load(config: config_classes.AndroidEnvConfig) -> environment.AndroidEnv: simulator = emulator_simulator.EmulatorSimulator(config=config.simulator) case config_classes.FakeSimulatorConfig(): simulator = fake_simulator.FakeSimulator(config=config.simulator) + case config_classes.RealDeviceConfig(): + simulator = real_device_simulator.RealDeviceSimulator( + config=config.simulator + ) case _: raise ValueError('Unsupported simulator config: {config.simulator}')