We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8256969 commit f5beedfCopy full SHA for f5beedf
system/qcomgpsd/qcomgpsd.py
@@ -94,11 +94,7 @@ def at_cmd(cmd: str) -> Optional[str]:
94
return subprocess.check_output(f"mmcli -m any --timeout 30 --command='{cmd}'", shell=True, encoding='utf8')
95
96
def gps_enabled() -> bool:
97
- try:
98
- p = subprocess.check_output("mmcli -m any --command=\"AT+QGPS?\"", shell=True)
99
- return b"QGPS: 1" in p
100
- except subprocess.CalledProcessError as exc:
101
- raise Exception("failed to execute QGPS mmcli command") from exc
+ return "QGPS: 1" in at_cmd("AT+QGPS?")
102
103
def download_assistance():
104
try:
0 commit comments