There's indeed one issue in the way qtsystems-opensource-src looks for oFono, as described bellow:
src/systeminfo/linux/qofonowrapper.cpp
...
bool QOfonoWrapper::isOfonoAvailable()
{
// -1: Don't know if OFONO is available or not.
// 0: OFONO is not available.
// 1: OFONO is available.
if (-1 == available) {
if (QDBusConnection::systemBus().isConnected()) { QDBusReply<bool> reply = QDBusConnection::systemBus().interface()->isServiceRegistered(*OFONO_SERVICE());
if (reply.isValid()) available = reply.value();
else available = 0;
}
}
return available;
}
It assumes that the service is available if the interface is there, without knowing if it can really access the interface. This function would be the main one to change as it already checks internally for it everywhere before trying to grab data from oFono.
As a quick test, I just changed it to return 0 by default, but was unable to get your test application to work (even the unconfined one). After checking in more details, it fails even after stopping the ofono service (using the default qtsystems-opensource-src package), so I believe we're probably facing a different issue in here (and it seems getAllModems would still return empty even with the denials, which would probably be ok).
There's indeed one issue in the way qtsystems- opensource- src looks for oFono, as described bellow: linux/qofonowra pper.cpp :isOfonoAvailab le() n::systemBus( ).isConnected( )) {
QDBusReply <bool> reply = QDBusConnection ::systemBus( ).interface( )->isServiceReg istered( *OFONO_ SERVICE( ));
available = reply.value();
available = 0;
src/systeminfo/
...
bool QOfonoWrapper:
{
// -1: Don't know if OFONO is available or not.
// 0: OFONO is not available.
// 1: OFONO is available.
if (-1 == available) {
if (QDBusConnectio
if (reply.isValid())
else
}
}
return available;
}
It assumes that the service is available if the interface is there, without knowing if it can really access the interface. This function would be the main one to change as it already checks internally for it everywhere before trying to grab data from oFono.
As a quick test, I just changed it to return 0 by default, but was unable to get your test application to work (even the unconfined one). After checking in more details, it fails even after stopping the ofono service (using the default qtsystems- opensource- src package), so I believe we're probably facing a different issue in here (and it seems getAllModems would still return empty even with the denials, which would probably be ok).