summaryrefslogtreecommitdiff
path: root/tools/aapt/ResourceTable.cpp
diff options
context:
space:
mode:
authorAdam Lesinski <adamlesinski@google.com>2017-01-24 16:16:09 -0800
committerAdam Lesinski <adamlesinski@google.com>2017-01-24 16:16:09 -0800
commitfa1e9d7ad0e3f5b7fce37dbdc3f5ad889274ee43 (patch)
tree9534bed2e842071ede73c74d096829f5f751c3bb /tools/aapt/ResourceTable.cpp
parent9bbe787822502e8c09d9abe963e6539647bea346 (diff)
AAPT: Fix --feature-of to allow non-public symbol visibility
Test: manual Change-Id: Iada18b201c6463011002f96285a64c64565a6e1c
Diffstat (limited to 'tools/aapt/ResourceTable.cpp')
-rw-r--r--tools/aapt/ResourceTable.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/aapt/ResourceTable.cpp b/tools/aapt/ResourceTable.cpp
index 661409e3d4bc..b9bf7991edb3 100644
--- a/tools/aapt/ResourceTable.cpp
+++ b/tools/aapt/ResourceTable.cpp
@@ -2204,8 +2204,10 @@ uint32_t ResourceTable::getResId(const String16& package,
package.string(), package.size(),
&specFlags);
if (rid != 0) {
- if (onlyPublic) {
- if ((specFlags & ResTable_typeSpec::SPEC_PUBLIC) == 0) {
+ if (onlyPublic && (specFlags & ResTable_typeSpec::SPEC_PUBLIC) == 0) {
+ // If this is a feature split and the resource has the same
+ // package name as us, then everything is public.
+ if (mPackageType != AppFeature || mAssetsPackage != package) {
return 0;
}
}