From e78767907457464820b999c5a401636bac80b7de Mon Sep 17 00:00:00 2001 From: Bhavna Sharma Date: Tue, 17 Oct 2017 11:10:06 -0700 Subject: [PATCH] Record the first connection status notification Keep record of whether connection status was reported and report it in the response status CRs-Fixed: 2126610 Change-Id: I284f53c71f1131a73eed0adaf00b66f04e4100ac --- gnss/XtraSystemStatusObserver.cpp | 4 +++- gnss/XtraSystemStatusObserver.h | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/gnss/XtraSystemStatusObserver.cpp b/gnss/XtraSystemStatusObserver.cpp index 7f5288b6..810e4dd8 100644 --- a/gnss/XtraSystemStatusObserver.cpp +++ b/gnss/XtraSystemStatusObserver.cpp @@ -70,6 +70,8 @@ bool XtraSystemStatusObserver::updateLockStatus(uint32_t lock) { } bool XtraSystemStatusObserver::updateConnectionStatus(bool connected, int32_t type) { + mIsConnectivityStatusKnown = true; + if (connected) { mConnections.insert(type); } else { @@ -148,7 +150,7 @@ inline bool XtraSystemStatusObserver::onStatusRequested(int32_t xtraStatusUpdate ss << "respondStatus" << endl; (mGpsLock == -1 ? ss : ss << mGpsLock) << endl << mConnections << endl - << mTac << endl << mMccmnc; + << mTac << endl << mMccmnc << endl << mIsConnectivityStatusKnown; return ( send(LOC_IPC_XTRA, ss.str()) ); } diff --git a/gnss/XtraSystemStatusObserver.h b/gnss/XtraSystemStatusObserver.h index 5a79060a..706a35bc 100644 --- a/gnss/XtraSystemStatusObserver.h +++ b/gnss/XtraSystemStatusObserver.h @@ -47,7 +47,8 @@ public : // constructor & destructor inline XtraSystemStatusObserver(IOsObserver* sysStatObs, const MsgTask* msgTask): mSystemStatusObsrvr(sysStatObs), mMsgTask(msgTask), - mGpsLock(-1), mXtraThrottle(true), mReqStatusReceived(false), mDelayLocTimer(*this) { + mGpsLock(-1), mXtraThrottle(true), mReqStatusReceived(false), mDelayLocTimer(*this), + mIsConnectivityStatusKnown (false) { subscribe(true); startListeningNonBlocking(LOC_IPC_HAL); mDelayLocTimer.start(100 /*.1 sec*/, false); @@ -80,6 +81,7 @@ private: string mMccmnc; bool mXtraThrottle; bool mReqStatusReceived; + bool mIsConnectivityStatusKnown; class DelayLocTimer : public LocTimer { XtraSystemStatusObserver& mXSSO;