Shared library resource support
Shared libraries can now export resources for applications
to use.
Exporting resources works the same way the framework exports
resources, by defining the public symbols in res/values/public.xml.
Building a shared library requires aapt to be invoked with the
--shared-lib option. Shared libraries will be assigned a package
ID of 0x00 at build-time. At runtime, all loaded shared libraries
will be assigned a new package ID.
Currently, shared libraries should not import other shared libraries,
as those dependencies will not be loaded at runtime.
At runtime, reflection is used to update the package ID of resource
symbols in the shared library's R class file. The package name of
the R class file is assumed to be the same as the shared library's
package name declared in its manifest. This will be customizable in
a future commit.
See /tests/SharedLibrary/ for examples of a shared library and its
client.
Bug:12724178
Change-Id: I60c0cb8ab87849f8f8a1a13431562fe8603020a7
diff --git a/include/androidfw/AssetManager.h b/include/androidfw/AssetManager.h
index a13dd16..610528c 100644
--- a/include/androidfw/AssetManager.h
+++ b/include/androidfw/AssetManager.h
@@ -161,7 +161,7 @@
* path hierarchy, and will not be seen by "AssetDir" or included
* in our filename cache.
*/
- Asset* openNonAsset(const char* fileName, AccessMode mode);
+ Asset* openNonAsset(const char* fileName, AccessMode mode, int32_t* outCookie = NULL);
/*
* Explicit non-asset file. The file explicitly named by the cookie (the