diff options
author | Nilesh Gharde <quic_ngharde@quicinc.com> | 2022-04-20 11:43:34 +0530 |
---|---|---|
committer | Nilesh Gharde <quic_ngharde@quicinc.com> | 2022-04-20 11:43:34 +0530 |
commit | bce161567a26c345a73fb58f44d43d0378a954f4 (patch) | |
tree | 7eca0ed42abc0c8a38b6e89f26251b0e92b2b75f | |
parent | 7ca3a83b2d1c047326a6d5e4047a881e18aab5a0 (diff) |
Report Debug data outside active gnss session
Added change to allow AFW to get debug report
outside active gnss session. For Location sdk
we continue to follow same logic where we
send out the debug data if there is active
gnss session.
Change-Id: I700e8b64fc39f4ddc8e824325cc3473f4d0c8883
CRs-fixed: 3167624
-rw-r--r-- | core/SystemStatus.cpp | 5 | ||||
-rw-r--r-- | core/SystemStatus.h | 3 | ||||
-rw-r--r-- | gnss/GnssAdapter.cpp | 6 |
3 files changed, 8 insertions, 6 deletions
diff --git a/core/SystemStatus.cpp b/core/SystemStatus.cpp index f206b00..82f1314 100644 --- a/core/SystemStatus.cpp +++ b/core/SystemStatus.cpp @@ -1602,9 +1602,10 @@ bool SystemStatus::eventDataItemNotify(IDataItemCore* dataitem) @return true when successfully done ******************************************************************************/ -bool SystemStatus::getReport(SystemStatusReports& report, bool isLatestOnly) const { +bool SystemStatus::getReport(SystemStatusReports& report, bool isLatestOnly, + bool inSessionOnly) const { pthread_mutex_lock(&mMutexSystemStatus); - if (!mTracking) { + if (inSessionOnly && !mTracking) { pthread_mutex_unlock(&mMutexSystemStatus); return true; } diff --git a/core/SystemStatus.h b/core/SystemStatus.h index 78d58ea..1e155c1 100644 --- a/core/SystemStatus.h +++ b/core/SystemStatus.h @@ -887,7 +887,8 @@ public: bool eventPosition(const UlpLocation& location,const GpsLocationExtended& locationEx); bool eventDataItemNotify(IDataItemCore* dataitem); bool setNmeaString(const char *data, uint32_t len); - bool getReport(SystemStatusReports& reports, bool isLatestonly = false) const; + bool getReport(SystemStatusReports& reports, bool isLatestonly = false, + bool inSessionOnly = true) const; bool setDefaultGnssEngineStates(void); bool eventConnectionStatus(bool connected, int8_t type, bool roaming, NetworkHandle networkHandle, string& apn); diff --git a/gnss/GnssAdapter.cpp b/gnss/GnssAdapter.cpp index a39d0b3..6e6d608 100644 --- a/gnss/GnssAdapter.cpp +++ b/gnss/GnssAdapter.cpp @@ -5875,7 +5875,7 @@ bool GnssAdapter::getDebugReport(GnssDebugReport& r) } SystemStatusReports reports; - systemstatus->getReport(reports, true); + systemstatus->getReport(reports, true, false); r.size = sizeof(r); @@ -5982,7 +5982,7 @@ GnssAdapter::getAgcInformation(GnssMeasurementsNotification& measurements, int m if (nullptr != systemstatus) { SystemStatusReports reports = {}; - systemstatus->getReport(reports, true); + systemstatus->getReport(reports, true, false); if ((!reports.mRfAndParams.empty()) && (!reports.mTimeAndClock.empty()) && (abs(msInWeek - (int)reports.mTimeAndClock.back().mGpsTowMs) < 2000)) { @@ -6037,7 +6037,7 @@ GnssAdapter::getDataInformation(GnssDataNotification& data, int msInWeek) LOC_LOGV("%s]: msInWeek=%d", __func__, msInWeek); if (nullptr != systemstatus) { SystemStatusReports reports = {}; - systemstatus->getReport(reports, true); + systemstatus->getReport(reports, true, false); if ((!reports.mRfAndParams.empty()) && (!reports.mTimeAndClock.empty()) && (abs(msInWeek - (int)reports.mTimeAndClock.back().mGpsTowMs) < 2000)) { |