location.lnx.4.0 catchup
Change-Id: I248620cfd849d39ccfb8bbd11e2cf049df889346 CRs-Fixed: 2247713
This commit is contained in:
commit
365919e004
5 changed files with 12 additions and 15 deletions
|
@ -107,19 +107,16 @@ struct LocSsrMsg : public LocMsg {
|
||||||
|
|
||||||
struct LocOpenMsg : public LocMsg {
|
struct LocOpenMsg : public LocMsg {
|
||||||
LocApiBase* mLocApi;
|
LocApiBase* mLocApi;
|
||||||
LOC_API_ADAPTER_EVENT_MASK_T mMask;
|
inline LocOpenMsg(LocApiBase* locApi) :
|
||||||
inline LocOpenMsg(LocApiBase* locApi,
|
LocMsg(), mLocApi(locApi)
|
||||||
LOC_API_ADAPTER_EVENT_MASK_T mask) :
|
|
||||||
LocMsg(), mLocApi(locApi), mMask(mask)
|
|
||||||
{
|
{
|
||||||
locallog();
|
locallog();
|
||||||
}
|
}
|
||||||
inline virtual void proc() const {
|
inline virtual void proc() const {
|
||||||
mLocApi->open(mMask);
|
mLocApi->open(mLocApi->getEvtMask());
|
||||||
}
|
}
|
||||||
inline void locallog() const {
|
inline void locallog() const {
|
||||||
LOC_LOGV("%s:%d]: LocOpen Mask: %" PRIu64 "\n",
|
LOC_LOGv("LocOpen Mask: %" PRIx64 "\n", mLocApi->getEvtMask());
|
||||||
__func__, __LINE__, mMask);
|
|
||||||
}
|
}
|
||||||
inline virtual void log() const {
|
inline virtual void log() const {
|
||||||
locallog();
|
locallog();
|
||||||
|
@ -185,8 +182,7 @@ void LocApiBase::addAdapter(LocAdapterBase* adapter)
|
||||||
for (int i = 0; i < MAX_ADAPTERS && mLocAdapters[i] != adapter; i++) {
|
for (int i = 0; i < MAX_ADAPTERS && mLocAdapters[i] != adapter; i++) {
|
||||||
if (mLocAdapters[i] == NULL) {
|
if (mLocAdapters[i] == NULL) {
|
||||||
mLocAdapters[i] = adapter;
|
mLocAdapters[i] = adapter;
|
||||||
mMsgTask->sendMsg(new LocOpenMsg(this,
|
mMsgTask->sendMsg(new LocOpenMsg(this));
|
||||||
mMask | adapter->getEvtMask()));
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -222,7 +218,7 @@ void LocApiBase::removeAdapter(LocAdapterBase* adapter)
|
||||||
mMsgTask->sendMsg(new LocCloseMsg(this));
|
mMsgTask->sendMsg(new LocCloseMsg(this));
|
||||||
} else {
|
} else {
|
||||||
// else we need to remove the bit
|
// else we need to remove the bit
|
||||||
mMsgTask->sendMsg(new LocOpenMsg(this, getEvtMask()));
|
mMsgTask->sendMsg(new LocOpenMsg(this));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -230,7 +226,7 @@ void LocApiBase::removeAdapter(LocAdapterBase* adapter)
|
||||||
|
|
||||||
void LocApiBase::updateEvtMask()
|
void LocApiBase::updateEvtMask()
|
||||||
{
|
{
|
||||||
mMsgTask->sendMsg(new LocOpenMsg(this, getEvtMask()));
|
mMsgTask->sendMsg(new LocOpenMsg(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
void LocApiBase::handleEngineUpEvent()
|
void LocApiBase::handleEngineUpEvent()
|
||||||
|
|
|
@ -91,8 +91,8 @@ public:
|
||||||
inline virtual void turnOn (DataItemId /*dit*/, int /*timeOut*/){}
|
inline virtual void turnOn (DataItemId /*dit*/, int /*timeOut*/){}
|
||||||
inline virtual void turnOff (DataItemId /*dit*/) {}
|
inline virtual void turnOff (DataItemId /*dit*/) {}
|
||||||
#ifdef USE_GLIB
|
#ifdef USE_GLIB
|
||||||
inline virtual bool connectBackhaul() {}
|
inline virtual bool connectBackhaul() { return false; }
|
||||||
inline virtual bool disconnectBackhaul() {}
|
inline virtual bool disconnectBackhaul() { return false; }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (c) 2017-2018, The Linux Foundation. All rights reserved.
|
/* Copyright (c) 2017, The Linux Foundation. All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are
|
* modification, are permitted provided that the following conditions are
|
||||||
|
|
|
@ -62,6 +62,7 @@ static bool isGnssClient(LocationCallbacks& locationCallbacks)
|
||||||
{
|
{
|
||||||
return (locationCallbacks.gnssNiCb != nullptr ||
|
return (locationCallbacks.gnssNiCb != nullptr ||
|
||||||
locationCallbacks.trackingCb != nullptr ||
|
locationCallbacks.trackingCb != nullptr ||
|
||||||
|
locationCallbacks.gnssLocationInfoCb != nullptr ||
|
||||||
locationCallbacks.gnssMeasurementsCb != nullptr);
|
locationCallbacks.gnssMeasurementsCb != nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1495,7 +1495,7 @@ typedef void (*LocAgpsCloseResultCb)(bool isSuccess, AGpsExtType agpsType, void*
|
||||||
#define LOC_IPC_XTRA "/dev/socket/location/xtra/socket_xtra"
|
#define LOC_IPC_XTRA "/dev/socket/location/xtra/socket_xtra"
|
||||||
|
|
||||||
#define SOCKET_DIR_LOCATION "/dev/socket/location/"
|
#define SOCKET_DIR_LOCATION "/dev/socket/location/"
|
||||||
#define SOCKET_DIR_EHUB "/dev/socket/location/ehub"
|
#define SOCKET_DIR_EHUB "/dev/socket/location/ehub/"
|
||||||
#define SOCKET_TO_LOCATION_HAL_DAEMON "/dev/socket/location/hal_daemon"
|
#define SOCKET_TO_LOCATION_HAL_DAEMON "/dev/socket/location/hal_daemon"
|
||||||
|
|
||||||
#define SOCKET_DIR_TO_CLIENT "/dev/socket/loc_client/"
|
#define SOCKET_DIR_TO_CLIENT "/dev/socket/loc_client/"
|
||||||
|
|
Loading…
Reference in a new issue