summaryrefslogtreecommitdiff
path: root/tools/aapt2/java/JavaClassGenerator.cpp
diff options
context:
space:
mode:
authorAdam Lesinski <adamlesinski@google.com>2017-08-29 17:32:24 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2017-08-29 17:32:24 +0000
commit123a19bc3af1c4da4faa9f781eaabcd0e9135f9c (patch)
tree819cddace5365a06b9b786272d6871b5e48b233a /tools/aapt2/java/JavaClassGenerator.cpp
parentf5ff39f0bdfedb19d994b0e97403ff5b90ec6511 (diff)
parent1ef0fa9d7242b1926543bc49e35905d1be02a781 (diff)
Merge "AAPT2: Fixup namespace implementation"
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator.cpp')
-rw-r--r--tools/aapt2/java/JavaClassGenerator.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/tools/aapt2/java/JavaClassGenerator.cpp b/tools/aapt2/java/JavaClassGenerator.cpp
index 44fa0f19a0e5..8da9106aa8d7 100644
--- a/tools/aapt2/java/JavaClassGenerator.cpp
+++ b/tools/aapt2/java/JavaClassGenerator.cpp
@@ -480,7 +480,7 @@ Maybe<std::string> JavaClassGenerator::UnmangleResource(const StringPiece& packa
if (NameMangler::Unmangle(&unmangled_name, &unmangled_package)) {
// The entry name was mangled, and we successfully unmangled it.
// Check that we want to emit this symbol.
- if (package_name != unmangled_package) {
+ if (package_name_to_generate != unmangled_package) {
// Skip the entry if it doesn't belong to the package we're writing.
return {};
}
@@ -579,8 +579,7 @@ bool JavaClassGenerator::Generate(const StringPiece& package_name_to_generate,
continue;
}
- // Stay consistent with AAPT and generate an empty type class if the R class
- // is public.
+ // Stay consistent with AAPT and generate an empty type class if the R class is public.
const bool force_creation_if_empty =
(options_.types == JavaClassGeneratorOptions::SymbolTypes::kPublic);