mozilla-magnet / magnet-scanner-android

An Android library that scans for URLs around you
3 stars 6 forks source link

Only check mdns when on wifi #28

Closed samgiles closed 7 years ago

samgiles commented 7 years ago

On my phone, mdnsd reportedly uses a relatively large amount of battery compared to other processes (about 20% of a total charge while using Magnet). Restrict mdns discovery to only run when on a WiFi connection.

r? @wilsonpage

wilsonpage commented 7 years ago

Nice catch r+

wilsonpage commented 7 years ago

There is a case whereby WIFI could become connected after scanner has started and mdns would be disabled, but it's an edge case for sure.