[-]
[+]
|
Changed |
_service:tar_git:geoclue-provider-hybris.changes
|
|
[-]
[+]
|
Changed |
_service:tar_git:geoclue-providers-hybris.spec
^
|
|
[-]
[+]
|
Changed |
_service
^
|
@@ -2,7 +2,7 @@
<service name="tar_git">
<param name="url">https://github.com/mer-hybris/geoclue-providers-hybris.git</param>
<param name="branch">master</param>
- <param name="revision">ed5e33178ae5af4e03c4c13a0d4e5bc7c0ed7349</param>
+ <param name="revision">50a238aa0c73c50b6e8b4a30eaadc32d187475d3</param>
<param name="token"/>
<param name="debian">N</param>
<param name="dumb">N</param>
|
[-]
[+]
|
Changed |
_service:tar_git:geoclue-provider-hybris-0.2.21.tar.gz/binder/binderlocationbackend.cpp
^
|
@@ -133,6 +133,9 @@
* Implementation
*==========================================================================*/
+namespace
+{
+
HybrisApnIpType fromContextProtocol(const QString &protocol)
{
if (protocol == QLatin1String("ip"))
@@ -221,6 +224,8 @@
parseRmc(nmea);
}
+const double MpsToKnots = 1.943844;
+
static GBinderLocalReply *geoclue_binder_gnss_callback(
GBinderLocalObject *obj,
GBinderRemoteRequest *req,
@@ -256,7 +261,7 @@
loc.setAltitude(location->altitudeMeters);
if (location->gnssLocationFlags & HYBRIS_GNSS_LOCATION_HAS_SPEED)
- loc.setSpeed(location->speedMetersPerSec);
+ loc.setSpeed(location->speedMetersPerSec * MpsToKnots);
if (location->gnssLocationFlags & HYBRIS_GNSS_LOCATION_HAS_BEARING)
loc.setDirection(location->bearingDegrees);
@@ -320,7 +325,7 @@
satellites.append(satInfo);
if (svInfo.svFlag & HYBRIS_GNSS_SV_FLAGS_USED_IN_FIX)
- usedPrns.append(svInfo.svid);
+ usedPrns.append(prn);
}
QMetaObject::invokeMethod(staticProvider, "setSatellite", Qt::QueuedConnection,
@@ -549,6 +554,7 @@
self->dropGnss();
}
+}
/*==========================================================================*
* Backend class
|
[-]
[+]
|
Changed |
_service:tar_git:geoclue-provider-hybris-0.2.21.tar.gz/hal/hallocationbackend.cpp
^
|
@@ -40,7 +40,7 @@
namespace
{
-const double KnotsToMps = 0.514444;
+const double MpsToKnots = 1.943844;
void locationCallback(GpsLocation *location)
{
@@ -57,7 +57,7 @@
loc.setAltitude(location->altitude);
if (location->flags & GPS_LOCATION_HAS_SPEED)
- loc.setSpeed(location->speed / KnotsToMps);
+ loc.setSpeed(location->speed * MpsToKnots);
if (location->flags & GPS_LOCATION_HAS_BEARING)
loc.setDirection(location->bearing);
|
[-]
[+]
|
Changed |
_service:tar_git:geoclue-provider-hybris-0.2.21.tar.gz/hybrisprovider.cpp
^
|
@@ -61,6 +61,7 @@
const QString LocationSettingsDir = QStringLiteral("/etc/location/");
const QString LocationSettingsFile = QStringLiteral("/etc/location/location.conf");
const QString LocationSettingsEnabledKey = QStringLiteral("location/enabled");
+const QString LocationSettingsAllowedDataSourcesGpsKey = QStringLiteral("allowed_data_sources/gps");
const QString LocationSettingsGpsEnabledKey = QStringLiteral("location/gps/enabled");
const QString LocationSettingsAgpsEnabledKey = QStringLiteral("location/%1/enabled");
const QString LocationSettingsAgpsOnlineEnabledKey = QStringLiteral("location/%1/online_enabled");
@@ -285,6 +286,8 @@
m_locationSettings = settings;
connect(m_locationSettings, &LocationSettings::locationEnabledChanged,
this, &HybrisProvider::locationEnabledChanged);
+ connect(m_locationSettings, &LocationSettings::allowedDataSourcesChanged,
+ this, &HybrisProvider::locationEnabledChanged);
connect(m_locationSettings, &LocationSettings::gpsEnabledChanged,
this, &HybrisProvider::locationEnabledChanged);
connect(m_locationSettings, &LocationSettings::gpsFlightModeChanged,
@@ -1055,11 +1058,12 @@
m_agpsOnlineEnabled = (m_locationSettings->hereAvailable() && m_locationSettings->hereState() == LocationSettings::OnlineAGpsEnabled)
|| (m_locationSettings->mlsAvailable() && m_locationSettings->mlsOnlineState() == LocationSettings::OnlineAGpsEnabled);
- // enable GPS positioning if location and the GPS are enabled, and the GPS is not in flight mode.
+ // enable GPS positioning if location and the GPS are enabled, and the GPS is not in flight mode - if it is allowed by MDM.
return m_locationSettings->locationEnabled()
&& m_locationSettings->gpsAvailable()
&& m_locationSettings->gpsEnabled()
- && !m_locationSettings->gpsFlightMode();
+ && !m_locationSettings->gpsFlightMode()
+ && (m_locationSettings->allowedDataSources() & LocationSettings::GpsData);
}
quint32 HybrisProvider::minimumRequestedUpdateInterval() const
|
[-]
[+]
|
Changed |
_service:tar_git:geoclue-providers-hybris.inc
^
|
@@ -12,7 +12,7 @@
BuildRequires: pkgconfig(connman-qt5) >= 1.0.68
BuildRequires: pkgconfig(qofono-qt5)
BuildRequires: pkgconfig(qofonoext)
-BuildRequires: pkgconfig(systemsettings)
+BuildRequires: pkgconfig(systemsettings) >= 0.5.5
Requires: connectionagent-qt5 >= 0.9.20
Source100: geoclue-providers-hybris.inc
|