summaryrefslogtreecommitdiffstats
path: root/cmds/idmap
diff options
context:
space:
mode:
authorAdam Lesinski <adamlesinski@google.com>2014-01-29 18:20:45 -0800
committerAdam Lesinski <adamlesinski@google.com>2014-03-25 12:09:56 -0700
commitde898ff42912bd7ca1bfb099cd439562496765a4 (patch)
tree849b591a99a7e6a8fd790aedca3afff6f6b6eade /cmds/idmap
parent05f79758cd2688f89444a38baba326a0a1c1a438 (diff)
downloadframeworks_base-de898ff42912bd7ca1bfb099cd439562496765a4.zip
frameworks_base-de898ff42912bd7ca1bfb099cd439562496765a4.tar.gz
frameworks_base-de898ff42912bd7ca1bfb099cd439562496765a4.tar.bz2
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
Diffstat (limited to 'cmds/idmap')
-rw-r--r--cmds/idmap/scan.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/cmds/idmap/scan.cpp b/cmds/idmap/scan.cpp
index c5fc941..1153f38 100644
--- a/cmds/idmap/scan.cpp
+++ b/cmds/idmap/scan.cpp
@@ -119,7 +119,8 @@ namespace {
int parse_manifest(const void *data, size_t size, const char *target_package_name)
{
- ResXMLTree parser(data, size);
+ ResXMLTree parser;
+ parser.setTo(data, size);
if (parser.getError() != NO_ERROR) {
ALOGD("%s failed to init xml parser, error=0x%08x\n", __FUNCTION__, parser.getError());
return -1;