diff options
author | Ricardo Cerqueira <ricardo@cyngn.com> | 2016-10-13 13:24:39 +0100 |
---|---|---|
committer | Ricardo Cerqueira <ricardo@cyngn.com> | 2016-10-13 13:30:36 +0100 |
commit | 03130f33fc18355e8d3063bba072f70cab4d06e1 (patch) | |
tree | f1daee25a772a9fdc8b484e237a75170c442f2d4 /charger | |
parent | ac6115c82ac1365b269607b20b7ade17d7b3ba0f (diff) | |
download | vendor_replicant-03130f33fc18355e8d3063bba072f70cab4d06e1.zip vendor_replicant-03130f33fc18355e8d3063bba072f70cab4d06e1.tar.gz vendor_replicant-03130f33fc18355e8d3063bba072f70cab4d06e1.tar.bz2 |
charger: Use the same metrics as recovery to pick a density
Change-Id: Ieb046c493ca3d367cff570bd08d38c84c74e5fbd
Diffstat (limited to 'charger')
-rw-r--r-- | charger/Android.mk | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/charger/Android.mk b/charger/Android.mk index 0492ad9..d637284 100644 --- a/charger/Android.mk +++ b/charger/Android.mk @@ -1,5 +1,19 @@ 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) LOCAL_SRC_FILES := healthd_board_cm.cpp LOCAL_MODULE := libhealthd.cm @@ -20,7 +34,7 @@ include $(BUILD_STATIC_LIBRARY) include $(CLEAR_VARS) 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_CLASS := ETC LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)/res/images @@ -42,7 +56,7 @@ endef _img_modules := _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)))) include $(CLEAR_VARS) |