summaryrefslogtreecommitdiff
path: root/android/1.1/Gnss.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'android/1.1/Gnss.cpp')
-rw-r--r--android/1.1/Gnss.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/android/1.1/Gnss.cpp b/android/1.1/Gnss.cpp
index 8d5d8a8..f0d74da 100644
--- a/android/1.1/Gnss.cpp
+++ b/android/1.1/Gnss.cpp
@@ -19,6 +19,7 @@
*/
#define LOG_TAG "LocSvc_GnssInterface"
+#define LOG_NDEBUG 0
#include <fstream>
#include <log_util.h>
@@ -27,6 +28,8 @@
#include "Gnss.h"
#include <LocationUtil.h>
+#include "battery_listener.h"
+
typedef const GnssInterface* (getLocationInterface)();
#define IMAGES_INFO_FILE "/sys/devices/soc0/images"
@@ -84,8 +87,13 @@ void Gnss::GnssDeathRecipient::serviceDied(uint64_t cookie, const wp<IBase>& who
}
}
+void location_on_battery_status_changed(bool charging) {
+ LOC_LOGd("%s: battery status changed to %s charging", __func__, charging ? "" : "not ");
+}
Gnss::Gnss() {
ENTRY_LOG_CALLFLOW();
+ // register health client to listen on battery change
+ loc_extn_battery_properties_listener_init(location_on_battery_status_changed);
// clear pending GnssConfig
memset(&mPendingConfig, 0, sizeof(GnssConfig));