charger: Use the same metrics as recovery to pick a density
Change-Id: Ieb046c493ca3d367cff570bd08d38c84c74e5fbd
This commit is contained in:
parent
4cc370ebe5
commit
5bf45276b7
1 changed files with 16 additions and 2 deletions
|
@ -1,5 +1,19 @@
|
||||||
LOCAL_PATH := $(call my-dir)
|
LOCAL_PATH := $(call my-dir)
|
||||||
|
|
||||||
|
# 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
|
||||||
|
|
||||||
include $(CLEAR_VARS)
|
include $(CLEAR_VARS)
|
||||||
LOCAL_SRC_FILES := healthd_board_cm.cpp
|
LOCAL_SRC_FILES := healthd_board_cm.cpp
|
||||||
LOCAL_MODULE := libhealthd.cm
|
LOCAL_MODULE := libhealthd.cm
|
||||||
|
@ -20,7 +34,7 @@ include $(BUILD_STATIC_LIBRARY)
|
||||||
|
|
||||||
include $(CLEAR_VARS)
|
include $(CLEAR_VARS)
|
||||||
LOCAL_MODULE := font_log.png
|
LOCAL_MODULE := font_log.png
|
||||||
LOCAL_SRC_FILES := fonts/$(PRODUCT_AAPT_PREF_CONFIG)/font_log.png
|
LOCAL_SRC_FILES := fonts/$(healthd_density)/font_log.png
|
||||||
LOCAL_MODULE_TAGS := optional
|
LOCAL_MODULE_TAGS := optional
|
||||||
LOCAL_MODULE_CLASS := ETC
|
LOCAL_MODULE_CLASS := ETC
|
||||||
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)/res/images
|
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)/res/images
|
||||||
|
@ -42,7 +56,7 @@ endef
|
||||||
|
|
||||||
_img_modules :=
|
_img_modules :=
|
||||||
_images :=
|
_images :=
|
||||||
$(foreach _img, $(call find-subdir-subdir-files, "images/$(PRODUCT_AAPT_PREF_CONFIG)", "*.png"), \
|
$(foreach _img, $(call find-subdir-subdir-files, "images/$(healthd_density)", "*.png"), \
|
||||||
$(eval $(call _add-charger-image,$(_img))))
|
$(eval $(call _add-charger-image,$(_img))))
|
||||||
|
|
||||||
include $(CLEAR_VARS)
|
include $(CLEAR_VARS)
|
||||||
|
|
Loading…
Reference in a new issue