diff --git a/core/LocApiBase.cpp b/core/LocApiBase.cpp index 4b1aa28e..5ec3ce62 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() diff --git a/core/observer/IOsObserver.h b/core/observer/IOsObserver.h index 40d76717..f6618281 100644 --- a/core/observer/IOsObserver.h +++ b/core/observer/IOsObserver.h @@ -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 /** diff --git a/gnss/GnssAdapter.cpp b/gnss/GnssAdapter.cpp index d1636d8b..263a6338 100644 --- a/gnss/GnssAdapter.cpp +++ b/gnss/GnssAdapter.cpp @@ -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 diff --git a/location/LocationAPI.cpp b/location/LocationAPI.cpp index 0111a9c0..e43d9e03 100644 --- a/location/LocationAPI.cpp +++ b/location/LocationAPI.cpp @@ -62,6 +62,7 @@ static bool isGnssClient(LocationCallbacks& locationCallbacks) { return (locationCallbacks.gnssNiCb != nullptr || locationCallbacks.trackingCb != nullptr || + locationCallbacks.gnssLocationInfoCb != nullptr || locationCallbacks.gnssMeasurementsCb != nullptr); } diff --git a/utils/gps_extended_c.h b/utils/gps_extended_c.h index b7b1c09c..21eb5d55 100644 --- a/utils/gps_extended_c.h +++ b/utils/gps_extended_c.h @@ -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/"