summaryrefslogtreecommitdiff
path: root/tools/aapt/ResourceTable.cpp
diff options
context:
space:
mode:
authorAdam Lesinski <adamlesinski@google.com>2015-12-07 14:02:15 -0800
committerAdam Lesinski <adamlesinski@google.com>2015-12-07 14:52:53 -0800
commit78713998f94a2cc2562aa0ae7761bbc563d8eafa (patch)
tree753a994b7373774fafa2c4258cc9c53afa845c29 /tools/aapt/ResourceTable.cpp
parent5f986095bed776c119d2f5452e0afeac3a437ea2 (diff)
Specify private resource package in Android.mk
Private resource package shouldn't be buried in some resource file. It can now be specified on the command line via the Android.mk file. Change-Id: I9e3cb0bf54830d6b021077af271913306c024701
Diffstat (limited to 'tools/aapt/ResourceTable.cpp')
-rw-r--r--tools/aapt/ResourceTable.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/tools/aapt/ResourceTable.cpp b/tools/aapt/ResourceTable.cpp
index 0e470d924f5a..e87c7d40f1d4 100644
--- a/tools/aapt/ResourceTable.cpp
+++ b/tools/aapt/ResourceTable.cpp
@@ -1141,7 +1141,15 @@ status_t compileResourceFile(Bundle* bundle,
}
pkg = String16(block.getAttributeStringValue(pkgIdx, &len));
if (!localHasErrors) {
- assets->setSymbolsPrivatePackage(String8(pkg));
+ SourcePos(in->getPrintableSource(), block.getLineNumber()).warning(
+ "<private-symbols> is deprecated. Use the command line flag "
+ "--private-symbols instead.\n");
+ if (assets->havePrivateSymbols()) {
+ SourcePos(in->getPrintableSource(), block.getLineNumber()).warning(
+ "private symbol package already specified. Ignoring...\n");
+ } else {
+ assets->setSymbolsPrivatePackage(String8(pkg));
+ }
}
while ((code=block.next()) != ResXMLTree::END_DOCUMENT && code != ResXMLTree::BAD_DOCUMENT) {