Marko Man | ab2ffd2 | 2019-09-20 09:11:39 +0200 | [diff] [blame^] | 1 | LOCAL_PATH := $(call my-dir) |
| 2 | |
| 3 | ifneq (,$(PRODUCT_AAPT_PREF_CONFIG)) |
| 4 | # If PRODUCT_AAPT_PREF_CONFIG includes a dpi bucket, then use that value. |
| 5 | charger_density := $(word 1,$(PRODUCT_AAPT_PREF_CONFIG)) |
| 6 | else |
| 7 | # Otherwise, use the default medium density. |
| 8 | charger_density := 480dpi |
| 9 | endif |
| 10 | |
| 11 | include $(CLEAR_VARS) |
| 12 | LOCAL_MODULE := font_charger.png |
| 13 | LOCAL_SRC_FILES := fonts/$(charger_density)/font_charger.png |
| 14 | LOCAL_MODULE_TAGS := optional |
| 15 | LOCAL_MODULE_CLASS := ETC |
| 16 | LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)/res/images |
| 17 | include $(BUILD_PREBUILT) |
| 18 | |
| 19 | include $(CLEAR_VARS) |
| 20 | LOCAL_MODULE := animation.txt |
| 21 | LOCAL_SRC_FILES := anim/animation.txt |
| 22 | LOCAL_MODULE_TAGS := optional |
| 23 | LOCAL_MODULE_CLASS := ETC |
| 24 | LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)/res/values/charger |
| 25 | include $(BUILD_PREBUILT) |
| 26 | |
| 27 | define _add-charger-image |
| 28 | include $$(CLEAR_VARS) |
| 29 | LOCAL_MODULE := omni_core_charger_$(notdir $(1)) |
| 30 | LOCAL_MODULE_STEM := $(notdir $(1)) |
| 31 | _img_modules += $$(LOCAL_MODULE) |
| 32 | LOCAL_SRC_FILES := $1 |
| 33 | LOCAL_MODULE_TAGS := optional |
| 34 | LOCAL_MODULE_CLASS := ETC |
| 35 | LOCAL_MODULE_PATH := $$(TARGET_ROOT_OUT)/res/images/charger |
| 36 | include $$(BUILD_PREBUILT) |
| 37 | endef |
| 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 | |
| 44 | include $(CLEAR_VARS) |
| 45 | LOCAL_MODULE := omni_charger_res_images |
| 46 | LOCAL_MODULE_TAGS := optional |
| 47 | LOCAL_REQUIRED_MODULES := $(_img_modules) |
| 48 | include $(BUILD_PHONY_PACKAGE) |
| 49 | |
| 50 | _add-charger-image := |
| 51 | _img_modules := |