From 3e62412eb0233619684ecdbc39b19cbc8ebbdc93 Mon Sep 17 00:00:00 2001 From: Wei Chen Date: Fri, 22 Feb 2019 17:55:39 -0800 Subject: Gnss interface: add position injection for extended info Add position injection interface with extended info, e.g.: GnssLocationInfoNotification Change-Id: I6ba8f1111d1511c7071fe358687a478b26e8f9a4 CRs-fixed: 2417450 --- gnss/location_gnss.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'gnss/location_gnss.cpp') diff --git a/gnss/location_gnss.cpp b/gnss/location_gnss.cpp index 43665b4..88fa15d 100644 --- a/gnss/location_gnss.cpp +++ b/gnss/location_gnss.cpp @@ -58,6 +58,7 @@ static void gnssGetSvTypeConfig(GnssSvTypeConfigCallback& callback); static void gnssResetSvTypeConfig(); static void injectLocation(double latitude, double longitude, float accuracy); +static void injectLocationExt(const GnssLocationInfoNotification &locationInfo); static void injectTime(int64_t time, int64_t timeReference, int32_t uncertainty); static void agpsInit(const AgpsCbInfo& cbInfo); @@ -113,7 +114,8 @@ static const GnssInterface gGnssInterface = { getGnssEnergyConsumed, enableNfwLocationAccess, nfwInit, - getPowerStateChanges + getPowerStateChanges, + injectLocationExt }; #ifndef DEBUG_X86 @@ -373,3 +375,10 @@ static void getPowerStateChanges(void* powerStateCb) gGnssAdapter->getPowerStateChangesCommand(powerStateCb); } } + +static void injectLocationExt(const GnssLocationInfoNotification &locationInfo) +{ + if (NULL != gGnssAdapter) { + gGnssAdapter->injectLocationExtCommand(locationInfo); + } +} -- cgit v1.2.3