feat: 内置并统一使用项目 ADB (#149)
This commit is contained in:
@@ -12,6 +12,7 @@ from contextlib import AbstractContextManager, contextmanager
|
||||
from contextvars import ContextVar
|
||||
from typing import Any, Callable, Iterator, Optional
|
||||
|
||||
from .adb_runtime import BundledAdbError, configure_bundled_adb_environment
|
||||
from .performance_timing import current_performance_trace
|
||||
|
||||
|
||||
@@ -80,6 +81,10 @@ class PddDeviceService:
|
||||
|
||||
@staticmethod
|
||||
def _default_connector(serial: str) -> Any:
|
||||
try:
|
||||
configure_bundled_adb_environment()
|
||||
except BundledAdbError as exc:
|
||||
raise PddDeviceError("DEVICE_ADB_MISSING", str(exc)) from exc
|
||||
try:
|
||||
import uiautomator2 as u2
|
||||
except ImportError as exc:
|
||||
|
||||
Reference in New Issue
Block a user