Get the connection class (ADBConnection or HDCConnection).
(self)
| 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 |
no outgoing calls
no test coverage detected