diff options
author | qctecmdr <qctecmdr@localhost> | 2019-05-31 20:11:11 -0700 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2019-05-31 20:11:10 -0700 |
commit | 5a5989edd8a78dca5332cc913a9a37a2120b20d0 (patch) | |
tree | 9a072a6fbc360c36145fa7975d4b7efa0862dde9 /android/2.0/Gnss.cpp | |
parent | c7cbd60fb53693f31384468c180b7d220384c878 (diff) | |
parent | 89583a78f041efb6213044867650e20013500e35 (diff) | |
download | gps-5a5989edd8a78dca5332cc913a9a37a2120b20d0.tar.gz |
Merge "Add charger indication receiver in Gnss Hidl"
Diffstat (limited to 'android/2.0/Gnss.cpp')
-rw-r--r-- | android/2.0/Gnss.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/android/2.0/Gnss.cpp b/android/2.0/Gnss.cpp index 0390af7..be4efac 100644 --- a/android/2.0/Gnss.cpp +++ b/android/2.0/Gnss.cpp @@ -19,6 +19,7 @@ */ #define LOG_TAG "LocSvc_GnssInterface" +#define LOG_NDEBUG 0 #include <fstream> #include <log_util.h> @@ -26,6 +27,7 @@ #include <cutils/properties.h> #include "Gnss.h" #include "LocationUtil.h" +#include "battery_listener.h" typedef const GnssInterface* (getLocationInterface)(); @@ -85,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)); mGnssDeathRecipient = new GnssDeathRecipient(this); |