diff --git a/core/Makefile b/core/Makefile index e9e55db0cb..4bcad82278 100644 --- a/core/Makefile +++ b/core/Makefile @@ -2493,6 +2493,9 @@ recovery_kernel := $(firstword $(INSTALLED_KERNEL_TARGET)) recovery_ramdisk := $(PRODUCT_OUT)/ramdisk-recovery.img recovery_resources_common := bootable/recovery/res +ifneq (,$(TARGET_RECOVERY_DENSITY)) +recovery_density := $(filter %dpi,$(TARGET_RECOVERY_DENSITY)) +else # Set recovery_density to a density bucket based on TARGET_SCREEN_DENSITY, PRODUCT_AAPT_PREF_CONFIG, # or mdpi, in order of preference. We support both specific buckets (e.g. xdpi) and numbers, # which get remapped to a bucket. @@ -2508,6 +2511,7 @@ recovery_density := $(strip \ $(if $(filter $(shell echo $$(($(recovery_density_value) >= 280))),1),xhdpi),\ $(if $(filter $(shell echo $$(($(recovery_density_value) >= 200))),1),hdpi,mdpi))) endif +endif ifneq (,$(wildcard $(recovery_resources_common)-$(recovery_density))) recovery_resources_common := $(recovery_resources_common)-$(recovery_density)