generated from Grigo/AndroidTemplate
11 lines
312 B
Python
11 lines
312 B
Python
"""Device ID rules — must match the Android app (SettingsRepository)."""
|
|
|
|
import re
|
|
|
|
# android- + 8 hex chars from UUID
|
|
ANDROID_DEVICE_ID = re.compile(r"^android-[0-9a-f]{8}$", re.IGNORECASE)
|
|
|
|
|
|
def is_valid_device_id(device_id: str) -> bool:
|
|
return bool(ANDROID_DEVICE_ID.match((device_id or "").strip()))
|