Remove extra JNI libs from prebuilt APKs
If an APK specifies LOCAL_PREBUILT_JNI_LIBS embedded in the prebuilt
APK, remove any that aren't listed. Restores the behavior from before
I82dd3aa441712772a1d1ddd6aaf5f41179facaa7.
Bug: 69500920
Test: m checkbuild
Change-Id: I971a9c4206604c172d77144df4c0ed9a8b1c5dd0
diff --git a/core/prebuilt_internal.mk b/core/prebuilt_internal.mk
index 30a9c37..809c572 100644
--- a/core/prebuilt_internal.mk
+++ b/core/prebuilt_internal.mk
@@ -335,11 +335,11 @@
# For PRESIGNED apks we must uncompress every .so file:
# even if the .so file isn't for the current TARGET_ARCH,
# we can't strip the file.
-embedded_prebuilt_jni_libs := 'lib/*.so'
+embedded_prebuilt_jni_libs :=
endif
ifndef embedded_prebuilt_jni_libs
# No LOCAL_PREBUILT_JNI_LIBS, uncompress all.
-embedded_prebuilt_jni_libs := 'lib/*.so'
+embedded_prebuilt_jni_libs :=
endif
$(built_module): PRIVATE_EMBEDDED_JNI_LIBS := $(embedded_prebuilt_jni_libs)
$(built_module): $(ZIP2ZIP)
@@ -358,7 +358,7 @@
endif
$(built_module) : $(my_prebuilt_src_file) | $(ZIPALIGN) $(SIGNAPK_JAR)
$(transform-prebuilt-to-target)
- $(uncompress-shared-libs)
+ $(uncompress-prebuilt-embedded-jni-libs)
ifeq (true, $(LOCAL_UNCOMPRESS_DEX))
$(uncompress-dexs)
endif # LOCAL_UNCOMPRESS_DEX