Merge "public libs from APEXes are pre-loadable"
am: 571e68efec
Change-Id: If7bd6716fbfc20882caacd617697d8c691919714
diff --git a/libnativeloader/public_libraries.cpp b/libnativeloader/public_libraries.cpp
index 93df1d0..010e8cc 100644
--- a/libnativeloader/public_libraries.cpp
+++ b/libnativeloader/public_libraries.cpp
@@ -176,6 +176,11 @@
std::copy(vec.begin(), vec.end(), std::back_inserter(*sonames));
}
+ // If this is for preloading libs, don't remove the libs from APEXes.
+ if (for_preload) {
+ return android::base::Join(*sonames, ':');
+ }
+
// Remove the public libs in the runtime namespace.
// These libs are listed in public.android.txt, but we don't want the rest of android
// in default namespace to dlopen the libs.