Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions selfdrive/loggerd/uploader.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,13 @@ def clear_locks(root):
def is_on_wifi():
# ConnectivityManager.getActiveNetworkInfo()
try:
result = android.parse_service_call_string(["connectivity", "2"])
# TODO: figure out why the android service call sometimes dies with SIGUSR2 (signal from MSGQ)
result = android.parse_service_call_string(android.service_call(["connectivity", "2"]))
if result is None:
return True
return 'WIFI' in result
except AttributeError:
except (AttributeError, subprocess.CalledProcessError):
cloudlog.exception("is_on_wifi failed")
return False

def is_on_hotspot():
Expand Down