Convert comma in split arguments to underscore.

aapt already does so.
Bug: 16947729

Change-Id: I813fb8cf41b3ec836e6e6d5f68af12dc385169f8
This commit is contained in:
Ying Wang 2014-10-01 12:01:04 -07:00
parent fc6d5b6a94
commit 114a0fca3b
1 changed files with 5 additions and 3 deletions

View File

@ -423,8 +423,10 @@ endif
## APK splits
ifdef LOCAL_PACKAGE_SPLITS
# LOCAL_PACKAGE_SPLITS is a list of resource labels.
built_apk_splits := $(foreach s,$(LOCAL_PACKAGE_SPLITS),$(built_module_path)/package_$(s).apk)
installed_apk_splits := $(foreach s,$(LOCAL_PACKAGE_SPLITS),$(my_module_path)/$(LOCAL_MODULE)_$(s).apk)
# aapt will convert comma inside resource lable to underscore in the file names.
my_split_suffixes := $(subst $(comma),_,$(LOCAL_PACKAGE_SPLITS))
built_apk_splits := $(foreach s,$(my_split_suffixes),$(built_module_path)/package_$(s).apk)
installed_apk_splits := $(foreach s,$(my_split_suffixes),$(my_module_path)/$(LOCAL_MODULE)_$(s).apk)
# The splits should have been built in the same command building the base apk.
# This rule just runs signing and zipalign etc.
@ -449,7 +451,7 @@ $(installed_apk_splits) : $(my_module_path)/$(LOCAL_MODULE)_%.apk : $(built_modu
# Register the additional built and installed files.
ALL_MODULES.$(my_register_name).INSTALLED += $(installed_apk_splits)
ALL_MODULES.$(my_register_name).BUILT_INSTALLED += \
$(foreach s,$(LOCAL_PACKAGE_SPLITS),$(built_module_path)/package_$(s).apk:$(my_module_path)/$(LOCAL_MODULE)_$(s).apk)
$(foreach s,$(my_split_suffixes),$(built_module_path)/package_$(s).apk:$(my_module_path)/$(LOCAL_MODULE)_$(s).apk)
# Make sure to install the splits when you run "make <module_name>".
$(my_register_name): $(installed_apk_splits)