[-]
[+]
|
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">50a238aa0c73c50b6e8b4a30eaadc32d187475d3</param>
+ <param name="revision">38ef0f1d8a56b56db5bfe99fdb88b9a0e684ca6d</param>
<param name="token"></param>
<param name="debian"></param>
<param name="dumb"></param>
|
[-]
[+]
|
Changed |
_service:tar_git:geoclue-provider-hybris-0.2.19.tar.gz/binder/binderlocationbackend.cpp
^
|
@@ -133,9 +133,6 @@
* Implementation
*==========================================================================*/
-namespace
-{
-
HybrisApnIpType fromContextProtocol(const QString &protocol)
{
if (protocol == QLatin1String("ip"))
@@ -224,8 +221,6 @@
parseRmc(nmea);
}
-const double MpsToKnots = 1.943844;
-
static GBinderLocalReply *geoclue_binder_gnss_callback(
GBinderLocalObject *obj,
GBinderRemoteRequest *req,
@@ -261,7 +256,7 @@
loc.setAltitude(location->altitudeMeters);
if (location->gnssLocationFlags & HYBRIS_GNSS_LOCATION_HAS_SPEED)
- loc.setSpeed(location->speedMetersPerSec * MpsToKnots);
+ loc.setSpeed(location->speedMetersPerSec);
if (location->gnssLocationFlags & HYBRIS_GNSS_LOCATION_HAS_BEARING)
loc.setDirection(location->bearingDegrees);
@@ -305,7 +300,7 @@
for (int i = 0; i < svStatus->numSvs; ++i) {
SatelliteInfo satInfo;
- GnssSvInfo svInfo = svStatus->gnssSvList[i];
+ GnssSvInfo svInfo = svStatus->gnssSvList.data[i];
satInfo.setSnr(svInfo.cN0Dbhz);
satInfo.setElevation(svInfo.elevationDegrees);
satInfo.setAzimuth(svInfo.azimuthDegrees);
@@ -325,7 +320,7 @@
satellites.append(satInfo);
if (svInfo.svFlag & HYBRIS_GNSS_SV_FLAGS_USED_IN_FIX)
- usedPrns.append(prn);
+ usedPrns.append(svInfo.svid);
}
QMetaObject::invokeMethod(staticProvider, "setSatellite", Qt::QueuedConnection,
@@ -454,7 +449,7 @@
const AGnssStatusIpV6 *status = geoclue_binder_gnss_decode_struct
(AGnssStatusIpV6, &reader);
- ipv6.setAddress(status->ipV6Addr);
+ ipv6.setAddress(status->ipV6Addr.data);
QMetaObject::invokeMethod(staticProvider, "agpsStatus", Qt::QueuedConnection,
Q_ARG(qint16, status->type), Q_ARG(quint16, status->status),
@@ -554,7 +549,6 @@
self->dropGnss();
}
-}
/*==========================================================================*
* Backend class
@@ -582,20 +576,12 @@
gbinder_local_object_drop(m_callbackGnss);
m_callbackGnss = Q_NULLPTR;
}
- if (m_clientGnss) {
- gbinder_client_unref(m_clientGnss);
- m_clientGnss = Q_NULLPTR;
- }
if (m_remoteGnss) {
gbinder_remote_object_remove_handler(m_remoteGnss, m_death_id);
gbinder_remote_object_unref(m_remoteGnss);
m_death_id = 0;
m_remoteGnss = Q_NULLPTR;
}
- if (m_clientGnssDebug) {
- gbinder_client_unref(m_clientGnssDebug);
- m_clientGnssDebug = Q_NULLPTR;
- }
if (m_remoteGnssDebug) {
gbinder_remote_object_unref(m_remoteGnssDebug);
m_remoteGnssDebug = Q_NULLPTR;
@@ -604,10 +590,6 @@
gbinder_local_object_drop(m_callbackGnssNi);
m_callbackGnssNi = Q_NULLPTR;
}
- if (m_clientGnssNi) {
- gbinder_client_unref(m_clientGnssNi);
- m_clientGnssNi = Q_NULLPTR;
- }
if (m_remoteGnssNi) {
gbinder_remote_object_unref(m_remoteGnssNi);
m_remoteGnssNi = Q_NULLPTR;
@@ -616,10 +598,6 @@
gbinder_local_object_drop(m_callbackGnssXtra);
m_callbackGnssXtra = Q_NULLPTR;
}
- if (m_clientGnssXtra) {
- gbinder_client_unref(m_clientGnssXtra);
- m_clientGnssXtra = Q_NULLPTR;
- }
if (m_remoteGnssXtra) {
gbinder_remote_object_unref(m_remoteGnssXtra);
m_remoteGnssXtra = Q_NULLPTR;
@@ -628,10 +606,6 @@
gbinder_local_object_drop(m_callbackAGnss);
m_callbackAGnss = Q_NULLPTR;
}
- if (m_clientAGnss) {
- gbinder_client_unref(m_clientAGnss);
- m_clientAGnss = Q_NULLPTR;
- }
if (m_remoteAGnss) {
gbinder_remote_object_unref(m_remoteAGnss);
m_remoteAGnss = Q_NULLPTR;
@@ -640,22 +614,10 @@
gbinder_local_object_drop(m_callbackAGnssRil);
m_callbackAGnssRil = Q_NULLPTR;
}
- if (m_clientAGnssRil) {
- gbinder_client_unref(m_clientAGnssRil);
- m_clientAGnssRil = Q_NULLPTR;
- }
if (m_remoteAGnssRil) {
gbinder_remote_object_unref(m_remoteAGnssRil);
m_remoteAGnssRil = Q_NULLPTR;
}
- if (m_sm) {
- gbinder_servicemanager_unref(m_sm);
- m_sm = Q_NULLPTR;
- }
- if (m_fqname) {
- g_free(m_fqname);
- m_fqname = Q_NULLPTR;
- }
}
bool BinderLocationBackend::isReplySuccess(GBinderRemoteReply *reply)
|
[-]
[+]
|
Changed |
_service:tar_git:geoclue-provider-hybris-0.2.19.tar.gz/binder/gnss-binder-types.h
^
|
@@ -18,6 +18,29 @@
#define ALIGNED(x) __attribute__ ((aligned(x)))
+typedef struct hidl_string {
+ union {
+ guint64 value;
+ const char *str;
+ } data;
+ guint32 len;
+ guint8 owns_buffer;
+} ALIGNED(4) HidlString;
+
+typedef struct hidl_vector {
+ union {
+ guint64 value;
+ const void *ptr;
+ } data;
+ guint32 count;
+ guint8 owns_buffer;
+} ALIGNED(4) HidlVector;
+
+template<typename T, size_t SIZE1>
+struct HidlArray {
+ T data[SIZE1];
+};
+
typedef struct geoclue_binder_gnss GeoclueBinderGnss;
typedef enum gnss_max {
@@ -85,7 +108,7 @@
typedef struct gnss_sv_status {
gint32 numSvs ALIGNED(4);
- GnssSvInfo gnssSvList[64] ALIGNED(4);
+ HidlArray<GnssSvInfo, 64> gnssSvList ALIGNED(4);
} ALIGNED(4) GnssSvStatus;
G_STATIC_ASSERT(sizeof(GnssSvStatus) == 1540);
@@ -113,17 +136,17 @@
};
typedef struct agnss_status_ip_v4 {
- AGnssType type ALIGNED(1);
- AGnssStatusValue status ALIGNED(1);
- gint32 ipV4Addr ALIGNED(4);
+ AGnssType type ALIGNED(1);
+ AGnssStatusValue status ALIGNED(1);
+ gint32 ipV4Addr ALIGNED(4);
} ALIGNED(4) AGnssStatusIpV4;
G_STATIC_ASSERT(sizeof(AGnssStatusIpV4) == 8);
typedef struct agnss_status_ip_v6 {
- AGnssType type ALIGNED(1);
- AGnssStatusValue status ALIGNED(1);
- uint8_t ipV6Addr[16] ALIGNED(1);
+ AGnssType type ALIGNED(1);
+ AGnssStatusValue status ALIGNED(1);
+ HidlArray<uint8_t, 16> ipV6Addr ALIGNED(1);
} ALIGNED(1) AGnssStatusIpV6;
G_STATIC_ASSERT(sizeof(AGnssStatusIpV6) == 18);
|
[-]
[+]
|
Changed |
_service:tar_git:geoclue-provider-hybris-0.2.19.tar.gz/hal/hallocationbackend.cpp
^
|
@@ -40,7 +40,7 @@
namespace
{
-const double MpsToKnots = 1.943844;
+const double KnotsToMps = 0.514444;
void locationCallback(GpsLocation *location)
{
@@ -57,7 +57,7 @@
loc.setAltitude(location->altitude);
if (location->flags & GPS_LOCATION_HAS_SPEED)
- loc.setSpeed(location->speed * MpsToKnots);
+ loc.setSpeed(location->speed / KnotsToMps);
if (location->flags & GPS_LOCATION_HAS_BEARING)
loc.setDirection(location->bearing);
|
[-]
[+]
|
Changed |
_service:tar_git:geoclue-provider-hybris-0.2.19.tar.gz/hybrisprovider.cpp
^
|
@@ -61,7 +61,6 @@
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");
@@ -286,8 +285,6 @@
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,
@@ -1058,12 +1055,11 @@
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 - if it is allowed by MDM.
+ // enable GPS positioning if location and the GPS are enabled, and the GPS is not in flight mode.
return m_locationSettings->locationEnabled()
&& m_locationSettings->gpsAvailable()
&& m_locationSettings->gpsEnabled()
- && !m_locationSettings->gpsFlightMode()
- && (m_locationSettings->allowedDataSources() & LocationSettings::GpsData);
+ && !m_locationSettings->gpsFlightMode();
}
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) >= 0.5.5
+BuildRequires: pkgconfig(systemsettings)
Requires: connectionagent-qt5 >= 0.9.20
Source100: geoclue-providers-hybris.inc
|