summaryrefslogtreecommitdiffstats
path: root/core/prebuilt_internal.mk
diff options
context:
space:
mode:
Diffstat (limited to 'core/prebuilt_internal.mk')
-rw-r--r--core/prebuilt_internal.mk14
1 files changed, 7 insertions, 7 deletions
diff --git a/core/prebuilt_internal.mk b/core/prebuilt_internal.mk
index 8efb89e..bf519ee 100644
--- a/core/prebuilt_internal.mk
+++ b/core/prebuilt_internal.mk
@@ -105,6 +105,7 @@ endif
endif # LOCAL_STRIP_MODULE not true
+ifeq ($(LOCAL_MODULE_CLASS),APPS)
PACKAGES.$(LOCAL_MODULE).OVERRIDES := $(strip $(LOCAL_OVERRIDES_PACKAGES))
rs_compatibility_jni_libs :=
@@ -124,11 +125,9 @@ ifeq ($(LOCAL_CERTIFICATE),EXTERNAL)
$(built_module) : PRIVATE_CERTIFICATE := $(LOCAL_CERTIFICATE).x509.pem
endif
ifeq ($(LOCAL_CERTIFICATE),)
- ifneq ($(filter APPS,$(LOCAL_MODULE_CLASS)),)
- # It is now a build error to add a prebuilt .apk without
- # specifying a key for it.
- $(error No LOCAL_CERTIFICATE specified for prebuilt "$(my_prebuilt_src_file)")
- endif
+ # It is now a build error to add a prebuilt .apk without
+ # specifying a key for it.
+ $(error No LOCAL_CERTIFICATE specified for prebuilt "$(my_prebuilt_src_file)")
else ifeq ($(LOCAL_CERTIFICATE),PRESIGNED)
# The magic string "PRESIGNED" means this package is already checked
# signed with its release key.
@@ -152,8 +151,6 @@ else
$(built_module) : PRIVATE_CERTIFICATE := $(LOCAL_CERTIFICATE).x509.pem
endif
-ifneq ($(filter APPS,$(LOCAL_MODULE_CLASS)),)
-
# Disable dex-preopt of prebuilts to save space
LOCAL_DEX_PREOPT := false
@@ -175,6 +172,9 @@ endif # LOCAL_DEX_PREOPT
# Sign and align non-presigned .apks.
$(built_module) : $(my_prebuilt_src_file) | $(ACP) $(ZIPALIGN) $(SIGNAPK_JAR)
$(transform-prebuilt-to-target)
+ifdef my_extracted_jni_libs
+ $(hide) zip -d $@ 'lib/*.so' # strip embedded JNI libraries.
+endif
ifneq ($(LOCAL_CERTIFICATE),PRESIGNED)
$(sign-package)
endif