summaryrefslogtreecommitdiff
path: root/core/LocApiBase.cpp
diff options
context:
space:
mode:
authorKevin Tang <zhikait@codeaurora.org>2018-05-23 16:58:16 -0700
committerKevin Tang <zhikait@codeaurora.org>2018-05-23 17:59:04 -0700
commit365919e004080bcce98968ddffcd61b2bc078a53 (patch)
tree33939303a40e6cc307c3cfc18167d3c3a9e2e0f9 /core/LocApiBase.cpp
parent8bda43ca51ab1946022e9896b0f030ad7cb7d786 (diff)
parenta0f260d23cf402f6a9065ab327315444488374a9 (diff)
downloadgps-365919e004080bcce98968ddffcd61b2bc078a53.tar.gz
location.lnx.4.0 catchup
Change-Id: I248620cfd849d39ccfb8bbd11e2cf049df889346 CRs-Fixed: 2247713
Diffstat (limited to 'core/LocApiBase.cpp')
-rw-r--r--core/LocApiBase.cpp18
1 files changed, 7 insertions, 11 deletions
diff --git a/core/LocApiBase.cpp b/core/LocApiBase.cpp
index 4b1aa28..5ec3ce6 100644
--- a/core/LocApiBase.cpp
+++ b/core/LocApiBase.cpp
@@ -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()