diff --git a/core/clear_vars.mk b/core/clear_vars.mk index 75297bc91..d841ac8b5 100644 --- a/core/clear_vars.mk +++ b/core/clear_vars.mk @@ -93,6 +93,7 @@ LOCAL_NO_EMMA_INSTRUMENT:= LOCAL_NO_EMMA_COMPILE:= LOCAL_PROGUARD_ENABLED:= # '',optonly,full,custom LOCAL_PROGUARD_FLAGS:= +LOCAL_MANIFEST_FILE:= # Trim MAKEFILE_LIST so that $(call my-dir) doesn't need to # iterate over thousands of entries every time. diff --git a/core/package.mk b/core/package.mk index cdeefb4a9..8254bae9d 100644 --- a/core/package.mk +++ b/core/package.mk @@ -61,6 +61,10 @@ ifneq (,$(LOCAL_JAVA_RESOURCE_FILES)) $(error $(LOCAL_PATH): Package modules may not set LOCAL_JAVA_RESOURCE_FILES) endif +ifeq ($(strip $(LOCAL_MANIFEST_FILE)),) +LOCAL_MANIFEST_FILE := AndroidManifest.xml +endif + ifneq ($(strip $(LOCAL_MODULE_CLASS)),) $(error $(LOCAL_PATH): Package modules may not set LOCAL_MODULE_CLASS) endif @@ -160,7 +164,7 @@ include $(BUILD_SYSTEM)/java.mk DONT_INSTALL_DEX_FILES := $(old_DONT_INSTALL_DEX_FILES) old_DONT_INSTALL_DEX_FILES = -full_android_manifest := $(LOCAL_PATH)/AndroidManifest.xml +full_android_manifest := $(LOCAL_PATH)/$(LOCAL_MANIFEST_FILE) $(LOCAL_INTERMEDIATE_TARGETS): \ PRIVATE_ANDROID_MANIFEST := $(full_android_manifest)