Fix: Xtra connection initialization issue

HAL sends an empty field to Xtra when connections
is not updated.

Change-Id: I42c456581a1a968887880154f1ffffee12421354
CRs-Fixed: 2259165
This commit is contained in:
Hoss Zhou 2018-07-11 17:24:08 +08:00 committed by Gerrit - the friendly Code Review server
parent 6f17924602
commit 4bab73548d
2 changed files with 3 additions and 2 deletions

View file

@ -132,7 +132,8 @@ inline bool XtraSystemStatusObserver::onStatusRequested(int32_t xtraStatusUpdate
stringstream ss;
ss << "respondStatus" << endl;
(mGpsLock == -1 ? ss : ss << mGpsLock) << endl << mConnections << endl
(mGpsLock == -1 ? ss : ss << mGpsLock) << endl;
(mConnections == (uint64_t)~0 ? ss : ss << mConnections) << endl
<< mTac << endl << mMccmnc << endl << mIsConnectivityStatusKnown;
return ( send(LOC_IPC_XTRA, ss.str()) );

View file

@ -45,7 +45,7 @@ public :
// constructor & destructor
inline XtraSystemStatusObserver(IOsObserver* sysStatObs, const MsgTask* msgTask):
mSystemStatusObsrvr(sysStatObs), mMsgTask(msgTask),
mGpsLock(-1), mConnections(0), mXtraThrottle(true), mReqStatusReceived(false),
mGpsLock(-1), mConnections(~0), mXtraThrottle(true), mReqStatusReceived(false),
mDelayLocTimer(*this), mIsConnectivityStatusKnown (false) {
subscribe(true);
startListeningNonBlocking(LOC_IPC_HAL);