Replace shell invocation of find with wildcard expansion.

Shell function is undesirable. Here it is used to call `find`,
but all the files we are looking for are in a single directory,
so it can be replaced with wildcard expansion.

Test: treehugger
Bug: 181797530
Change-Id: I193353b5c131fffff550e5dfa5102486dac921c5
This commit is contained in:
Sasha Smundak
2021-04-05 15:18:05 -07:00
parent f5527106d2
commit ff64e3e0ff

View File

@@ -42,11 +42,11 @@ DEVICE_PACKAGE_OVERLAYS += device/google/redfin/redfin/overlay
# Audio XMLs for redfin
ifeq ($(wildcard vendor/google_fih/redfin/factory/prebuilt/ftm.mk),)
PRODUCT_COPY_FILES += \
$(foreach f,$(shell find $(LOCAL_PATH)/audio/ -type f -name "audio_platform_info*.xml"),$(f):$(TARGET_COPY_OUT_VENDOR)/etc/$(notdir $(f)))
$(call find-copy-subdir-files,audio_platform_info*.xml,$(LOCAL_PATH)/audio,$(TARGET_COPY_OUT_VENDOR)/etc)
endif
PRODUCT_COPY_FILES += \
$(foreach f,$(shell find $(LOCAL_PATH)/audio/ -type f -name "mixer_paths*.xml"),$(f):$(TARGET_COPY_OUT_VENDOR)/etc/$(notdir $(f))) \
$(call find-copy-subdir-files,mixer_paths*.xml,$(LOCAL_PATH)/audio,$(TARGET_COPY_OUT_VENDOR)/etc) \
$(LOCAL_PATH)/audio/sound_trigger_mixer_paths.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sound_trigger_mixer_paths.xml \
$(LOCAL_PATH)/audio_policy_volumes.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_volumes.xml \
$(LOCAL_PATH)/audio/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration.xml \