qcomgpsd: use AT helper with retry for all AT commands (#31532)

old-commit-hash: 34138d0be9b9b0041dc5e15b81c4f4b9e653a9f3
This commit is contained in:
Adeeb Shihadeh
2024-02-21 13:57:29 -08:00
committed by GitHub
parent 8256969d40
commit f5beedfaec
+1 -5
View File
@@ -94,11 +94,7 @@ def at_cmd(cmd: str) -> Optional[str]:
return subprocess.check_output(f"mmcli -m any --timeout 30 --command='{cmd}'", shell=True, encoding='utf8')
def gps_enabled() -> bool:
try:
p = subprocess.check_output("mmcli -m any --command=\"AT+QGPS?\"", shell=True)
return b"QGPS: 1" in p
except subprocess.CalledProcessError as exc:
raise Exception("failed to execute QGPS mmcli command") from exc
return "QGPS: 1" in at_cmd("AT+QGPS?")
def download_assistance():
try: