summaryrefslogtreecommitdiff
path: root/tools/aapt2/ResourceUtils.cpp
diff options
context:
space:
mode:
authorAdam Lesinski <adamlesinski@google.com>2015-12-16 14:01:57 -0800
committerAdam Lesinski <adamlesinski@google.com>2015-12-17 11:01:55 -0800
commit24b8ff0faf7c59323d0171cdd825ca09e712aa1e (patch)
treef1350009e8e3aa03ab93b088619635991aeb989a /tools/aapt2/ResourceUtils.cpp
parent7ff3ee19f4b831a526baf4b928d1ac172d070d82 (diff)
AAPT2: Fix references to private parent
Change-Id: Id4697551b6c8cb6167f562de593006ae3c6158c0
Diffstat (limited to 'tools/aapt2/ResourceUtils.cpp')
-rw-r--r--tools/aapt2/ResourceUtils.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/tools/aapt2/ResourceUtils.cpp b/tools/aapt2/ResourceUtils.cpp
index 36c3e702574e..1dc123e45949 100644
--- a/tools/aapt2/ResourceUtils.cpp
+++ b/tools/aapt2/ResourceUtils.cpp
@@ -176,10 +176,10 @@ bool isAttributeReference(const StringPiece16& str) {
/*
* Style parent's are a bit different. We accept the following formats:
*
- * @[package:]style/<entry>
- * ?[package:]style/<entry>
- * <package>:[style/]<entry>
- * [package:style/]<entry>
+ * @[[*]package:]style/<entry>
+ * ?[[*]package:]style/<entry>
+ * <[*]package>:[style/]<entry>
+ * [[*]package:style/]<entry>
*/
Maybe<Reference> parseStyleParentReference(const StringPiece16& str, std::string* outError) {
if (str.empty()) {
@@ -195,10 +195,11 @@ Maybe<Reference> parseStyleParentReference(const StringPiece16& str, std::string
if (name.data()[0] == u'@' || name.data()[0] == u'?') {
hasLeadingIdentifiers = true;
name = name.substr(1, name.size() - 1);
- if (name.data()[0] == u'*') {
- privateRef = true;
- name = name.substr(1, name.size() - 1);
- }
+ }
+
+ if (name.data()[0] == u'*') {
+ privateRef = true;
+ name = name.substr(1, name.size() - 1);
}
ResourceNameRef ref;