MCPcopy
hub / github.com/zai-org/Open-AutoGLM / get_connection_class

Method get_connection_class

phone_agent/device_factory.py:128–139  ·  view source on GitHub ↗

Get the connection class (ADBConnection or HDCConnection).

(self)

Source from the content-addressed store, hash-verified

126 return self.module.list_devices()
127
128 def get_connection_class(self):
129 """Get the connection class (ADBConnection or HDCConnection)."""
130 if self.device_type == DeviceType.ADB:
131 from phone_agent.adb import ADBConnection
132
133 return ADBConnection
134 elif self.device_type == DeviceType.HDC:
135 from phone_agent.hdc import HDCConnection
136
137 return HDCConnection
138 else:
139 raise ValueError(f"Unknown device type: {self.device_type}")
140
141
142# Global device factory instance

Callers 1

handle_device_commandsFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected