sm6150-common: gps: Reorder initializations list to satisfy warnings
-Wreorder-ctor is a compile-time, Clang-only flag which is enabled by default since Clang 12, which will warn whenever a specified field will be initialized right after field specified below it. However, since it doesn't sweep through all fields, compiler may miss some of them. This order has been checked thoroughly through many trial and errors to ensure that no such warns will be triggered anymore. Change-Id: Id24cbb7277dc8d6c02767f8f365818ab6c017683
This commit is contained in:
parent
15a7ec7e32
commit
3ac812ed09
@ -45,10 +45,10 @@ LocAdapterBase::LocAdapterBase(const LOC_API_ADAPTER_EVENT_MASK_T mask,
|
|||||||
ContextBase* context, bool isMaster,
|
ContextBase* context, bool isMaster,
|
||||||
LocAdapterProxyBase *adapterProxyBase,
|
LocAdapterProxyBase *adapterProxyBase,
|
||||||
bool waitForDoneInit) :
|
bool waitForDoneInit) :
|
||||||
mIsMaster(isMaster), mEvtMask(mask), mContext(context),
|
mIsMaster(isMaster),
|
||||||
mLocApi(context->getLocApi()), mLocAdapterProxyBase(adapterProxyBase),
|
mIsEngineCapabilitiesKnown(ContextBase::sIsEngineCapabilitiesKnown),
|
||||||
mMsgTask(context->getMsgTask()),
|
mEvtMask(mask), mContext(context), mLocApi(context->getLocApi()),
|
||||||
mIsEngineCapabilitiesKnown(ContextBase::sIsEngineCapabilitiesKnown)
|
mLocAdapterProxyBase(adapterProxyBase), mMsgTask(context->getMsgTask())
|
||||||
{
|
{
|
||||||
LOC_LOGd("waitForDoneInit: %d", waitForDoneInit);
|
LOC_LOGd("waitForDoneInit: %d", waitForDoneInit);
|
||||||
if (!waitForDoneInit) {
|
if (!waitForDoneInit) {
|
||||||
|
@ -293,7 +293,7 @@ public:
|
|||||||
mConnected(connected),
|
mConnected(connected),
|
||||||
mRoaming(roaming),
|
mRoaming(roaming),
|
||||||
mNetworkHandle(networkHandle),
|
mNetworkHandle(networkHandle),
|
||||||
mId(NETWORKINFO_DATA_ITEM_ID), mApn(apn) {
|
mApn(apn), mId(NETWORKINFO_DATA_ITEM_ID) {
|
||||||
mAllNetworkHandles[0].networkHandle = networkHandle;
|
mAllNetworkHandles[0].networkHandle = networkHandle;
|
||||||
mAllNetworkHandles[0].networkType = initialType;
|
mAllNetworkHandles[0].networkType = initialType;
|
||||||
}
|
}
|
||||||
|
@ -157,9 +157,9 @@ private:
|
|||||||
public:
|
public:
|
||||||
/* CONSTRUCTOR */
|
/* CONSTRUCTOR */
|
||||||
AgpsStateMachine(AgpsManager* agpsManager, AGpsExtType agpsType):
|
AgpsStateMachine(AgpsManager* agpsManager, AGpsExtType agpsType):
|
||||||
mFrameworkStatusV4Cb(NULL),
|
|
||||||
mAgpsManager(agpsManager), mSubscriberList(),
|
mAgpsManager(agpsManager), mSubscriberList(),
|
||||||
mCurrentSubscriber(NULL), mState(AGPS_STATE_RELEASED),
|
mCurrentSubscriber(NULL), mState(AGPS_STATE_RELEASED),
|
||||||
|
mFrameworkStatusV4Cb(NULL),
|
||||||
mAgpsType(agpsType), mAPN(NULL), mAPNLen(0),
|
mAgpsType(agpsType), mAPN(NULL), mAPNLen(0),
|
||||||
mBearer(AGPS_APN_BEARER_INVALID) {};
|
mBearer(AGPS_APN_BEARER_INVALID) {};
|
||||||
|
|
||||||
|
@ -94,15 +94,13 @@ GnssAdapter::GnssAdapter() :
|
|||||||
LocContext::getLocContext(LocContext::mLocationHalName),
|
LocContext::getLocContext(LocContext::mLocationHalName),
|
||||||
true, nullptr, true),
|
true, nullptr, true),
|
||||||
mEngHubProxy(new EngineHubProxyBase()),
|
mEngHubProxy(new EngineHubProxyBase()),
|
||||||
mQDgnssListenerHDL(nullptr),
|
|
||||||
mCdfwInterface(nullptr),
|
|
||||||
mDGnssNeedReport(false),
|
|
||||||
mDGnssDataUsage(false),
|
|
||||||
mLocPositionMode(),
|
|
||||||
mNHzNeeded(false),
|
mNHzNeeded(false),
|
||||||
mSPEAlreadyRunningAtHighestInterval(false),
|
mSPEAlreadyRunningAtHighestInterval(false),
|
||||||
|
mLocPositionMode(),
|
||||||
mGnssSvIdUsedInPosition(),
|
mGnssSvIdUsedInPosition(),
|
||||||
mGnssSvIdUsedInPosAvail(false),
|
mGnssSvIdUsedInPosAvail(false),
|
||||||
|
mGnssMbSvIdUsedInPosition{},
|
||||||
|
mGnssMbSvIdUsedInPosAvail(false),
|
||||||
mControlCallbacks(),
|
mControlCallbacks(),
|
||||||
mAfwControlId(0),
|
mAfwControlId(0),
|
||||||
mNmeaMask(0),
|
mNmeaMask(0),
|
||||||
@ -110,37 +108,39 @@ GnssAdapter::GnssAdapter() :
|
|||||||
mGnssSeconaryBandConfig(),
|
mGnssSeconaryBandConfig(),
|
||||||
mGnssSvTypeConfig(),
|
mGnssSvTypeConfig(),
|
||||||
mGnssSvTypeConfigCb(nullptr),
|
mGnssSvTypeConfigCb(nullptr),
|
||||||
|
mSupportNfwControl(true),
|
||||||
mLocConfigInfo{},
|
mLocConfigInfo{},
|
||||||
mNiData(),
|
mNiData(),
|
||||||
mAgpsManager(),
|
mAgpsManager(),
|
||||||
|
mNfwCb(NULL),
|
||||||
|
mIsE911Session(NULL),
|
||||||
|
mIsMeasCorrInterfaceOpen(false),
|
||||||
|
mIsAntennaInfoInterfaceOpened(false),
|
||||||
|
mQDgnssListenerHDL(nullptr),
|
||||||
|
mCdfwInterface(nullptr),
|
||||||
|
mDGnssNeedReport(false),
|
||||||
|
mDGnssDataUsage(false),
|
||||||
mOdcpiRequestCb(nullptr),
|
mOdcpiRequestCb(nullptr),
|
||||||
mOdcpiRequestActive(false),
|
mOdcpiRequestActive(false),
|
||||||
|
mCallbackPriority(OdcpiPrioritytype::ODCPI_HANDLER_PRIORITY_LOW),
|
||||||
mOdcpiTimer(this),
|
mOdcpiTimer(this),
|
||||||
mOdcpiRequest(),
|
mOdcpiRequest(),
|
||||||
mCallbackPriority(OdcpiPrioritytype::ODCPI_HANDLER_PRIORITY_LOW),
|
mLastDeleteAidingDataTime(0),
|
||||||
mSystemStatus(SystemStatus::getInstance(mMsgTask)),
|
mSystemStatus(SystemStatus::getInstance(mMsgTask)),
|
||||||
mServerUrl(":"),
|
mServerUrl(":"),
|
||||||
mXtraObserver(mSystemStatus->getOsObserver(), mMsgTask),
|
mXtraObserver(mSystemStatus->getOsObserver(), mMsgTask),
|
||||||
mBlockCPIInfo{},
|
|
||||||
mDreIntEnabled(false),
|
|
||||||
mLocSystemInfo{},
|
mLocSystemInfo{},
|
||||||
mNfwCb(NULL),
|
mSystemPowerState(POWER_STATE_UNKNOWN),
|
||||||
|
mBlockCPIInfo{},
|
||||||
mPowerOn(false),
|
mPowerOn(false),
|
||||||
mAllowFlpNetworkFixes(0),
|
mAllowFlpNetworkFixes(0),
|
||||||
|
mDreIntEnabled(false),
|
||||||
|
mNativeAgpsHandler(mSystemStatus->getOsObserver(), *this),
|
||||||
mGnssEnergyConsumedCb(nullptr),
|
mGnssEnergyConsumedCb(nullptr),
|
||||||
mPowerStateCb(nullptr),
|
mPowerStateCb(nullptr),
|
||||||
mIsE911Session(NULL),
|
|
||||||
mGnssMbSvIdUsedInPosition{},
|
|
||||||
mGnssMbSvIdUsedInPosAvail(false),
|
|
||||||
mSupportNfwControl(true),
|
|
||||||
mSystemPowerState(POWER_STATE_UNKNOWN),
|
|
||||||
mIsMeasCorrInterfaceOpen(false),
|
|
||||||
mIsAntennaInfoInterfaceOpened(false),
|
|
||||||
mLastDeleteAidingDataTime(0),
|
|
||||||
mDgnssState(0),
|
|
||||||
mSendNmeaConsent(false),
|
mSendNmeaConsent(false),
|
||||||
mDgnssLastNmeaBootTimeMilli(0),
|
mDgnssState(0),
|
||||||
mNativeAgpsHandler(mSystemStatus->getOsObserver(), *this)
|
mDgnssLastNmeaBootTimeMilli(0)
|
||||||
{
|
{
|
||||||
LOC_LOGD("%s]: Constructor %p", __func__, this);
|
LOC_LOGD("%s]: Constructor %p", __func__, this);
|
||||||
mLocPositionMode.mode = LOC_POSITION_MODE_INVALID;
|
mLocPositionMode.mode = LOC_POSITION_MODE_INVALID;
|
||||||
@ -1570,8 +1570,8 @@ GnssAdapter::gnssGetConfigCommand(GnssConfigFlagsMask configMask) {
|
|||||||
mAdapter(adapter),
|
mAdapter(adapter),
|
||||||
mApi(api),
|
mApi(api),
|
||||||
mConfigMask(configMask),
|
mConfigMask(configMask),
|
||||||
mCount(count),
|
mIds(nullptr),
|
||||||
mIds(nullptr) {
|
mCount(count) {
|
||||||
if (mCount > 0) {
|
if (mCount > 0) {
|
||||||
mIds = new uint32_t[count];
|
mIds = new uint32_t[count];
|
||||||
if (mIds) {
|
if (mIds) {
|
||||||
@ -4064,8 +4064,8 @@ GnssAdapter::reportLatencyInfoEvent(const GnssLatencyInfo& gnssLatencyInfo)
|
|||||||
GnssLatencyInfo mGnssLatencyInfo;
|
GnssLatencyInfo mGnssLatencyInfo;
|
||||||
inline MsgReportLatencyInfo(GnssAdapter& adapter,
|
inline MsgReportLatencyInfo(GnssAdapter& adapter,
|
||||||
const GnssLatencyInfo& gnssLatencyInfo) :
|
const GnssLatencyInfo& gnssLatencyInfo) :
|
||||||
mGnssLatencyInfo(gnssLatencyInfo),
|
mAdapter(adapter),
|
||||||
mAdapter(adapter) {}
|
mGnssLatencyInfo(gnssLatencyInfo) {}
|
||||||
inline virtual void proc() const {
|
inline virtual void proc() const {
|
||||||
mAdapter.mGnssLatencyInfoQueue.push(mGnssLatencyInfo);
|
mAdapter.mGnssLatencyInfoQueue.push(mGnssLatencyInfo);
|
||||||
LOC_LOGv("mGnssLatencyInfoQueue.size after push=%zu",
|
LOC_LOGv("mGnssLatencyInfoQueue.size after push=%zu",
|
||||||
@ -5238,9 +5238,9 @@ void GnssAdapter::reportPdnTypeFromWds(int pdnType, AGpsExtType agpsType, std::s
|
|||||||
inline MsgReportAtlPdn(GnssAdapter& adapter, int pdnType,
|
inline MsgReportAtlPdn(GnssAdapter& adapter, int pdnType,
|
||||||
AgpsManager* agpsManager, AGpsExtType agpsType,
|
AgpsManager* agpsManager, AGpsExtType agpsType,
|
||||||
const string& apnName, AGpsBearerType bearerType) :
|
const string& apnName, AGpsBearerType bearerType) :
|
||||||
LocMsg(), mAgpsManager(agpsManager), mAgpsType(agpsType),
|
LocMsg(), mAdapter(adapter), mPdnType(pdnType),
|
||||||
mApnName(apnName), mBearerType(bearerType),
|
mAgpsManager(agpsManager), mAgpsType(agpsType),
|
||||||
mAdapter(adapter), mPdnType(pdnType) {}
|
mApnName(apnName), mBearerType(bearerType) {}
|
||||||
inline virtual void proc() const {
|
inline virtual void proc() const {
|
||||||
mAgpsManager->reportAtlOpenSuccess(mAgpsType,
|
mAgpsManager->reportAtlOpenSuccess(mAgpsType,
|
||||||
const_cast<char*>(mApnName.c_str()),
|
const_cast<char*>(mApnName.c_str()),
|
||||||
@ -5269,8 +5269,8 @@ void GnssAdapter::dataConnOpenCommand(
|
|||||||
|
|
||||||
inline AgpsMsgAtlOpenSuccess(GnssAdapter& adapter, AgpsManager* agpsManager,
|
inline AgpsMsgAtlOpenSuccess(GnssAdapter& adapter, AgpsManager* agpsManager,
|
||||||
AGpsExtType agpsType, const char* apnName, int apnLen, AGpsBearerType bearerType) :
|
AGpsExtType agpsType, const char* apnName, int apnLen, AGpsBearerType bearerType) :
|
||||||
LocMsg(), mAgpsManager(agpsManager), mAgpsType(agpsType), mApnName(
|
LocMsg(), mAdapter(adapter), mAgpsManager(agpsManager), mAgpsType(agpsType),
|
||||||
new char[apnLen + 1]), mBearerType(bearerType), mAdapter(adapter) {
|
mApnName(new char[apnLen + 1]), mBearerType(bearerType) {
|
||||||
|
|
||||||
LOC_LOGV("AgpsMsgAtlOpenSuccess");
|
LOC_LOGV("AgpsMsgAtlOpenSuccess");
|
||||||
if (mApnName == nullptr) {
|
if (mApnName == nullptr) {
|
||||||
|
Loading…
Reference in New Issue
Block a user