2016-08-08 08:21:29 +02:00
|
|
|
LOCAL_PATH := $(call my-dir)
|
|
|
|
|
2016-10-13 14:24:39 +02:00
|
|
|
# Set healthd_density to the density bucket of the device.
|
|
|
|
healthd_density := unknown
|
|
|
|
ifneq (,$(TARGET_RECOVERY_DENSITY))
|
|
|
|
healthd_density := $(filter %dpi,$(TARGET_RECOVERY_DENSITY))
|
|
|
|
else
|
|
|
|
ifneq (,$(PRODUCT_AAPT_PREF_CONFIG))
|
|
|
|
# If PRODUCT_AAPT_PREF_CONFIG includes a dpi bucket, then use that value.
|
|
|
|
healthd_density := $(filter %dpi,$(PRODUCT_AAPT_PREF_CONFIG))
|
|
|
|
else
|
|
|
|
# Otherwise, use the default medium density.
|
|
|
|
healthd_density := mdpi
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2016-08-08 08:21:29 +02:00
|
|
|
include $(CLEAR_VARS)
|
2017-08-17 19:28:48 +02:00
|
|
|
LOCAL_SRC_FILES := healthd_board_lineage.cpp
|
|
|
|
LOCAL_MODULE := libhealthd.lineage
|
2016-08-08 08:21:29 +02:00
|
|
|
LOCAL_CFLAGS := -Werror
|
|
|
|
LOCAL_C_INCLUDES := \
|
2016-08-25 14:41:17 +02:00
|
|
|
system/core/healthd/include \
|
2016-08-08 08:21:29 +02:00
|
|
|
bootable/recovery
|
2016-08-14 11:44:31 +02:00
|
|
|
ifneq ($(BACKLIGHT_PATH),)
|
|
|
|
LOCAL_CFLAGS += -DHEALTHD_BACKLIGHT_PATH=\"$(BACKLIGHT_PATH)\"
|
|
|
|
endif
|
|
|
|
ifneq ($(SECONDARY_BACKLIGHT_PATH),)
|
|
|
|
LOCAL_CFLAGS += -DHEALTHD_SECONDARY_BACKLIGHT_PATH=\"$(SECONDARY_BACKLIGHT_PATH)\"
|
|
|
|
endif
|
|
|
|
ifneq ($(HEALTHD_BACKLIGHT_LEVEL),)
|
|
|
|
LOCAL_CFLAGS += -DHEALTHD_BACKLIGHT_LEVEL=$(HEALTHD_BACKLIGHT_LEVEL)
|
|
|
|
endif
|
2016-08-08 08:21:29 +02:00
|
|
|
include $(BUILD_STATIC_LIBRARY)
|
|
|
|
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
LOCAL_MODULE := font_log.png
|
2016-10-13 14:24:39 +02:00
|
|
|
LOCAL_SRC_FILES := fonts/$(healthd_density)/font_log.png
|
2016-08-08 08:21:29 +02:00
|
|
|
LOCAL_MODULE_TAGS := optional
|
|
|
|
LOCAL_MODULE_CLASS := ETC
|
|
|
|
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)/res/images
|
|
|
|
include $(BUILD_PREBUILT)
|
|
|
|
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
|
|
|
|
define _add-charger-image
|
|
|
|
include $$(CLEAR_VARS)
|
2017-08-17 19:28:48 +02:00
|
|
|
LOCAL_MODULE := vendor_lineage_charger_$(notdir $(1))
|
2016-08-08 08:21:29 +02:00
|
|
|
LOCAL_MODULE_STEM := $(notdir $(1))
|
|
|
|
_img_modules += $$(LOCAL_MODULE)
|
|
|
|
LOCAL_SRC_FILES := $1
|
|
|
|
LOCAL_MODULE_TAGS := optional
|
|
|
|
LOCAL_MODULE_CLASS := ETC
|
|
|
|
LOCAL_MODULE_PATH := $$(TARGET_ROOT_OUT)/res/images/charger
|
|
|
|
include $$(BUILD_PREBUILT)
|
|
|
|
endef
|
|
|
|
|
|
|
|
_img_modules :=
|
|
|
|
_images :=
|
2016-10-13 14:24:39 +02:00
|
|
|
$(foreach _img, $(call find-subdir-subdir-files, "images/$(healthd_density)", "*.png"), \
|
2016-08-08 08:21:29 +02:00
|
|
|
$(eval $(call _add-charger-image,$(_img))))
|
|
|
|
|
|
|
|
include $(CLEAR_VARS)
|
2017-08-17 19:28:48 +02:00
|
|
|
LOCAL_MODULE := lineage_charger_res_images
|
2016-08-08 08:21:29 +02:00
|
|
|
LOCAL_MODULE_TAGS := optional
|
|
|
|
LOCAL_REQUIRED_MODULES := $(_img_modules)
|
|
|
|
LOCAL_OVERRIDES_PACKAGES := charger_res_images
|
|
|
|
include $(BUILD_PHONY_PACKAGE)
|
|
|
|
|
|
|
|
_add-charger-image :=
|
|
|
|
_img_modules :=
|