From 78713998f94a2cc2562aa0ae7761bbc563d8eafa Mon Sep 17 00:00:00 2001 From: Adam Lesinski Date: Mon, 7 Dec 2015 14:02:15 -0800 Subject: 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 --- tools/aapt/ResourceTable.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'tools/aapt/ResourceTable.cpp') 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( + " 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) { -- cgit v1.2.3-59-g8ed1b