From 75e962a87ed47715ca607e6e403365ff58f7f288 Mon Sep 17 00:00:00 2001 From: Ying Wang Date: Wed, 2 Mar 2016 18:55:46 -0800 Subject: [PATCH] Add --auto-add-overlay if a module has LOCAL_STATIC_ANDROID_LIBRARIES Bug: 25958912 Change-Id: Iafba9eefde0823095775474bcb7cc5b6c21fd248 --- core/aapt2.mk | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/aapt2.mk b/core/aapt2.mk index bfc01dafb..ccc453576 100644 --- a/core/aapt2.mk +++ b/core/aapt2.mk @@ -48,6 +48,10 @@ my_static_library_resources := $(foreach l, $(call reverse-list,$(LOCAL_STATIC_A my_shared_library_resources := $(foreach l, $(LOCAL_SHARED_ANDROID_LIBRARIES),\ $(call intermediates-dir-for,JAVA_LIBRARIES,$(l),,COMMON)/package-res.apk) +ifneq ($(my_static_library_resources),) +$(my_res_package): PRIVATE_AAPT_FLAGS += --auto-add-overlay +endif + $(my_res_package): PRIVATE_RES_FLAT := $(my_res_resources_flat) $(my_res_package): PRIVATE_OVERLAY_FLAT := $(my_static_library_resources) $(my_generated_resources_flata) $(my_overlay_resources_flat) $(my_res_package): PRIVATE_SHARED_ANDROID_LIBRARIES := $(my_shared_library_resources)