fixing conn disconnect handling from GnssLocationProvider
The "type" needs to maintain as signed, in case some value may come across as negative, even though the storage size may vary, from 8-bit to 32-bit, for example. Bug: 65164961 Change-Id: Ieb3fb4b6f8415444bbe192a7875093f86a9c3068 CRs-Fixed: 2106350
This commit is contained in:
parent
153e37d399
commit
fb4bbe52f4
7 changed files with 11 additions and 11 deletions
|
@ -51,7 +51,7 @@ Return<bool> AGnssRil::updateNetworkState(bool connected, NetworkType type, bool
|
|||
|
||||
// for XTRA
|
||||
if (nullptr != mGnss && ( nullptr != mGnss->getGnssInterface() )) {
|
||||
mGnss->getGnssInterface()->updateConnectionStatus(connected, (uint8_t)type);
|
||||
mGnss->getGnssInterface()->updateConnectionStatus(connected, (int8_t)type);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -1764,7 +1764,7 @@ bool SystemStatus::setDefaultReport(void)
|
|||
|
||||
@return true when successfully done
|
||||
******************************************************************************/
|
||||
bool SystemStatus::eventConnectionStatus(bool connected, uint8_t type)
|
||||
bool SystemStatus::eventConnectionStatus(bool connected, int8_t type)
|
||||
{
|
||||
if (connected != mConnected) {
|
||||
mConnected = connected;
|
||||
|
|
|
@ -416,7 +416,7 @@ public:
|
|||
mConnected(false),
|
||||
mRoaming(false) {}
|
||||
inline SystemStatusNetworkInfo(
|
||||
uint32_t type,
|
||||
int32_t type,
|
||||
std::string typeName,
|
||||
std::string subTypeName,
|
||||
bool available,
|
||||
|
@ -429,7 +429,7 @@ public:
|
|||
mConnected(connected),
|
||||
mRoaming(roaming) {}
|
||||
|
||||
uint32_t mType;
|
||||
int32_t mType;
|
||||
std::string mTypeName;
|
||||
std::string mSubTypeName;
|
||||
bool mAvailable;
|
||||
|
@ -635,7 +635,7 @@ public:
|
|||
bool setNmeaString(const char *data, uint32_t len);
|
||||
bool getReport(SystemStatusReports& reports, bool isLatestonly = false) const;
|
||||
bool setDefaultReport(void);
|
||||
bool eventConnectionStatus(bool connected, uint8_t type);
|
||||
bool eventConnectionStatus(bool connected, int8_t type);
|
||||
};
|
||||
|
||||
} // namespace loc_core
|
||||
|
|
|
@ -61,11 +61,11 @@ bool XtraSystemStatusObserver::updateLockStatus(uint32_t lock) {
|
|||
return ( sendEvent(ss) );
|
||||
}
|
||||
|
||||
bool XtraSystemStatusObserver::updateConnectionStatus(bool connected, uint32_t type) {
|
||||
bool XtraSystemStatusObserver::updateConnectionStatus(bool connected, int32_t type) {
|
||||
stringstream ss;
|
||||
ss << "connection";
|
||||
ss << " " << (connected ? "1" : "0");
|
||||
ss << " " << (int)type;
|
||||
ss << " " << type;
|
||||
ss << "\n"; // append seperator
|
||||
return ( sendEvent(ss) );
|
||||
}
|
||||
|
|
|
@ -114,7 +114,7 @@ public :
|
|||
#endif
|
||||
|
||||
bool updateLockStatus(uint32_t lock);
|
||||
bool updateConnectionStatus(bool connected, uint32_t type);
|
||||
bool updateConnectionStatus(bool connected, int32_t type);
|
||||
bool updateTac(const string& tac);
|
||||
bool updateMccMnc(const string& mccmnc);
|
||||
inline const MsgTask* getMsgTask() { return mMsgTask; }
|
||||
|
|
|
@ -59,7 +59,7 @@ static void agpsDataConnOpen(AGpsExtType agpsType, const char* apnName, int apnL
|
|||
static void agpsDataConnClosed(AGpsExtType agpsType);
|
||||
static void agpsDataConnFailed(AGpsExtType agpsType);
|
||||
static void getDebugReport(GnssDebugReport& report);
|
||||
static void updateConnectionStatus(bool connected, uint8_t type);
|
||||
static void updateConnectionStatus(bool connected, int8_t type);
|
||||
|
||||
static const GnssInterface gGnssInterface = {
|
||||
sizeof(GnssInterface),
|
||||
|
@ -251,7 +251,7 @@ static void getDebugReport(GnssDebugReport& report) {
|
|||
}
|
||||
}
|
||||
|
||||
static void updateConnectionStatus(bool connected, uint8_t type) {
|
||||
static void updateConnectionStatus(bool connected, int8_t type) {
|
||||
if (NULL != gGnssAdapter) {
|
||||
gGnssAdapter->getSystemStatus()->eventConnectionStatus(connected, type);
|
||||
}
|
||||
|
|
|
@ -55,7 +55,7 @@ struct GnssInterface {
|
|||
void (*agpsDataConnClosed)(AGpsExtType agpsType);
|
||||
void (*agpsDataConnFailed)(AGpsExtType agpsType);
|
||||
void (*getDebugReport)(GnssDebugReport& report);
|
||||
void (*updateConnectionStatus)(bool connected, uint8_t type);
|
||||
void (*updateConnectionStatus)(bool connected, int8_t type);
|
||||
};
|
||||
|
||||
struct FlpInterface {
|
||||
|
|
Loading…
Reference in a new issue