From bb397b0a0b492fe5e2120172ffc7c4416cc854e9 Mon Sep 17 00:00:00 2001 From: Anton Hansson Date: Wed, 29 Aug 2018 13:42:09 +0100 Subject: [PATCH] Support app shared libs in /product and /product_services. This whitelist controls which partitions support installing an app's libraries in the partition's lib folder as opposed to embedding them in the APK itself. Update it to also include /product and /product_services. Also add some clarifying comments. Bug: 111797707 Test: in internal branch Change-Id: I756af46cc9b718ca669dacc9d25364edddb295f4 --- core/install_jni_libs.mk | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/core/install_jni_libs.mk b/core/install_jni_libs.mk index b7d83dc137..01f7f101ea 100644 --- a/core/install_jni_libs.mk +++ b/core/install_jni_libs.mk @@ -18,10 +18,20 @@ endif ifneq ($(filter tests samples, $(LOCAL_MODULE_TAGS)),) my_embed_jni := true endif -ifeq ($(filter $(TARGET_OUT)/% $(TARGET_OUT_VENDOR)/% $(TARGET_OUT_OEM)/%, $(my_module_path)),) -# If this app isn't to be installed to system partitions. -my_embed_jni := true + +# If the APK is not installed in one of the following partitions, force its libraries +# to be embedded inside the APK instead of installed to //lib[64]/. +supported_partition_patterns := \ + $(TARGET_OUT)/% \ + $(TARGET_OUT_VENDOR)/% \ + $(TARGET_OUT_OEM)/% \ + $(TARGET_OUT_PRODUCT)/% \ + $(TARGET_OUT_PRODUCT_SERVICES)/% \ + +ifeq ($(filter $(supported_partition_patterns),$(my_module_path)),) + my_embed_jni := true endif + # If we're installing this APP as a compressed module, we include all JNI libraries # in the compressed artifact, rather than as separate files on the partition in question. ifdef LOCAL_COMPRESSED_MODULE