Support getting location from ModemManager when it is SIM locked /when the SIM is missing
At mobile-broadband/ModemManager#183 (closed), we allowed ModemManager to enable its location interface even when it is SIM locked or when there's no SIM card.
Geoclue currently checks that ModemManager is in this state to go on:
- https://gitlab.freedesktop.org/geoclue/geoclue/-/blob/a9caa550df128bb04f28b3f3c94d909b0d140e15/src/gclue-modem-manager.c#L730
- https://gitlab.freedesktop.org/geoclue/geoclue/-/blob/a9caa550df128bb04f28b3f3c94d909b0d140e15/src/gclue-modem-manager.c#L774
This is right for the current version of ModemManager: if ModemManager is not ENABLED, its location interface can't be used. In the next version, this won't be correct anymore. It will be possible to use the location interface even if ModemManager is not in ENABLED state. I would guess it is sufficient to check whether the location interface is available and ready, which, if I understand correctly, is already done.
These checks would need to be removed. I don't think it would have strong drawbacks for the current version of ModemManager neither. I'd be happy to send an MR but I'm not quite familiar with Geoclue's code base and I don't know if there are other things to be careful about. On my side, removing the checks works as intended.