charger: suspend enable in charger mode

To reduce power consumption after charging completion, enable suspend when LCD
is turned off.

Bug: 7429504
Change-Id: I34731dc392661c9051a20cea74f70d94a8aaeb42
Signed-off-by: Iliyan Malchev <malchev@google.com>
diff --git a/charger/Android.mk b/charger/Android.mk
index fe0c91d..0258604 100644
--- a/charger/Android.mk
+++ b/charger/Android.mk
@@ -12,6 +12,10 @@
 LOCAL_CFLAGS := -DCHARGER_DISABLE_INIT_BLANK
 endif
 
+ifeq ($(strip $(BOARD_CHARGER_ENABLE_SUSPEND)),true)
+LOCAL_CFLAGS += -DCHARGER_ENABLE_SUSPEND
+endif
+
 LOCAL_MODULE := charger
 LOCAL_MODULE_TAGS := optional
 LOCAL_FORCE_STATIC_EXECUTABLE := true
@@ -21,6 +25,9 @@
 LOCAL_C_INCLUDES := bootable/recovery
 
 LOCAL_STATIC_LIBRARIES := libminui libpixelflinger_static libpng
+ifeq ($(strip $(BOARD_CHARGER_ENABLE_SUSPEND)),true)
+LOCAL_STATIC_LIBRARIES += libsuspend
+endif
 LOCAL_STATIC_LIBRARIES += libz libstdc++ libcutils libm libc
 
 include $(BUILD_EXECUTABLE)