native_loader adds libraries specified in the
(optional) file: /vendor/etc/public.libraries.txt
to the list of public native libraries.
Bug: http://b/27073931
Change-Id: I927193cce99d48c3395bd0e6c373ae9fad0f13f4
This list contains libraries that should directly or indirectly
be accessible to apps for the platform. Note that this list is
not device specific but rather device class specific.
For now we have 2 separate lists; one for Android Phones and Tablets,
and another one for Android Wear devices.
Bug: http://b/27546414
Bug: http://b/22548808
Change-Id: I83de5e3cf67392d0e9af66f70123898bd5997146
(cherry picked from commit 4b0e963872)
This change replaces lazy get-or-create logic for
linker namespaces with the explicit one.
ApplicationLoaders.getClassLoader(..) is now resposible for
the namespace initialization for PathClassLoaders.
Bug: http://b/27189432
Bug: http://b/22548808
Change-Id: Ife987c3ca1db33a47c20f363a5ed61512be8b5a7
(cherry picked from commit d047c925af)
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