Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a6bb477e authored by Chirayu Desai's avatar Chirayu Desai Committed by Michael Bestas
Browse files

Allow setting the recovery density separately from the aapt config

Change-Id: I817a4c01302956ec846503d9a585c43e690e45bf
parent 65c1eaba
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1941,6 +1941,9 @@ recovery_ramdisk := $(PRODUCT_OUT)/ramdisk-recovery.img
recovery_uncompressed_ramdisk := $(PRODUCT_OUT)/ramdisk-recovery.cpio
recovery_resources_common := $(call include-path-for, 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.
@@ -1956,6 +1959,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)