diff options
author | Ruifeng Xu <ruifeng@codeaurora.org> | 2017-08-21 17:46:44 -0700 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2017-10-05 12:41:27 -0700 |
commit | 35804b91311b84741ef05969665fa2416c6f4111 (patch) | |
tree | 257a78ec2979b1484d682784308eb0d3a0e59277 /gnss/location_gnss.cpp | |
parent | b0982b4476d852410658b307afdeacccd26fb981 (diff) | |
download | gps-35804b91311b84741ef05969665fa2416c6f4111.tar.gz |
new apis for control xtra throttle
added register and unregister apis of a callback
that listens to XTRA client throttle enablement commands.
Change-Id: Id50e7311516593018113203b5dfa700f0fdc037b
CRs-fixed: 2092629
Diffstat (limited to 'gnss/location_gnss.cpp')
-rw-r--r-- | gnss/location_gnss.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gnss/location_gnss.cpp b/gnss/location_gnss.cpp index 1a6dab7..3e989c9 100644 --- a/gnss/location_gnss.cpp +++ b/gnss/location_gnss.cpp @@ -45,6 +45,7 @@ static void stopTracking(LocationAPI* client, uint32_t id); static void gnssNiResponse(LocationAPI* client, uint32_t id, GnssNiResponse response); static uint32_t gnssDeleteAidingData(GnssAidingData& data); +static void gnssUpdateXtraThrottle(const bool enabled); static void setControlCallbacks(LocationControlCallbacks& controlCallbacks); static uint32_t enable(LocationTechnologyType techType); @@ -77,6 +78,7 @@ static const GnssInterface gGnssInterface = { disable, gnssUpdateConfig, gnssDeleteAidingData, + gnssUpdateXtraThrottle, injectLocation, injectTime, agpsInit, @@ -203,6 +205,13 @@ static uint32_t gnssDeleteAidingData(GnssAidingData& data) } } +static void gnssUpdateXtraThrottle(const bool enabled) +{ + if (NULL != gGnssAdapter) { + gGnssAdapter->gnssUpdateXtraThrottleCommand(enabled); + } +} + static void injectLocation(double latitude, double longitude, float accuracy) { if (NULL != gGnssAdapter) { |