[-]
[+]
|
Changed |
_service:tar_git:geoclue-provider-hybris-binder.changes
|
|
[-]
[+]
|
Changed |
_service:tar_git:geoclue-providers-hybris-binder.spec
^
|
|
[-]
[+]
|
Changed |
_service:tar_git:geoclue-provider-hybris-binder-0.2.31.tar.gz/binder/binderlocationbackend.cpp
^
|
@@ -364,13 +364,13 @@
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;
@@ -397,13 +397,13 @@
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;
@@ -463,13 +463,13 @@
}
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;
@@ -500,13 +500,13 @@
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;
@@ -534,13 +534,13 @@
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;
@@ -681,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;
}
@@ -693,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) {
@@ -733,7 +733,7 @@
}
if (!ret) {
- qWarning("Failed to initialise GNSS interface\n");
+ qWarning("Failed to initialise GNSS interface");
}
return ret;
}
@@ -757,7 +757,7 @@
}
if (!ret) {
- qWarning("Failed to start positioning\n");
+ qWarning("Failed to start positioning");
}
return ret;
}
@@ -781,7 +781,7 @@
}
if (!ret) {
- qWarning("Failed to stop positioning\n");
+ qWarning("Failed to stop positioning");
}
return ret;
}
@@ -789,12 +789,7 @@
void BinderLocationBackend::gnssCleanup()
{
if (m_clientGnss) {
- const int status = gbinder_client_transact_sync_oneway(m_clientGnss,
- GNSS_CLEANUP, Q_NULLPTR);
-
- if (status) {
- qWarning("Failed to cleanup\n");
- }
+ gbinder_client_transact(m_clientGnss, GNSS_CLEANUP, 0, NULL, NULL, NULL, NULL);
}
}
@@ -821,7 +816,7 @@
ret = isReplySuccess(reply);
}
if (!ret) {
- qWarning("Failed to inject location\n");
+ qWarning("Failed to inject location");
}
gbinder_local_request_unref(req);
@@ -854,7 +849,7 @@
}
if (!ret) {
- qWarning("Failed to inject time\n");
+ qWarning("Failed to inject time");
}
gbinder_local_request_unref(req);
gbinder_remote_reply_unref(reply);
@@ -869,8 +864,8 @@
req = gbinder_client_new_request(m_clientGnss);
gbinder_local_request_append_int32(req, aidingDataFlags);
- gbinder_client_transact_sync_oneway(m_clientGnss,
- GNSS_DELETE_AIDING_DATA, req);
+ gbinder_client_transact(m_clientGnss, GNSS_DELETE_AIDING_DATA,
+ 0, req, NULL, NULL, NULL);
gbinder_local_request_unref(req);
}
@@ -903,7 +898,7 @@
}
if (!ret) {
- qWarning("GNSS set position mode failed\n");
+ qWarning("GNSS set position mode failed");
}
gbinder_local_request_unref(req);
gbinder_remote_reply_unref(reply);
@@ -923,7 +918,7 @@
if (!status) {
m_remoteGnssDebug = getExtensionObject(reply);
if (m_remoteGnssDebug) {
- qWarning("Initialising GNSS Debug interface\n");
+ qWarning("Initialising GNSS Debug interface");
m_clientGnssDebug = gbinder_client_new(m_remoteGnssDebug, GNSS_DEBUG_REMOTE);
}
}
@@ -943,7 +938,7 @@
m_remoteGnssNi = getExtensionObject(reply);
if (m_remoteGnssNi) {
- qWarning("Initialising GNSS NI interface\n");
+ qWarning("Initialising GNSS NI interface");
GBinderLocalRequest *req;
m_clientGnssNi = gbinder_client_new(m_remoteGnssNi, GNSS_NI_REMOTE);
m_callbackGnssNi = gbinder_servicemanager_new_local_object
@@ -959,7 +954,7 @@
if (!status) {
if (!gbinder_remote_reply_read_int32(reply, &status) || status != 0) {
- qWarning("Initialising GNSS NI interface failed %d\n", status);
|
[-]
[+]
|
Changed |
_service:tar_git:geoclue-provider-hybris-binder-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;
@@ -515,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;
@@ -532,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);
}
}
@@ -547,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);
}
}
@@ -567,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);
}
}
@@ -626,7 +626,7 @@
{
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-binder-0.2.31.tar.gz/hybrisprovider.cpp
^
|
@@ -215,21 +215,30 @@
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";
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;
}
}
m_useForcedNtpInject = settings.value("ntp/NTP_FORCE_INJECT", "").toBool();
+ if (m_useForcedNtpInject)
+ qCDebug(lcGeoclueHybris) << "Forcing NTP injection";
- m_suplHost = settings.value("supl/SUPL_HOST", QString()).toString();
- m_suplPort = settings.value("supl/SUPL_PORT", "").toInt();
+ 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;
if (m_xtraServers.isEmpty() || m_suplHost.isEmpty() || m_suplPort == 0) {
loadDefaultsFromConfigurationFile();
@@ -249,8 +258,10 @@
m_backend->gnssDebugInit();
// Set SUPL server if provided
- if (!m_suplHost.isEmpty() && m_suplPort != 0)
- m_backend->aGnssSetServer(HYBRIS_AGNSS_TYPE_SUPL, m_suplHost.toLatin1().constData(), m_suplPort);
+ 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()
@@ -488,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";
QDBusConnection conn = QDBusConnection::sessionBus();
conn.disconnect(QString(), QString(), QStringLiteral("org.freedesktop.Geoclue.Position"),
QStringLiteral("PositionChanged"),
@@ -509,6 +522,7 @@
m_currentLocation = location;
if (m_currentLocation.timestamp() != 0 && m_currentLocation.timestamp() < GnssWeekRolloverTimestamp) {
+ qCDebug(lcGeoclueHybris) << "Fixing timestamp offset";
m_currentLocation.setTimestamp(m_currentLocation.timestamp() + GnssWeekRolloverTimestampOffset);
}
@@ -560,7 +574,7 @@
if (!(positionFields & LatitudePresent && positionFields & LongitudePresent))
return;
- qCDebug(lcGeoclueHybris) << fields << timestamp << latitude << longitude << altitude
+ qCDebug(lcGeoclueHybris) << "Injecting position" << fields << timestamp << latitude << longitude << altitude
<< accuracy.horizontal() << accuracy.vertical();
m_backend->gnssInjectLocation(latitude, longitude, accuracy.horizontal());
@@ -721,7 +735,7 @@
if (m_xtraServerIndex >= m_xtraServers.count())
return;
- qCDebug(lcGeoclueHybris) << m_xtraServers;
+ qCDebug(lcGeoclueHybris) << "XTRA servers" << m_xtraServers;
QNetworkRequest network_request(m_xtraServers[m_xtraServerIndex]);
if (!m_xtraUserAgent.isEmpty()) {
@@ -738,7 +752,7 @@
if (!m_xtraDownloadReply)
return;
- qCDebug(lcGeoclueHybris);
+ qCDebug(lcGeoclueHybris) << "XTRA download finished";
m_xtraDownloadReply->deleteLater();
@@ -771,7 +785,7 @@
Q_UNUSED(ssid)
Q_UNUSED(password)
- qCDebug(lcGeoclueHybris) << "type:" << type << "status:" << status;
+ qCDebug(lcGeoclueHybris) << "AGNSS type:" << type << "status:" << status;
if (!m_agpsEnabled) {
m_backend->aGnssDataConnFailed();
@@ -805,7 +819,7 @@
void HybrisProvider::dataServiceConnected()
{
- qCDebug(lcGeoclueHybris);
+ qCDebug(lcGeoclueHybris) << "Data service connected";
if (!m_agpsOnlineEnabled)
return;
@@ -831,7 +845,7 @@
void HybrisProvider::connectionErrorReported(const QString &path, const QString &error)
{
- qCDebug(lcGeoclueHybris) << path << error;
+ qCDebug(lcGeoclueHybris) << "Connection error" << path << error;
if (path.contains(QStringLiteral("cellular")))
m_backend->aGnssDataConnFailed();
@@ -862,7 +876,7 @@
void HybrisProvider::engineOn()
{
- qCDebug(lcGeoclueHybris);
+ qCDebug(lcGeoclueHybris) << "Engine on";
// The GPS is being turned back on because a position update is required soon.
@@ -876,7 +890,7 @@
void HybrisProvider::engineOff()
{
- qCDebug(lcGeoclueHybris);
+ qCDebug(lcGeoclueHybris) << "Engine off";
// The GPS is being turned off because a position update is not required for a while.
@@ -926,7 +940,7 @@
void HybrisProvider::connectionManagerValidChanged()
{
- qCDebug(lcGeoclueHybris);
+ qCDebug(lcGeoclueHybris) << "Connection manager valid changed";
if (m_agpsOnlineEnabled && !m_agpsInterface.isEmpty())
processConnectionContexts();
@@ -934,7 +948,7 @@
void HybrisProvider::connectionContextValidChanged()
{
- qCDebug(lcGeoclueHybris);
+ qCDebug(lcGeoclueHybris) << "Connection context valid changed";
if (!m_agpsOnlineEnabled)
return;
@@ -958,7 +972,7 @@
void HybrisProvider::cellularConnected(bool connected)
{
- qCDebug(lcGeoclueHybris) << connected;
+ qCDebug(lcGeoclueHybris) << "Cellular connected" << connected;
if (connected)
dataServiceConnected();
}
@@ -1139,7 +1153,7 @@
void HybrisProvider::startDataConnection()
{
- qCDebug(lcGeoclueHybris);
+ qCDebug(lcGeoclueHybris) << "Start data connection";
if (!m_agpsOnlineEnabled) {
qCDebug(lcGeoclueHybris) << "Online aGPS not enabled, not starting data connection.";
@@ -1169,7 +1183,7 @@
void HybrisProvider::stopDataConnection()
{
- qCDebug(lcGeoclueHybris);
+ qCDebug(lcGeoclueHybris) << "Stop data connection";
if (!m_requestedConnect)
return;
@@ -1190,7 +1204,7 @@
void HybrisProvider::sendNtpRequest()
{
- qCDebug(lcGeoclueHybris) << m_ntpServers;
+ qCDebug(lcGeoclueHybris) << "Send NTP request. Servers:" << m_ntpServers;
if (!m_agpsOnlineEnabled) {
qCDebug(lcGeoclueHybris) << "Online aGPS not enabled, not sending NTP request.";
|
[-]
[+]
|
Changed |
_service:tar_git:geoclue-provider-hybris-binder-0.2.31.tar.gz/main.cpp
^
|
@@ -56,7 +56,7 @@
supplementaryGroups[numberGroups++] = group->gr_gid;
// remove nfc, audio, radio and bluetooth groups to avoid confusion in BSP
- char *groups_to_remove[] = {"bluetooth", "radio", "audio", "nfc", NULL};
+ const char *groups_to_remove[] = {"bluetooth", "radio", "audio", "nfc", NULL};
int idx = 0;
while (groups_to_remove[idx]) {
|
[-]
[+]
|
Changed |
_service:tar_git: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,-)
|