From 1644c6d7f4931d0b4fe7ea77c63b016af01a46d3 Mon Sep 17 00:00:00 2001 From: Dianne Hackborn Date: Mon, 6 Feb 2012 15:33:21 -0800 Subject: Only generate private symbols that are needed. Change-Id: Icc4c86638db8429a387bf87c934cc712f807e213 --- tools/aapt/Command.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'tools/aapt/Command.cpp') diff --git a/tools/aapt/Command.cpp b/tools/aapt/Command.cpp index 607056a6c1f2..c79e243828c4 100644 --- a/tools/aapt/Command.cpp +++ b/tools/aapt/Command.cpp @@ -1617,6 +1617,12 @@ int doPackage(Bundle* bundle) goto bail; } + // Update symbols with information about which ones are needed as Java symbols. + assets->applyJavaSymbols(); + if (SourcePos::hasErrors()) { + goto bail; + } + // If we've been asked to generate a dependency file, do that here if (bundle->getGenDependencies()) { // If this is the packaging step, generate the dependency file next to @@ -1638,7 +1644,7 @@ int doPackage(Bundle* bundle) } // Write out R.java constants - if (assets->getPackage() == assets->getSymbolsPrivatePackage()) { + if (!assets->havePrivateSymbols()) { if (bundle->getCustomPackage() == NULL) { // Write the R.java file into the appropriate class directory // e.g. gen/com/foo/app/R.java -- cgit v1.2.3-59-g8ed1b