Draft: gnss/modemmanager: Watch Modem.Location properties and reset
Listen to PropertiesChanged signal from MM Location interface and re-enable the gps-nmea location source and reset GpsRefresh rate if they are not what we need. Remove the signal matcher in finalize_modem().
Make enable_gps() to only 'upgrade' the properties we need, that is, enable the gps-nmea source if it's not enabled, leave the SignalsLocation property as it is, and only set GpsRefreshRate if it's below the minimum we require (1). This is to avoid multiple MM clients getting into a mutual reset loop.
Refactor poll_loop so that it polls about every refreshInterval (1 s) even when receiving signals.
This MR should fix the problem where other MM Location API clients turn off location sources (or other properties), leaving gnss-share without updates. All clients need to be careful about not downgrading location properties in their notifier callbacks, since this leads to an infinite reset loop.
Set to draft because this could use some testing. For testing with other MM clients concurrently, see Geoclue with this MR: https://gitlab.freedesktop.org/geoclue/geoclue/-/merge_requests/176 (both the 3g
and modem-gps
sources use MM), Satellite git with the -s mm
option or just plain mmcli
.