summaryrefslogtreecommitdiff
path: root/gnss/location_gnss.cpp
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2019-06-14 18:48:31 -0700
committerLinux Build Service Account <lnxbuild@localhost>2019-06-14 18:48:31 -0700
commit2625e7083ff118e8da856eb1dd04d39d2a527e22 (patch)
tree72b04289561812bf1a52d5c14cfa2e6986cd76e1 /gnss/location_gnss.cpp
parent2d333ab2d898e1119576b2507fa5f1e95b90d124 (diff)
parent3bbb89aee1a89cc7d268927ac8265a70a330f2fb (diff)
downloadgps-2625e7083ff118e8da856eb1dd04d39d2a527e22.tar.gz
Merge 3bbb89aee1a89cc7d268927ac8265a70a330f2fb on remote branch
Change-Id: I8ce184682331aed809cdf4e36611ccd7b84c02e3
Diffstat (limited to 'gnss/location_gnss.cpp')
-rw-r--r--gnss/location_gnss.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/gnss/location_gnss.cpp b/gnss/location_gnss.cpp
index 88fa15d..76839b6 100644
--- a/gnss/location_gnss.cpp
+++ b/gnss/location_gnss.cpp
@@ -78,6 +78,7 @@ static void odcpiInject(const Location& location);
static void blockCPI(double latitude, double longitude, float accuracy,
int blockDurationMsec, double latLonDiffThreshold);
+static void updateBatteryStatus(bool charging);
static const GnssInterface gGnssInterface = {
sizeof(GnssInterface),
@@ -115,7 +116,8 @@ static const GnssInterface gGnssInterface = {
enableNfwLocationAccess,
nfwInit,
getPowerStateChanges,
- injectLocationExt
+ injectLocationExt,
+ updateBatteryStatus
};
#ifndef DEBUG_X86
@@ -382,3 +384,9 @@ static void injectLocationExt(const GnssLocationInfoNotification &locationInfo)
gGnssAdapter->injectLocationExtCommand(locationInfo);
}
}
+
+static void updateBatteryStatus(bool charging) {
+ if (NULL != gGnssAdapter) {
+ gGnssAdapter->getSystemStatus()->updatePowerConnectState(charging);
+ }
+}