From e8042e98d2b4a1326d374b98076537cc54665f01 Mon Sep 17 00:00:00 2001 From: Luca Stefani Date: Fri, 2 Sep 2016 10:54:33 +0200 Subject: [PATCH] land: gps: Hack to build with N AOSP now has a conflicting GnssSvStatus struct. Rename the one in the GPS HAL to QcomSvStatus. Change-Id: Ie79c5471423ce0d39e34f1dd0a3e71d9edb016b0 --- gps/core/LocAdapterBase.cpp | 2 +- gps/core/LocAdapterBase.h | 2 +- gps/core/LocApiBase.cpp | 2 +- gps/core/LocApiBase.h | 2 +- gps/core/UlpProxyBase.h | 2 +- gps/core/gps_extended_c.h | 4 ++-- gps/loc_api/libloc_api_50001/LocEngAdapter.cpp | 4 ++-- gps/loc_api/libloc_api_50001/LocEngAdapter.h | 4 ++-- gps/loc_api/libloc_api_50001/loc_eng.cpp | 2 +- gps/loc_api/libloc_api_50001/loc_eng_msg.h | 4 ++-- gps/loc_api/libloc_api_50001/loc_eng_nmea.cpp | 2 +- gps/loc_api/libloc_api_50001/loc_eng_nmea.h | 2 +- 12 files changed, 16 insertions(+), 16 deletions(-) diff --git a/gps/core/LocAdapterBase.cpp b/gps/core/LocAdapterBase.cpp index 8fdb8cb..fbd077a 100644 --- a/gps/core/LocAdapterBase.cpp +++ b/gps/core/LocAdapterBase.cpp @@ -80,7 +80,7 @@ void LocAdapterBase:: } void LocAdapterBase:: - reportSv(GnssSvStatus &svStatus, + reportSv(QcomSvStatus &svStatus, GpsLocationExtended &locationExtended, void* svExt) DEFAULT_IMPL() diff --git a/gps/core/LocAdapterBase.h b/gps/core/LocAdapterBase.h index 5f4660b..d3adfe9 100644 --- a/gps/core/LocAdapterBase.h +++ b/gps/core/LocAdapterBase.h @@ -92,7 +92,7 @@ public: void* locationExt, enum loc_sess_status status, LocPosTechMask loc_technology_mask); - virtual void reportSv(GnssSvStatus &svStatus, + virtual void reportSv(QcomSvStatus &svStatus, GpsLocationExtended &locationExtended, void* svExt); virtual void reportStatus(GpsStatusValue status); diff --git a/gps/core/LocApiBase.cpp b/gps/core/LocApiBase.cpp index dcd35fe..8247d0a 100644 --- a/gps/core/LocApiBase.cpp +++ b/gps/core/LocApiBase.cpp @@ -253,7 +253,7 @@ void LocApiBase::reportPosition(UlpLocation &location, ); } -void LocApiBase::reportSv(GnssSvStatus &svStatus, +void LocApiBase::reportSv(QcomSvStatus &svStatus, GpsLocationExtended &locationExtended, void* svExt) { diff --git a/gps/core/LocApiBase.h b/gps/core/LocApiBase.h index b1c3d30..9ea5560 100644 --- a/gps/core/LocApiBase.h +++ b/gps/core/LocApiBase.h @@ -113,7 +113,7 @@ public: enum loc_sess_status status, LocPosTechMask loc_technology_mask = LOC_POS_TECH_MASK_DEFAULT); - void reportSv(GnssSvStatus &svStatus, + void reportSv(QcomSvStatus &svStatus, GpsLocationExtended &locationExtended, void* svExt); void reportStatus(GpsStatusValue status); diff --git a/gps/core/UlpProxyBase.h b/gps/core/UlpProxyBase.h index efcf98a..3db0837 100644 --- a/gps/core/UlpProxyBase.h +++ b/gps/core/UlpProxyBase.h @@ -61,7 +61,7 @@ public: LocPosTechMask loc_technology_mask) { return false; } - inline virtual bool reportSv(GnssSvStatus &svStatus, + inline virtual bool reportSv(QcomSvStatus &svStatus, GpsLocationExtended &locationExtended, void* svExt) { return false; diff --git a/gps/core/gps_extended_c.h b/gps/core/gps_extended_c.h index 9b73fd5..4d2fc97 100644 --- a/gps/core/gps_extended_c.h +++ b/gps/core/gps_extended_c.h @@ -268,7 +268,7 @@ typedef struct { /** Represents SV status. */ typedef struct { - /** set to sizeof(GnssSvStatus) */ + /** set to sizeof(QcomSvStatus) */ size_t size; /** Number of SVs currently visible. */ @@ -305,7 +305,7 @@ typedef struct { */ uint64_t bds_used_in_fix_mask; -} GnssSvStatus; +} QcomSvStatus; enum loc_sess_status { LOC_SESS_SUCCESS, diff --git a/gps/loc_api/libloc_api_50001/LocEngAdapter.cpp b/gps/loc_api/libloc_api_50001/LocEngAdapter.cpp index e0f21ec..d721ee4 100644 --- a/gps/loc_api/libloc_api_50001/LocEngAdapter.cpp +++ b/gps/loc_api/libloc_api_50001/LocEngAdapter.cpp @@ -377,14 +377,14 @@ void LocEngAdapter::reportPosition(UlpLocation &location, } } -void LocInternalAdapter::reportSv(GnssSvStatus &svStatus, +void LocInternalAdapter::reportSv(QcomSvStatus &svStatus, GpsLocationExtended &locationExtended, void* svExt){ sendMsg(new LocEngReportSv(mLocEngAdapter, svStatus, locationExtended, svExt)); } -void LocEngAdapter::reportSv(GnssSvStatus &svStatus, +void LocEngAdapter::reportSv(QcomSvStatus &svStatus, GpsLocationExtended &locationExtended, void* svExt) { diff --git a/gps/loc_api/libloc_api_50001/LocEngAdapter.h b/gps/loc_api/libloc_api_50001/LocEngAdapter.h index a193e81..8964ede 100644 --- a/gps/loc_api/libloc_api_50001/LocEngAdapter.h +++ b/gps/loc_api/libloc_api_50001/LocEngAdapter.h @@ -55,7 +55,7 @@ public: void* locationExt, enum loc_sess_status status, LocPosTechMask loc_technology_mask); - virtual void reportSv(GnssSvStatus &svStatus, + virtual void reportSv(QcomSvStatus &svStatus, GpsLocationExtended &locationExtended, void* svExt); virtual void reportStatus(GpsStatusValue status); @@ -269,7 +269,7 @@ public: void* locationExt, enum loc_sess_status status, LocPosTechMask loc_technology_mask); - virtual void reportSv(GnssSvStatus &svStatus, + virtual void reportSv(QcomSvStatus &svStatus, GpsLocationExtended &locationExtended, void* svExt); virtual void reportStatus(GpsStatusValue status); diff --git a/gps/loc_api/libloc_api_50001/loc_eng.cpp b/gps/loc_api/libloc_api_50001/loc_eng.cpp index d2fc5bc..0cda332 100644 --- a/gps/loc_api/libloc_api_50001/loc_eng.cpp +++ b/gps/loc_api/libloc_api_50001/loc_eng.cpp @@ -828,7 +828,7 @@ void LocEngReportPosition::send() const { // case LOC_ENG_MSG_REPORT_SV: LocEngReportSv::LocEngReportSv(LocAdapterBase* adapter, - GnssSvStatus &sv, + QcomSvStatus &sv, GpsLocationExtended &locExtended, void* svExt) : LocMsg(), mAdapter(adapter), mSvStatus(sv), diff --git a/gps/loc_api/libloc_api_50001/loc_eng_msg.h b/gps/loc_api/libloc_api_50001/loc_eng_msg.h index 9c7b9bc..73a71c0 100644 --- a/gps/loc_api/libloc_api_50001/loc_eng_msg.h +++ b/gps/loc_api/libloc_api_50001/loc_eng_msg.h @@ -105,11 +105,11 @@ struct LocEngReportPosition : public LocMsg { struct LocEngReportSv : public LocMsg { LocAdapterBase* mAdapter; - const GnssSvStatus mSvStatus; + const QcomSvStatus mSvStatus; const GpsLocationExtended mLocationExtended; const void* mSvExt; LocEngReportSv(LocAdapterBase* adapter, - GnssSvStatus &sv, + QcomSvStatus &sv, GpsLocationExtended &locExtended, void* svExtended); virtual void proc() const; diff --git a/gps/loc_api/libloc_api_50001/loc_eng_nmea.cpp b/gps/loc_api/libloc_api_50001/loc_eng_nmea.cpp index b0e548c..239c6d1 100644 --- a/gps/loc_api/libloc_api_50001/loc_eng_nmea.cpp +++ b/gps/loc_api/libloc_api_50001/loc_eng_nmea.cpp @@ -604,7 +604,7 @@ SIDE EFFECTS ===========================================================================*/ void loc_eng_nmea_generate_sv(loc_eng_data_s_type *loc_eng_data_p, - const GnssSvStatus &svStatus, const GpsLocationExtended &locationExtended) + const QcomSvStatus &svStatus, const GpsLocationExtended &locationExtended) { ENTRY_LOG(); diff --git a/gps/loc_api/libloc_api_50001/loc_eng_nmea.h b/gps/loc_api/libloc_api_50001/loc_eng_nmea.h index 066943a..2563a8f 100644 --- a/gps/loc_api/libloc_api_50001/loc_eng_nmea.h +++ b/gps/loc_api/libloc_api_50001/loc_eng_nmea.h @@ -37,7 +37,7 @@ void loc_eng_nmea_send(char *pNmea, int length, loc_eng_data_s_type *loc_eng_data_p); int loc_eng_nmea_put_checksum(char *pNmea, int maxSize); -void loc_eng_nmea_generate_sv(loc_eng_data_s_type *loc_eng_data_p, const GnssSvStatus &svStatus, const GpsLocationExtended &locationExtended); +void loc_eng_nmea_generate_sv(loc_eng_data_s_type *loc_eng_data_p, const QcomSvStatus &svStatus, const GpsLocationExtended &locationExtended); void loc_eng_nmea_generate_pos(loc_eng_data_s_type *loc_eng_data_p, const UlpLocation &location, const GpsLocationExtended &locationExtended, unsigned char generate_nmea); #endif // LOC_ENG_NMEA_H