Merge "healthd: Add "No UI" operation for charger mode"
am: fdd26c961d
* commit 'fdd26c961d654df7ab068591a9fce7945719c90d':
healthd: Add "No UI" operation for charger mode
This commit is contained in:
commit
6355bc8d5b
2 changed files with 31 additions and 2 deletions
|
|
@ -10,13 +10,23 @@ include $(BUILD_STATIC_LIBRARY)
|
||||||
|
|
||||||
include $(CLEAR_VARS)
|
include $(CLEAR_VARS)
|
||||||
|
|
||||||
|
ifeq ($(strip $(BOARD_CHARGER_NO_UI)),true)
|
||||||
|
LOCAL_CHARGER_NO_UI := true
|
||||||
|
endif
|
||||||
|
ifdef BRILLO
|
||||||
|
LOCAL_CHARGER_NO_UI := true
|
||||||
|
endif
|
||||||
|
|
||||||
LOCAL_SRC_FILES := \
|
LOCAL_SRC_FILES := \
|
||||||
healthd.cpp \
|
healthd.cpp \
|
||||||
healthd_mode_android.cpp \
|
healthd_mode_android.cpp \
|
||||||
healthd_mode_charger.cpp \
|
|
||||||
BatteryMonitor.cpp \
|
BatteryMonitor.cpp \
|
||||||
BatteryPropertiesRegistrar.cpp
|
BatteryPropertiesRegistrar.cpp
|
||||||
|
|
||||||
|
ifneq ($(strip $(LOCAL_CHARGER_NO_UI)),true)
|
||||||
|
LOCAL_SRC_FILES += healthd_mode_charger.cpp
|
||||||
|
endif
|
||||||
|
|
||||||
LOCAL_MODULE := healthd
|
LOCAL_MODULE := healthd
|
||||||
LOCAL_MODULE_TAGS := optional
|
LOCAL_MODULE_TAGS := optional
|
||||||
LOCAL_FORCE_STATIC_EXECUTABLE := true
|
LOCAL_FORCE_STATIC_EXECUTABLE := true
|
||||||
|
|
@ -33,9 +43,19 @@ ifeq ($(strip $(BOARD_CHARGER_ENABLE_SUSPEND)),true)
|
||||||
LOCAL_CFLAGS += -DCHARGER_ENABLE_SUSPEND
|
LOCAL_CFLAGS += -DCHARGER_ENABLE_SUSPEND
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(strip $(LOCAL_CHARGER_NO_UI)),true)
|
||||||
|
LOCAL_CFLAGS += -DCHARGER_NO_UI
|
||||||
|
endif
|
||||||
|
|
||||||
LOCAL_C_INCLUDES := bootable/recovery
|
LOCAL_C_INCLUDES := bootable/recovery
|
||||||
|
|
||||||
LOCAL_STATIC_LIBRARIES := libbatteryservice libbinder libminui libpng libz libutils libcutils liblog libm libc
|
LOCAL_STATIC_LIBRARIES := libbatteryservice libbinder
|
||||||
|
|
||||||
|
ifneq ($(strip $(LOCAL_CHARGER_NO_UI)),true)
|
||||||
|
LOCAL_STATIC_LIBRARIES += libminui libpng libz
|
||||||
|
endif
|
||||||
|
|
||||||
|
LOCAL_STATIC_LIBRARIES += libutils libcutils liblog libm libc
|
||||||
|
|
||||||
ifeq ($(strip $(BOARD_CHARGER_ENABLE_SUSPEND)),true)
|
ifeq ($(strip $(BOARD_CHARGER_ENABLE_SUSPEND)),true)
|
||||||
LOCAL_STATIC_LIBRARIES += libsuspend
|
LOCAL_STATIC_LIBRARIES += libsuspend
|
||||||
|
|
@ -50,6 +70,7 @@ LOCAL_POST_INSTALL_CMD := $(hide) mkdir -p $(TARGET_ROOT_OUT) \
|
||||||
include $(BUILD_EXECUTABLE)
|
include $(BUILD_EXECUTABLE)
|
||||||
|
|
||||||
|
|
||||||
|
ifneq ($(strip $(LOCAL_CHARGER_NO_UI)),true)
|
||||||
define _add-charger-image
|
define _add-charger-image
|
||||||
include $$(CLEAR_VARS)
|
include $$(CLEAR_VARS)
|
||||||
LOCAL_MODULE := system_core_charger_$(notdir $(1))
|
LOCAL_MODULE := system_core_charger_$(notdir $(1))
|
||||||
|
|
@ -75,3 +96,4 @@ include $(BUILD_PHONY_PACKAGE)
|
||||||
|
|
||||||
_add-charger-image :=
|
_add-charger-image :=
|
||||||
_img_modules :=
|
_img_modules :=
|
||||||
|
endif # LOCAL_CHARGER_NO_UI
|
||||||
|
|
|
||||||
|
|
@ -109,10 +109,17 @@ static struct healthd_mode_ops android_ops = {
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct healthd_mode_ops charger_ops = {
|
static struct healthd_mode_ops charger_ops = {
|
||||||
|
#ifdef CHARGER_NO_UI
|
||||||
|
.init = healthd_mode_nop_init,
|
||||||
|
.preparetowait = healthd_mode_nop_preparetowait,
|
||||||
|
.heartbeat = healthd_mode_nop_heartbeat,
|
||||||
|
.battery_update = healthd_mode_nop_battery_update,
|
||||||
|
#else
|
||||||
.init = healthd_mode_charger_init,
|
.init = healthd_mode_charger_init,
|
||||||
.preparetowait = healthd_mode_charger_preparetowait,
|
.preparetowait = healthd_mode_charger_preparetowait,
|
||||||
.heartbeat = healthd_mode_charger_heartbeat,
|
.heartbeat = healthd_mode_charger_heartbeat,
|
||||||
.battery_update = healthd_mode_charger_battery_update,
|
.battery_update = healthd_mode_charger_battery_update,
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct healthd_mode_ops recovery_ops = {
|
static struct healthd_mode_ops recovery_ops = {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue