programminghoch10 | d2a7198 | 2021-08-04 02:09:40 +0200 | [diff] [blame] | 1 | # |
| 2 | # Copyright (C) 2021 The LineageOS Project |
| 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | # you may not use this file except in compliance with the License. |
| 6 | # You may obtain a copy of the License at |
| 7 | # |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | # See the License for the specific language governing permissions and |
| 14 | # limitations under the License. |
| 15 | # |
| 16 | |
| 17 | LOCAL_PATH := $(call my-dir) |
| 18 | |
| 19 | # Set lineage_charger_density to the density bucket of the device. |
| 20 | lineage_charger_density := mdpi |
| 21 | ifneq (,$(TARGET_SCREEN_DENSITY)) |
| 22 | lineage_charger_density := $(strip \ |
| 23 | $(or $(if $(filter $(shell echo $$(($(TARGET_SCREEN_DENSITY) >= 560))),1),xxxhdpi),\ |
| 24 | $(if $(filter $(shell echo $$(($(TARGET_SCREEN_DENSITY) >= 400))),1),xxhdpi),\ |
| 25 | $(if $(filter $(shell echo $$(($(TARGET_SCREEN_DENSITY) >= 280))),1),xhdpi),\ |
| 26 | $(if $(filter $(shell echo $$(($(TARGET_SCREEN_DENSITY) >= 200))),1),hdpi,mdpi))) |
| 27 | else ifneq (,$(filter mdpi hdpi xhdpi xxhdpi xxxhdpi,$(PRODUCT_AAPT_PREF_CONFIG))) |
| 28 | # If PRODUCT_AAPT_PREF_CONFIG includes a dpi bucket, then use that value. |
| 29 | lineage_charger_density := $(PRODUCT_AAPT_PREF_CONFIG) |
| 30 | endif |
| 31 | |
| 32 | include $(CLEAR_VARS) |
| 33 | LOCAL_MODULE := lineage_charger_battery_scale |
| 34 | LOCAL_MODULE_STEM := battery_scale.png |
| 35 | LOCAL_SRC_FILES := $(lineage_charger_density)/battery_scale.png |
| 36 | LOCAL_MODULE_TAGS := optional |
| 37 | LOCAL_MODULE_CLASS := ETC |
| 38 | LOCAL_MODULE_PATH := $(TARGET_OUT_PRODUCT_ETC)/res/images/charger |
| 39 | include $(BUILD_PREBUILT) |
| 40 | |
| 41 | include $(CLEAR_VARS) |
Tim Zimmermann | 3604f25 | 2022-09-13 08:51:55 +0200 | [diff] [blame^] | 42 | LOCAL_MODULE := lineage_charger_battery_scale_vendor |
| 43 | LOCAL_MODULE_STEM := battery_scale.png |
| 44 | LOCAL_SRC_FILES := $(lineage_charger_density)/battery_scale.png |
| 45 | LOCAL_MODULE_TAGS := optional |
| 46 | LOCAL_MODULE_CLASS := ETC |
| 47 | LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC)/res/images/charger |
| 48 | include $(BUILD_PREBUILT) |
| 49 | |
| 50 | include $(CLEAR_VARS) |
programminghoch10 | d2a7198 | 2021-08-04 02:09:40 +0200 | [diff] [blame] | 51 | LOCAL_MODULE := lineage_charger_battery_fail |
| 52 | LOCAL_MODULE_STEM := battery_fail.png |
| 53 | LOCAL_SRC_FILES := $(lineage_charger_density)/battery_fail.png |
| 54 | LOCAL_MODULE_TAGS := optional |
| 55 | LOCAL_MODULE_CLASS := ETC |
| 56 | LOCAL_MODULE_PATH := $(TARGET_OUT_PRODUCT_ETC)/res/images/charger |
| 57 | include $(BUILD_PREBUILT) |
| 58 | |
| 59 | include $(CLEAR_VARS) |
Tim Zimmermann | 3604f25 | 2022-09-13 08:51:55 +0200 | [diff] [blame^] | 60 | LOCAL_MODULE := lineage_charger_battery_fail_vendor |
| 61 | LOCAL_MODULE_STEM := battery_fail.png |
| 62 | LOCAL_SRC_FILES := $(lineage_charger_density)/battery_fail.png |
| 63 | LOCAL_MODULE_TAGS := optional |
| 64 | LOCAL_MODULE_CLASS := ETC |
| 65 | LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC)/res/images/charger |
| 66 | include $(BUILD_PREBUILT) |
| 67 | |
| 68 | include $(CLEAR_VARS) |
programminghoch10 | d2a7198 | 2021-08-04 02:09:40 +0200 | [diff] [blame] | 69 | LOCAL_MODULE := lineage_charger_animation |
| 70 | LOCAL_MODULE_STEM := animation.txt |
| 71 | LOCAL_SRC_FILES := animation.txt |
| 72 | LOCAL_MODULE_TAGS := optional |
| 73 | LOCAL_MODULE_CLASS := ETC |
| 74 | LOCAL_MODULE_PATH := $(TARGET_OUT_PRODUCT_ETC)/res/values/charger |
| 75 | LOCAL_REQUIRED_MODULES := lineage_charger_battery_scale lineage_charger_battery_fail |
| 76 | include $(BUILD_PREBUILT) |
Tim Zimmermann | 3604f25 | 2022-09-13 08:51:55 +0200 | [diff] [blame^] | 77 | |
| 78 | include $(CLEAR_VARS) |
| 79 | LOCAL_MODULE := lineage_charger_animation_vendor |
| 80 | LOCAL_MODULE_STEM := animation.txt |
| 81 | LOCAL_SRC_FILES := animation.txt |
| 82 | LOCAL_MODULE_TAGS := optional |
| 83 | LOCAL_MODULE_CLASS := ETC |
| 84 | LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC)/res/values/charger |
| 85 | LOCAL_REQUIRED_MODULES := lineage_charger_battery_scale_vendor lineage_charger_battery_fail_vendor |
| 86 | include $(BUILD_PREBUILT) |