summaryrefslogtreecommitdiffstats
path: root/healthd
diff options
context:
space:
mode:
authorScott Mertz <scott@cyngn.com>2015-03-21 17:33:47 -0700
committerHendrik Hagendorn <git@finnq.de>2015-11-20 10:47:44 -0800
commit29f7779fdbccb5926a3f74d70c8721fa62e75a0c (patch)
tree9820eb22d5c7433119faf3eb675ac0520c18ce9a /healthd
parentb9cf99af8615d4922e3f4f4c79c41e9e6dd27de1 (diff)
downloadsystem_core-29f7779fdbccb5926a3f74d70c8721fa62e75a0c.zip
system_core-29f7779fdbccb5926a3f74d70c8721fa62e75a0c.tar.gz
system_core-29f7779fdbccb5926a3f74d70c8721fa62e75a0c.tar.bz2
healthd: allow custom charger
Change-Id: I1380bea300bfaa6819d50bdc813329c93050286a (cherry picked from commit b6ebd65cd36d06daa5cf33f031d7e03b0bd674c6)
Diffstat (limited to 'healthd')
-rw-r--r--healthd/Android.mk14
1 files changed, 12 insertions, 2 deletions
diff --git a/healthd/Android.mk b/healthd/Android.mk
index fe092b7..ce83b63 100644
--- a/healthd/Android.mk
+++ b/healthd/Android.mk
@@ -13,10 +13,15 @@ include $(CLEAR_VARS)
LOCAL_SRC_FILES := \
healthd.cpp \
healthd_mode_android.cpp \
- healthd_mode_charger.cpp \
BatteryMonitor.cpp \
BatteryPropertiesRegistrar.cpp
+ifeq ($(strip $(BOARD_HEALTHD_CUSTOM_CHARGER)),)
+ LOCAL_SRC_FILES += healthd_mode_charger.cpp
+else
+ LOCAL_SRC_FILES += ../../../$(BOARD_HEALTHD_CUSTOM_CHARGER)
+endif
+
LOCAL_MODULE := healthd
LOCAL_MODULE_TAGS := optional
LOCAL_FORCE_STATIC_EXECUTABLE := true
@@ -75,8 +80,13 @@ include $$(BUILD_PREBUILT)
endef
_img_modules :=
+ifeq ($(strip $(BOARD_HEALTHD_CUSTOM_CHARGER_RES)),)
+IMAGES_DIR := images
+else
+IMAGES_DIR := ../../../$(BOARD_HEALTHD_CUSTOM_CHARGER_RES)
+endif
_images :=
-$(foreach _img, $(call find-subdir-subdir-files, "images", "*.png"), \
+$(foreach _img, $(call find-subdir-subdir-files, "$(IMAGES_DIR)", "*.png"), \
$(eval $(call _add-charger-image,$(_img))))
include $(CLEAR_VARS)