location.lnx.4.0 catchup

Change-Id: I248620cfd849d39ccfb8bbd11e2cf049df889346
CRs-Fixed: 2247713
This commit is contained in:
Kevin Tang 2018-05-23 16:58:16 -07:00
commit 365919e004
5 changed files with 12 additions and 15 deletions

View file

@ -107,19 +107,16 @@ struct LocSsrMsg : public LocMsg {
struct LocOpenMsg : public LocMsg {
LocApiBase* mLocApi;
LOC_API_ADAPTER_EVENT_MASK_T mMask;
inline LocOpenMsg(LocApiBase* locApi,
LOC_API_ADAPTER_EVENT_MASK_T mask) :
LocMsg(), mLocApi(locApi), mMask(mask)
inline LocOpenMsg(LocApiBase* locApi) :
LocMsg(), mLocApi(locApi)
{
locallog();
}
inline virtual void proc() const {
mLocApi->open(mMask);
mLocApi->open(mLocApi->getEvtMask());
}
inline void locallog() const {
LOC_LOGV("%s:%d]: LocOpen Mask: %" PRIu64 "\n",
__func__, __LINE__, mMask);
LOC_LOGv("LocOpen Mask: %" PRIx64 "\n", mLocApi->getEvtMask());
}
inline virtual void log() const {
locallog();
@ -185,8 +182,7 @@ void LocApiBase::addAdapter(LocAdapterBase* adapter)
for (int i = 0; i < MAX_ADAPTERS && mLocAdapters[i] != adapter; i++) {
if (mLocAdapters[i] == NULL) {
mLocAdapters[i] = adapter;
mMsgTask->sendMsg(new LocOpenMsg(this,
mMask | adapter->getEvtMask()));
mMsgTask->sendMsg(new LocOpenMsg(this));
break;
}
}
@ -222,7 +218,7 @@ void LocApiBase::removeAdapter(LocAdapterBase* adapter)
mMsgTask->sendMsg(new LocCloseMsg(this));
} else {
// 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()
{
mMsgTask->sendMsg(new LocOpenMsg(this, getEvtMask()));
mMsgTask->sendMsg(new LocOpenMsg(this));
}
void LocApiBase::handleEngineUpEvent()

View file

@ -91,8 +91,8 @@ public:
inline virtual void turnOn (DataItemId /*dit*/, int /*timeOut*/){}
inline virtual void turnOff (DataItemId /*dit*/) {}
#ifdef USE_GLIB
inline virtual bool connectBackhaul() {}
inline virtual bool disconnectBackhaul() {}
inline virtual bool connectBackhaul() { return false; }
inline virtual bool disconnectBackhaul() { return false; }
#endif
/**

View file

@ -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
* modification, are permitted provided that the following conditions are

View file

@ -62,6 +62,7 @@ static bool isGnssClient(LocationCallbacks& locationCallbacks)
{
return (locationCallbacks.gnssNiCb != nullptr ||
locationCallbacks.trackingCb != nullptr ||
locationCallbacks.gnssLocationInfoCb != nullptr ||
locationCallbacks.gnssMeasurementsCb != nullptr);
}

View file

@ -1495,7 +1495,7 @@ typedef void (*LocAgpsCloseResultCb)(bool isSuccess, AGpsExtType agpsType, void*
#define LOC_IPC_XTRA "/dev/socket/location/xtra/socket_xtra"
#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_DIR_TO_CLIENT "/dev/socket/loc_client/"