Shift responsibility of preloading native libraries to the user
of the library. This lets applications that do not use jni but
depend on libnative_loader.so to avoid unnecessary preloads of
public libraries which could be expensive.
Bug: http://b/27245894
Change-Id: I12a8100de5da639c068769bca21ecebff2b2d538
(cherry picked from commit 426799d770)
FindNamespaceByClassLoader returns android_namespace_t* to make
it suitable for exporting this functionality.
Bug: http://b/27189432
Change-Id: Ifef3de753192178e0184fb114596fe956fde2826
Preload libraries needed by the public namespace
at the earlier stage. This saves time on
InitPublicNamespace and saves memory because
the libraries are linked before zygote fork.
Bug: http://b/26409579
Change-Id: I59153a4180b930f31b542d8d2cb17b5d63c36774
(cherry picked from commit d68c8e9f84)
Note that with this change the linker will ignore
icu libraries provided by an app because public
libraries are always provided by system. At this point
it does not affect any apps because before Marshmallow
all of them were getting platform version of icu4c
libs anyways (they will be getting their own copy of the
library only in Marshmallow release).
Bug: http://b/26217329
Bug: http://b/26929349
Change-Id: I681cab43c9f28ec22319d9f0424bd3df00743a5f
Shared namespaces are used for bundled app classloaders.
Bug: http://b/22548808
Bug: http://b/26165097
Change-Id: I163033f70c50ef9ddb4164676c033ab30748964e
(cherry picked from commit ef4639c1a5)
Extracted native loader to separate library in order to
be able to reuse it for NativeActivities related native code
in libandroid_runtime.so
Bug: http://b/22548808
Change-Id: Ibcf5ddcdc5aba22e32e4b72887840e9c171c1986