diff options
author | 2011-06-09 11:29:08 -0700 | |
---|---|---|
committer | 2011-06-09 15:27:39 -0700 | |
commit | 426431adcc220b6adfbe1d9530247f897e60fa36 (patch) | |
tree | e9dd34ae5151de5bf9f57edb3055d0d228e1f006 /tools/aapt/ResourceTable.cpp | |
parent | 1d3173c3dc93bb4f2efc5b059fec8e7577b3258a (diff) |
Enforce public resource restriction on bag parents.
Need to put some more styles in the SDK to avoid breaking apps.
Also, welcome Android 3.2.
Change-Id: Ia31d07c9b1b91ad868d8630437fdc1b5ae24f37d
Diffstat (limited to 'tools/aapt/ResourceTable.cpp')
-rw-r--r-- | tools/aapt/ResourceTable.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/aapt/ResourceTable.cpp b/tools/aapt/ResourceTable.cpp index 68c38928882e..d98b285dd1e3 100644 --- a/tools/aapt/ResourceTable.cpp +++ b/tools/aapt/ResourceTable.cpp @@ -1963,10 +1963,11 @@ uint32_t ResourceTable::getResId(const String16& ref, bool onlyPublic) const { String16 package, type, name; + bool refOnlyPublic = true; if (!ResTable::expandResourceRef( ref.string(), ref.size(), &package, &type, &name, defType, defPackage ? defPackage:&mAssetsPackage, - outErrorMsg)) { + outErrorMsg, &refOnlyPublic)) { NOISY(printf("Expanding resource: ref=%s\n", String8(ref).string())); NOISY(printf("Expanding resource: defType=%s\n", @@ -1979,7 +1980,7 @@ uint32_t ResourceTable::getResId(const String16& ref, String8(name).string())); return 0; } - uint32_t res = getResId(package, type, name, onlyPublic); + uint32_t res = getResId(package, type, name, onlyPublic && refOnlyPublic); NOISY(printf("Expanded resource: p=%s, t=%s, n=%s, res=%d\n", String8(package).string(), String8(type).string(), String8(name).string(), res)); |