INNER CODE UNIT · Python

DevicePreference

CursorTouch/Android-MCP · src/android_mcp/__main__.py:48

class DevicePreference:
    connection: str = "auto"
    serial: Optional[str] = None
    source: str = "auto-detect"


def _clean_env(name: str) -> Optional[str]:
    value = os.getenv(name)
    if value is None:
        return None
    value = value.strip()
    return value or None


def _normalize_connection(value: Optional[str]) -> str:
    if not value:
        return "auto"
    normalized = value.strip().lower()

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…