[-]
[+]
|
Changed |
_service:tar_git:geoclue-provider-hybris-hal.changes
|
|
[-]
[+]
|
Changed |
_service:tar_git:geoclue-providers-hybris.spec
^
|
|
[-]
[+]
|
Changed |
_service:tar_git:geoclue-provider-hybris-hal-0.2.31.tar.gz/binder/binderlocationbackend.cpp
^
|
@@ -148,7 +148,7 @@
return HYBRIS_APN_IP_INVALID;
}
-static const void *geoclue_binder_gnss_decode_struct1(
+const void *geoclue_binder_gnss_decode_struct1(
GBinderReader *in,
guint size)
{
@@ -226,7 +226,7 @@
const double MpsToKnots = 1.943844;
-static GBinderLocalReply *geoclue_binder_gnss_callback(
+GBinderLocalReply *geoclue_binder_gnss_callback(
GBinderLocalObject *obj,
GBinderRemoteRequest *req,
guint code,
@@ -364,19 +364,19 @@
qCDebug(lcGeoclueHybris) << "GNSS set system info";
break;
default:
- qWarning("Failed to decode callback %u\n", code);
+ qWarning("Failed to decode callback %u", code);
break;
}
*status = GBINDER_STATUS_OK;
return gbinder_local_reply_append_int32(gbinder_local_object_new_reply(obj), 0);
} else {
- qWarning("Unknown interface %s and code %u\n", iface, code);
+ qWarning("Unknown interface %s and code %u", iface, code);
*status = GBINDER_STATUS_FAILED;
}
return Q_NULLPTR;
}
-static GBinderLocalReply *geoclue_binder_gnss_xtra_callback(
+GBinderLocalReply *geoclue_binder_gnss_xtra_callback(
GBinderLocalObject *obj,
GBinderRemoteRequest *req,
guint code,
@@ -397,19 +397,19 @@
QMetaObject::invokeMethod(staticProvider, "xtraDownloadRequest", Qt::QueuedConnection);
break;
default:
- qWarning("Failed to decode callback %u\n", code);
+ qWarning("Failed to decode callback %u", code);
break;
}
*status = GBINDER_STATUS_OK;
return gbinder_local_reply_append_int32(gbinder_local_object_new_reply(obj), 0);
} else {
- qWarning("Unknown interface %s and code %u\n", iface, code);
+ qWarning("Unknown interface %s and code %u", iface, code);
*status = GBINDER_STATUS_FAILED;
}
return Q_NULLPTR;
}
-static GBinderLocalReply *geoclue_binder_agnss_callback(
+GBinderLocalReply *geoclue_binder_agnss_callback(
GBinderLocalObject *obj,
GBinderRemoteRequest *req,
guint code,
@@ -463,20 +463,20 @@
}
break;
default:
- qWarning("Failed to decode callback %u\n", code);
+ qWarning("Failed to decode callback %u", code);
break;
}
*status = GBINDER_STATUS_OK;
return gbinder_local_reply_append_int32(gbinder_local_object_new_reply(obj), 0);
} else {
- qWarning("Unknown interface %s and code %u\n", iface, code);
+ qWarning("Unknown interface %s and code %u", iface, code);
*status = GBINDER_STATUS_FAILED;
}
return Q_NULLPTR;
}
-static GBinderLocalReply *geoclue_binder_agnss_ril_callback(
+GBinderLocalReply *geoclue_binder_agnss_ril_callback(
GBinderLocalObject *obj,
GBinderRemoteRequest *req,
guint code,
@@ -500,20 +500,20 @@
qCDebug(lcGeoclueHybris) << "AGNSS RIL request ref location";
break;
default:
- qWarning("Failed to decode callback %u\n", code);
+ qWarning("Failed to decode callback %u", code);
break;
}
*status = GBINDER_STATUS_OK;
return gbinder_local_reply_append_int32(gbinder_local_object_new_reply(obj), 0);
} else {
- qWarning("Unknown interface %s and code %u\n", iface, code);
+ qWarning("Unknown interface %s and code %u", iface, code);
*status = GBINDER_STATUS_FAILED;
}
return Q_NULLPTR;
}
-static GBinderLocalReply *geoclue_binder_gnss_ni_callback(
+GBinderLocalReply *geoclue_binder_gnss_ni_callback(
GBinderLocalObject *obj,
GBinderRemoteRequest *req,
guint code,
@@ -534,19 +534,19 @@
qCDebug(lcGeoclueHybris) << "GNSS NI notify";
break;
default:
- qWarning("Failed to decode callback %u\n", code);
+ qWarning("Failed to decode callback %u", code);
break;
}
*status = GBINDER_STATUS_OK;
return gbinder_local_reply_append_int32(gbinder_local_object_new_reply(obj), 0);
} else {
- qWarning("Unknown interface %s and code %u\n", iface, code);
+ qWarning("Unknown interface %s and code %u", iface, code);
*status = GBINDER_STATUS_FAILED;
}
return Q_NULLPTR;
}
-static void geoclue_binder_gnss_gnss_died(
+void geoclue_binder_gnss_gnss_died(
GBinderRemoteObject */*obj*/,
void *user_data)
{
@@ -652,10 +652,9 @@
gbinder_servicemanager_unref(m_sm);
m_sm = Q_NULLPTR;
}
- if (m_fqname) {
- g_free(m_fqname);
- m_fqname = Q_NULLPTR;
- }
+
+ g_free(m_fqname);
+ m_fqname = Q_NULLPTR;
}
bool BinderLocationBackend::isReplySuccess(GBinderRemoteReply *reply)
@@ -682,7 +681,7 @@
gbinder_remote_reply_init_reader(reply, &reader);
if (!gbinder_reader_read_int32(&reader, &status) || status != 0) {
- qWarning("Failed to get extension object %d\n", status);
+ qWarning("Failed to get extension object %d", status);
return Q_NULLPTR;
}
@@ -694,7 +693,7 @@
{
bool ret = false;
- qWarning("Initialising GNSS interface\n");
+ qWarning("Initialising GNSS interface");
m_sm = gbinder_servicemanager_new(GNSS_BINDER_DEFAULT_DEV);
if (m_sm) {
@@ -734,7 +733,7 @@
}
if (!ret) {
- qWarning("Failed to initialise GNSS interface\n");
+ qWarning("Failed to initialise GNSS interface");
}
return ret;
}
@@ -758,7 +757,7 @@
}
if (!ret) {
- qWarning("Failed to start positioning\n");
+ qWarning("Failed to start positioning");
}
return ret;
}
@@ -782,7 +781,7 @@
}
if (!ret) {
- qWarning("Failed to stop positioning\n");
+ qWarning("Failed to stop positioning");
}
return ret;
}
@@ -790,12 +789,7 @@
void BinderLocationBackend::gnssCleanup()
{
if (m_clientGnss) {
- const int status = gbinder_client_transact_sync_oneway(m_clientGnss,
- GNSS_CLEANUP, Q_NULLPTR);
|
[-]
[+]
|
Changed |
_service:tar_git:geoclue-provider-hybris-hal-0.2.31.tar.gz/binder/binderlocationbackend.h
^
|
@@ -66,6 +66,7 @@
bool aGnssDataConnClosed();
bool aGnssDataConnFailed();
bool aGnssDataConnOpen(const QByteArray &apn, const QString &protocol);
+ int aGnssSetServer(HybrisAGnssType type, const char* hostname, int port);
// AGnssRil
void aGnssRilInit();
|
[-]
[+]
|
Changed |
_service:tar_git:geoclue-provider-hybris-hal-0.2.31.tar.gz/geoclue-providers-hybris.pri
^
|
@@ -33,6 +33,12 @@
system_dbus_conf.files = com.jollamobile.gps.conf
system_dbus_conf.path = /etc/dbus-1/system.d
+systemd_dbus_service.files = geoclue-providers-hybris.service
+systemd_dbus_service.path = /usr/lib/systemd/user
+
+systemd_dbus_service_symlink.path = .
+systemd_dbus_service_symlink.commands = ln -s geoclue-providers-hybris.service ${INSTALL_ROOT}/usr/lib/systemd/user/dbus-org.freedesktop.Geoclue.Providers.Hybris.service
+
geoclue_provider.files = geoclue-hybris.provider
geoclue_provider.path = /usr/share/geoclue-providers
@@ -49,7 +55,8 @@
$${session_dbus_service.files} \
$${system_dbus_service.files} \
$${system_dbus_conf.files} \
+ $${systemd_dbus_service.files} \
$${geoclue_provider.files} \
rpm/geoclue-providers-hybris.spec
-INSTALLS += target session_dbus_service system_dbus_conf geoclue_provider
+INSTALLS += target session_dbus_service system_dbus_conf geoclue_provider systemd_dbus_service systemd_dbus_service_symlink
|
[-]
[+]
|
Added |
_service:tar_git:geoclue-provider-hybris-hal-0.2.31.tar.gz/geoclue-providers-hybris.service
^
|
@@ -0,0 +1,16 @@
+[Unit]
+Description=Geoinformation Service Hybris Provider
+
+[Service]
+Type=dbus
+ExecStart=/usr/libexec/geoclue-hybris
+BusName=org.freedesktop.Geoclue.Providers.Hybris
+#Sandboxing
+Capabilities=
+PrivateTmp=yes
+ProtectHome=yes
+ProtectSystem=full
+
+[Install]
+Alias=dbus-org.freedesktop.Geoclue.Providers.Hybris.service
+
|
[-]
[+]
|
Changed |
_service:tar_git:geoclue-provider-hybris-hal-0.2.31.tar.gz/hal/hallocationbackend.cpp
^
|
@@ -254,7 +254,7 @@
void requestUtcTimeCallback()
{
- qCDebug(lcGeoclueHybris);
+ qCDebug(lcGeoclueHybris) << "GNSS request UTC time";
QMetaObject::invokeMethod(staticProvider, "injectUtcTime", Qt::QueuedConnection);
}
@@ -263,7 +263,7 @@
void gnssSetSystemInfoCallback(const GnssSystemInfo *info)
{
Q_UNUSED(info)
- qCDebug(lcGeoclueHybris);
+ qCDebug(lcGeoclueHybris) << "GNSS set system info";
}
#endif
@@ -299,19 +299,19 @@
void gpsNiNotifyCallback(GpsNiNotification *notification)
{
Q_UNUSED(notification)
- qCDebug(lcGeoclueHybris);
+ qCDebug(lcGeoclueHybris) << "GNSS NI notify";
}
void agpsRilRequestSetId(uint32_t flags)
{
Q_UNUSED(flags)
- qCDebug(lcGeoclueHybris) << "flags" << showbase << hex << flags;
+ qCDebug(lcGeoclueHybris) << "AGNSS RIL request set ID flags" << showbase << hex << flags;
}
void agpsRilRequestRefLoc(uint32_t flags)
{
Q_UNUSED(flags)
- qCDebug(lcGeoclueHybris) << "flags" << showbase << hex << flags;
+ qCDebug(lcGeoclueHybris) << "AGNSS RIL request ref location flags" << showbase << hex << flags;
}
void gnssXtraDownloadRequest()
@@ -411,17 +411,17 @@
int error = hw_get_module(GPS_HARDWARE_MODULE_ID, &hwModule);
if (error) {
- qWarning("Android GPS interface not found, error %d\n", error);
+ qWarning("Android GPS interface not found, error %d", error);
return false;
}
- qWarning("Android GPS hardware module \"%s\" \"%s\" %u.%u\n", hwModule->id, hwModule->name,
+ qWarning("Android GPS hardware module \"%s\" \"%s\" %u.%u", hwModule->id, hwModule->name,
hwModule->module_api_version, hwModule->hal_api_version);
error = hwModule->methods->open(hwModule, GPS_HARDWARE_MODULE_ID,
reinterpret_cast<hw_device_t **>(&m_gpsDevice));
if (error) {
- qWarning("Failed to open GPS device, error %d\n", error);
+ qWarning("Failed to open GPS device, error %d", error);
return false;
}
@@ -429,11 +429,11 @@
if (!m_gps)
return false;
- qWarning("Initialising GPS interface\n");
+ qWarning("Initialising GPS interface");
error = m_gps->init(&gpsCallbacks);
if (error) {
- qWarning("Failed to initialise GPS interface, error %d\n", error);
+ qWarning("Failed to initialise GPS interface, error %d", error);
return false;
}
@@ -445,7 +445,7 @@
if (m_gps) {
int error = m_gps->start();
if (error) {
- qWarning("Failed to start positioning, error %d\n", error);
+ qWarning("Failed to start positioning, error %d", error);
return false;
}
return true;
@@ -458,7 +458,7 @@
if (m_gps) {
int error = m_gps->stop();
if (error) {
- qWarning("Failed to stop positioning, error %d\n", error);
+ qWarning("Failed to stop positioning, error %d", error);
return false;
}
return true;
@@ -480,7 +480,7 @@
if (m_gps) {
int error = m_gps->inject_location(latitudeDegrees, longitudeDegrees, accuracyMeters);
if (error) {
- qWarning("Failed to inject location, error %d\n", error);
+ qWarning("Failed to inject location, error %d", error);
return false;
}
return true;
@@ -493,7 +493,7 @@
if (m_gps) {
int error = m_gps->inject_time(timeMs, timeReferenceMs, uncertaintyMs);
if (error) {
- qWarning("Failed to inject time, error %d\n", error);
+ qWarning("Failed to inject time, error %d", error);
return false;
}
return true;
@@ -503,7 +503,9 @@
void HalLocationBackend::gnssDeleteAidingData(HybrisGnssAidingData aidingDataFlags)
{
- Q_UNUSED(aidingDataFlags)
+ if (m_gps) {
+ m_gps->delete_aiding_data(aidingDataFlags);
+ }
}
bool HalLocationBackend::gnssSetPositionMode(HybrisGnssPositionMode mode, HybrisGnssPositionRecurrence recurrence,
@@ -513,7 +515,7 @@
int error = m_gps->set_position_mode(mode, recurrence, minIntervalMs,
preferredAccuracyMeters, preferredTimeMs);
if (error) {
- qWarning("While updating the updateInterval, failed to set position mode, error %d\n", error);
+ qWarning("While updating the updateInterval, failed to set position mode, error %d", error);
return false;
}
return true;
@@ -530,7 +532,7 @@
{
m_gpsni = static_cast<const GpsNiInterface *>(m_gps->get_extension(GPS_NI_INTERFACE));
if (m_gpsni) {
- qWarning("Initialising GPS NI Interface\n");
+ qWarning("Initialising GPS NI Interface");
m_gpsni->init(&gpsNiCallbacks);
}
}
@@ -545,10 +547,10 @@
{
m_xtra = static_cast<const GpsXtraInterface *>(m_gps->get_extension(GPS_XTRA_INTERFACE));
if (m_xtra) {
- qWarning("Initialising GPS Xtra Interface\n");
+ qWarning("Initialising GPS Xtra Interface");
int error = m_xtra->init(&gpsXtraCallbacks.callbacks);
if (error)
- qWarning("GPS Xtra Interface init failed, error %d\n", error);
+ qWarning("GPS Xtra Interface init failed, error %d", error);
}
}
@@ -565,7 +567,7 @@
{
m_agps = static_cast<const AGpsInterface *>(m_gps->get_extension(AGPS_INTERFACE));
if (m_agps) {
- qWarning("Initialising AGPS Interface\n");
+ qWarning("Initialising AGPS Interface");
m_agps->init(&agpsCallbacks);
}
}
@@ -614,12 +616,17 @@
return !error;
}
+int HalLocationBackend::aGnssSetServer(HybrisAGnssType type, const char* hostname, int port)
+{
+ return m_agps->set_server(type, hostname, port);
+}
+
// AGnssRil
void HalLocationBackend::aGnssRilInit()
{
m_agpsril = static_cast<const AGpsRilInterface *>(m_gps->get_extension(AGPS_RIL_INTERFACE));
if (m_agpsril) {
- qWarning("Initialising AGPS RIL Interface\n");
+ qWarning("Initialising AGPS RIL Interface");
m_agpsril->init(&agpsRilCallbacks);
}
}
|
[-]
[+]
|
Changed |
_service:tar_git:geoclue-provider-hybris-hal-0.2.31.tar.gz/hal/hallocationbackend.h
^
|
@@ -64,6 +64,7 @@
bool aGnssDataConnClosed();
bool aGnssDataConnFailed();
bool aGnssDataConnOpen(const QByteArray &apn, const QString &protocol);
+ int aGnssSetServer(HybrisAGnssType type, const char* hostname, int port);
// AGnssRil
void aGnssRilInit();
|
[-]
[+]
|
Changed |
_service:tar_git:geoclue-provider-hybris-hal-0.2.31.tar.gz/hybrislocationbackend.h
^
|
@@ -136,6 +136,7 @@
virtual bool aGnssDataConnClosed() = 0;
virtual bool aGnssDataConnFailed() = 0;
virtual bool aGnssDataConnOpen(const QByteArray &apn, const QString &protocol) = 0;
+ virtual int aGnssSetServer(HybrisAGnssType type, const char* hostname, int port) = 0;
// AGnssRil
virtual void aGnssRilInit() = 0;
|
[-]
[+]
|
Changed |
_service:tar_git:geoclue-provider-hybris-hal-0.2.31.tar.gz/hybrisprovider.cpp
^
|
@@ -48,6 +48,12 @@
HybrisProvider *staticProvider = Q_NULLPTR;
+// Some older devices have the GPS week number rollover bug
+// which breaks timestamps so workaround it using a constant offset
+// of 1024 weeks if timestamp is too small
+const HybrisGnssUtcTime GnssWeekRolloverTimestamp = 1554595200000;
+const HybrisGnssUtcTime GnssWeekRolloverTimestampOffset = 619315200000;
+
namespace
{
@@ -56,20 +62,6 @@
const quint32 MinimumInterval = 1000;
const quint32 PreferredAccuracy = 0;
const quint32 PreferredInitialFixTime = 0;
-const double KnotsToMps = 0.514444;
-
-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");
-const QString LocationSettingsAgpsAgreementAcceptedKey = QStringLiteral("location/%1/agreement_accepted");
-const QString LocationSettingsAgpsProvidersKey = QStringLiteral("location/agps_providers");
-// deprecated keys
-const QString LocationSettingsOldAgpsEnabledKey = QStringLiteral("location/agreement_accepted");
-const QString LocationSettingsOldAgpsAgreementAcceptedKey = QStringLiteral("location/here_agreement_accepted");
const int MaxXtraServers = 3;
const QString XtraConfigFile = QStringLiteral("/etc/gps_xtra.ini");
@@ -162,7 +154,8 @@
m_networkManager(new NetworkManager(this)), m_cellularTechnology(Q_NULLPTR),
m_ofonoExtModemManager(new QOfonoExtModemManager(this)),
m_connectionManager(new QOfonoConnectionManager(this)), m_connectionContext(Q_NULLPTR), m_ntpSocket(Q_NULLPTR),
- m_agpsEnabled(false), m_agpsOnlineEnabled(false), m_useForcedXtraInject(false), m_xtraUserAgent("")
+ m_agpsEnabled(false), m_agpsOnlineEnabled(false), m_useForcedNtpInject(false), m_useForcedXtraInject(false),
+ m_suplPort(0)
{
if (staticProvider)
qFatal("Only a single instance of HybrisProvider is supported.");
@@ -213,46 +206,42 @@
m_idleTimer.start(QuitIdleTime, this);
}
- QString xtraUserAgentFileName;
QSettings settings(XtraConfigFile, QSettings::IniFormat);
- QString xtraServer;
for (int i = 0; i < MaxXtraServers; i++) {
QString key = QString("xtra/XTRA_SERVER_%1").arg(i);
- xtraServer = settings.value(key, "").toString();
- if (xtraServer != "") {
+ QString xtraServer = settings.value(key, QString()).toString();
+ if (!xtraServer.isEmpty()) {
m_xtraServers.enqueue(xtraServer);
}
}
+ if (!m_xtraServers.isEmpty())
+ qCDebug(lcGeoclueHybris) << "Overriding XTRA servers with" << m_xtraServers;
m_useForcedXtraInject = settings.value("xtra/XTRA_FORCE_INJECT", "").toBool();
+ if (m_useForcedXtraInject)
+ qCDebug(lcGeoclueHybris) << "Forcing XTRA data injection";
- xtraUserAgentFileName = settings.value("xtra/XTRA_USERAGENT_FILE", "").toString();
- if (xtraUserAgentFileName != "") {
+ QString xtraUserAgentFileName = settings.value("xtra/XTRA_USERAGENT_FILE", QString()).toString();
+ if (!xtraUserAgentFileName.isEmpty()) {
QFile xtraUserAgentFile(xtraUserAgentFileName);
if (xtraUserAgentFile.open(QIODevice::ReadOnly)) {
m_xtraUserAgent = xtraUserAgentFile.readLine();
+ qCDebug(lcGeoclueHybris) << "Overriding XTRA user agent with" << m_xtraUserAgent;
}
}
- if (m_xtraServers.isEmpty()) {
- QFile gpsConf(QStringLiteral("/system/etc/gps.conf"));
- if (gpsConf.open(QIODevice::ReadOnly)) {
+ m_useForcedNtpInject = settings.value("ntp/NTP_FORCE_INJECT", "").toBool();
+ if (m_useForcedNtpInject)
+ qCDebug(lcGeoclueHybris) << "Forcing NTP injection";
+
+ m_suplHost = settings.value("supl/SUPL_HOST").toString();
+ m_suplPort = settings.value("supl/SUPL_PORT").toInt();
+ if (!m_suplHost.isEmpty() && m_suplPort > 0)
+ qCDebug(lcGeoclueHybris) << "Overriding SUPL server with" << m_suplHost << "port" << m_suplPort;
- while (!gpsConf.atEnd()) {
- const QByteArray line = gpsConf.readLine().trimmed();
- if (line.startsWith('#'))
- continue;
-
- const QList<QByteArray> split = line.split('=');
- if (split.length() != 2)
- continue;
-
- const QByteArray key = split.at(0).trimmed();
- if (key == "XTRA_SERVER_1" || key == "XTRA_SERVER_2" || key == "XTRA_SERVER_3")
- m_xtraServers.enqueue(QUrl::fromEncoded(split.at(1).trimmed()));
- }
- }
+ if (m_xtraServers.isEmpty() || m_suplHost.isEmpty() || m_suplPort == 0) {
+ loadDefaultsFromConfigurationFile();
}
m_backend = getLocationBackend();
@@ -267,6 +256,12 @@
m_backend->aGnssRilInit();
m_backend->gnssXtraInit();
m_backend->gnssDebugInit();
+
+ // Set SUPL server if provided
+ if (!m_suplHost.isEmpty() && m_suplPort > 0) {
+ if (!m_backend->aGnssSetServer(HYBRIS_AGNSS_TYPE_SUPL, m_suplHost.toLatin1().constData(), m_suplPort))
+ qWarning("Setting SUPL server to %s (%i) failed", m_suplHost.toLatin1().constData(), m_suplPort);
+ }
}
HybrisProvider::~HybrisProvider()
@@ -280,6 +275,49 @@
staticProvider = 0;
}
+void HybrisProvider::loadDefaultsFromConfigurationFile()
+{
+ QFile gpsConf;
+ bool parseXtraServers = false;
+ const char *paths[] = {"/vendor/etc/gps.conf", "/system/etc/gps.conf", NULL};
+ int i = 0;
+ while (paths[i] != NULL) {
+ gpsConf.setFileName(paths[i]);
+ if (gpsConf.open(QIODevice::ReadOnly)) {
+ break;
+ }
+ ++i;
+ }
+ if (!gpsConf.isOpen()) {
+ return;
+ }
+ if (m_xtraServers.isEmpty()) {
+ parseXtraServers = true;
+ }
+
+ while (!gpsConf.atEnd()) {
+ const QByteArray line = gpsConf.readLine().trimmed();
+ if (line.startsWith('#'))
+ continue;
+
+ const QList<QByteArray> split = line.split('=');
+ if (split.length() != 2)
+ continue;
+
+ const QByteArray key = split.at(0).trimmed();
+ if (parseXtraServers) {
+ if (key == "XTRA_SERVER_1" || key == "XTRA_SERVER_2" || key == "XTRA_SERVER_3")
+ m_xtraServers.enqueue(QUrl::fromEncoded(split.at(1).trimmed()));
+ }
+ if (m_suplHost.isEmpty() && key == "SUPL_HOST") {
+ m_suplHost = split.at(1).trimmed();
+ }
+ if (m_suplPort == 0 && key == "SUPL_PORT") {
+ m_suplPort = split.at(1).trimmed().toInt();
+ }
+ }
+}
+
void HybrisProvider::setLocationSettings(LocationSettings *settings)
{
if (!m_locationSettings) {
@@ -374,6 +412,13 @@
HYBRIS_GNSS_POSITION_RECURRENCE_PERIODIC, updateInterval,
PreferredAccuracy, PreferredInitialFixTime);
}
+
+ if (options.contains(QStringLiteral("NoCachedAidingData"))
+ && options.value(QStringLiteral("NoCachedAidingData")).toBool()
+ && m_backend) {
+ //GPS_DELETE_ALL = 0xFFFF (almanac, ephemeris, position, time and other cache data)
+ m_backend->gnssDeleteAidingData(0xFFFF);
+ }
}
int HybrisProvider::GetPosition(int ×tamp, double &latitude, double &longitude,
@@ -454,12 +499,14 @@
void HybrisProvider::setLocation(const Location &location)
{
- qCDebug(lcGeoclueHybrisPosition) << location.timestamp() << location.latitude()
+ qCDebug(lcGeoclueHybrisPosition) << "Set location"
+ << location.timestamp() << location.latitude()
<< location.longitude() << location.altitude();
// Stop listening to all PositionChanged signals from org.freedesktop.Geoclue.Position
// interfaces.
if (m_positionInjectionConnected) {
+ qCDebug(lcGeoclueHybrisPosition) << "Stop listening to all PositionChanged signals";
|
[-]
[+]
|
Changed |
_service:tar_git:geoclue-provider-hybris-hal-0.2.31.tar.gz/hybrisprovider.h
^
|
@@ -156,6 +156,8 @@
void cellularConnected(bool connected);
private:
+ void loadDefaultsFromConfigurationFile();
+
void emitLocationChanged();
void emitSatelliteChanged();
void startPositioningIfNeeded();
@@ -236,9 +238,13 @@
bool m_agpsEnabled;
bool m_agpsOnlineEnabled;
+ bool m_useForcedNtpInject;
bool m_useForcedXtraInject;
QString m_xtraUserAgent;
double m_magneticVariation;
+
+ QString m_suplHost;
+ int m_suplPort;
};
extern HybrisProvider *staticProvider;
|
[-]
[+]
|
Changed |
_service:tar_git:geoclue-provider-hybris-hal-0.2.31.tar.gz/main.cpp
^
|
@@ -55,8 +55,8 @@
supplementaryGroups[numberGroups++] = group->gr_gid;
- // remove audio, radio and bluetooth groups to avoid confusion in BSP
- char *groups_to_remove[] = {"bluetooth", "radio", "audio", NULL};
+ // remove nfc, audio, radio and bluetooth groups to avoid confusion in BSP
+ const char *groups_to_remove[] = {"bluetooth", "radio", "audio", "nfc", NULL};
int idx = 0;
while (groups_to_remove[idx]) {
|
[-]
[+]
|
Changed |
_service:tar_git:geoclue-provider-hybris-hal-0.2.31.tar.gz/org.freedesktop.Geoclue.Providers.Hybris.service
^
|
@@ -1,3 +1,4 @@
[D-BUS Service]
Name=org.freedesktop.Geoclue.Providers.Hybris
-Exec=/usr/libexec/geoclue-hybris
+Exec=/bin/false
+SystemdService=dbus-org.freedesktop.Geoclue.Providers.Hybris.service
|
[-]
[+]
|
Changed |
_service:tar_git:geoclue-providers-hybris.inc
^
|
@@ -1,7 +1,6 @@
Summary: Geoinformation Service Hybris Provider
-Group: System/Libraries
-URL: https://bitbucket.org/jolla/base-geoclue-providers-hybris
-License: LGPLv2.1
+URL: https://github.com/mer-hybris/geoclue-providers-hybris
+License: LGPLv2
Source: %{name}-%{version}.tar.gz
BuildRequires: pkgconfig(Qt5Core)
BuildRequires: pkgconfig(Qt5DBus)
@@ -10,6 +9,7 @@
BuildRequires: pkgconfig(qofono-qt5)
BuildRequires: pkgconfig(qofonoext)
BuildRequires: pkgconfig(systemsettings) >= 0.5.5
+BuildRequires: systemd
Requires: connectionagent-qt5 >= 0.9.20
Source100: geoclue-providers-hybris.inc
@@ -17,18 +17,15 @@
%description
%{summary}.
-
%prep
-%setup -q -n %{name}-%{version}
-
+%autosetup -n %{name}-%{version}
%build
%{qmake_command}
-make %{?_smp_mflags}
-
+%make_build
%install
-make INSTALL_ROOT=%{buildroot} install
+%make_install
%files
%defattr(04755,root,root,-)
@@ -37,4 +34,5 @@
%{_sysconfdir}/dbus-1
%{_datadir}/dbus-1
%{_datadir}/geoclue-providers/geoclue-hybris.provider
-
+%{_userunitdir}/geoclue-providers-hybris.service
+%{_userunitdir}/dbus-org.freedesktop.Geoclue.Providers.Hybris.service
|