From 3db26d596bdc969b6d0e8646ac0ab64346b7ee21 Mon Sep 17 00:00:00 2001 From: Justin Yun Date: Mon, 16 Dec 2019 14:09:39 +0900 Subject: Make product libs available to unbundled product apks. Unbundling product apps must be triggerred if the target is enforcing the product interfaces. The device must have ro.product.vndk.version property if its product interface is enforced. Unbundled product apps can use product libraries. Bug: 144534640 Bug: 127738095 Bug: 128557860 Test: check boot and basic features Change-Id: I32b2a1bd3e4f62b6acdbfab6bd277ec1132478a2 --- libnativeloader/public_libraries.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'libnativeloader/public_libraries.cpp') diff --git a/libnativeloader/public_libraries.cpp b/libnativeloader/public_libraries.cpp index d58b4eacba..40f002f0ef 100644 --- a/libnativeloader/public_libraries.cpp +++ b/libnativeloader/public_libraries.cpp @@ -30,6 +30,10 @@ #include #include +#if defined(__ANDROID__) +#include +#endif + #include "utils.h" namespace android::nativeloader { @@ -324,6 +328,14 @@ const std::string& vndksp_libraries() { return list; } +bool is_product_vndk_version_defined() { +#if defined(__ANDROID__) + return android::sysprop::VndkProperties::product_vndk_version().has_value(); +#else + return false; +#endif +} + namespace internal { // Exported for testing Result> ParseConfig( -- cgit v1.2.3-59-g8ed1b