blob: fb9eeffe587516e2581aca56aa0d1dda1ca0b39e [file] [log] [blame]
Marko Manab2ffd22019-09-20 09:11:39 +02001LOCAL_PATH := $(call my-dir)
2
3ifneq (,$(PRODUCT_AAPT_PREF_CONFIG))
4# If PRODUCT_AAPT_PREF_CONFIG includes a dpi bucket, then use that value.
5charger_density := $(word 1,$(PRODUCT_AAPT_PREF_CONFIG))
6else
7# Otherwise, use the default medium density.
8charger_density := 480dpi
9endif
10
11include $(CLEAR_VARS)
12LOCAL_MODULE := font_charger.png
13LOCAL_SRC_FILES := fonts/$(charger_density)/font_charger.png
14LOCAL_MODULE_TAGS := optional
15LOCAL_MODULE_CLASS := ETC
16LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)/res/images
17include $(BUILD_PREBUILT)
18
19include $(CLEAR_VARS)
20LOCAL_MODULE := animation.txt
21LOCAL_SRC_FILES := anim/animation.txt
22LOCAL_MODULE_TAGS := optional
23LOCAL_MODULE_CLASS := ETC
24LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)/res/values/charger
25include $(BUILD_PREBUILT)
26
27define _add-charger-image
28include $$(CLEAR_VARS)
29LOCAL_MODULE := omni_core_charger_$(notdir $(1))
30LOCAL_MODULE_STEM := $(notdir $(1))
31_img_modules += $$(LOCAL_MODULE)
32LOCAL_SRC_FILES := $1
33LOCAL_MODULE_TAGS := optional
34LOCAL_MODULE_CLASS := ETC
35LOCAL_MODULE_PATH := $$(TARGET_ROOT_OUT)/res/images/charger
36include $$(BUILD_PREBUILT)
37endef
38
39_img_modules :=
40_images :=
41$(foreach _img, $(call find-subdir-subdir-files, "images/$(charger_density)", "*.png"), \
42 $(eval $(call _add-charger-image,$(_img))))
43
44include $(CLEAR_VARS)
45LOCAL_MODULE := omni_charger_res_images
46LOCAL_MODULE_TAGS := optional
47LOCAL_REQUIRED_MODULES := $(_img_modules)
48include $(BUILD_PHONY_PACKAGE)
49
50_add-charger-image :=
51_img_modules :=