summaryrefslogtreecommitdiff
path: root/tools/aapt/Main.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/Main.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/Main.cpp')
-rw-r--r--tools/aapt/Main.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/tools/aapt/Main.cpp b/tools/aapt/Main.cpp
index 64112867a4b4..c424cc516b56 100644
--- a/tools/aapt/Main.cpp
+++ b/tools/aapt/Main.cpp
@@ -220,7 +220,9 @@ void usage(void)
" Prevents symbols from being generated for strings that do not have a default\n"
" localization\n"
" --no-version-vectors\n"
- " Do not automatically generate versioned copies of vector XML resources.\n",
+ " Do not automatically generate versioned copies of vector XML resources.\n"
+ " --private-symbols\n"
+ " Java package name to use when generating R.java for private resources.\n",
gDefaultIgnoreAssets);
}
@@ -689,6 +691,16 @@ int main(int argc, char* const argv[])
bundle.setPseudolocalize(PSEUDO_ACCENTED | PSEUDO_BIDI);
} else if (strcmp(cp, "-no-version-vectors") == 0) {
bundle.setNoVersionVectors(true);
+ } else if (strcmp(cp, "-private-symbols") == 0) {
+ argc--;
+ argv++;
+ if (!argc) {
+ fprintf(stderr, "ERROR: No argument supplied for "
+ "'--private-symbols' option\n");
+ wantUsage = true;
+ goto bail;
+ }
+ bundle.setPrivateSymbolsPackage(String8(argv[0]));
} else {
fprintf(stderr, "ERROR: Unknown option '-%s'\n", cp);
wantUsage = true;