diff options
author | Dianne Hackborn <hackbod@google.com> | 2011-06-09 16:06:07 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2011-06-09 16:06:07 -0700 |
commit | f51ded0f8f593d17af82946eb65c05fc04f688b4 (patch) | |
tree | 32b39d7d93170aed01c11e7353afc53a2b306cb4 /tools | |
parent | 5a8455c3c625201f3ae6b9ce32913bf97ba61cc8 (diff) | |
parent | a8d7ea067cf22baeee2ff0a33e5a8c5a35936942 (diff) | |
download | frameworks_base-f51ded0f8f593d17af82946eb65c05fc04f688b4.zip frameworks_base-f51ded0f8f593d17af82946eb65c05fc04f688b4.tar.gz frameworks_base-f51ded0f8f593d17af82946eb65c05fc04f688b4.tar.bz2 |
am a8d7ea06: am 220cd77d: Merge "Enforce public resource restriction on bag parents." into honeycomb-mr2
* commit 'a8d7ea067cf22baeee2ff0a33e5a8c5a35936942':
Enforce public resource restriction on bag parents.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/aapt/ResourceTable.cpp | 5 | ||||
-rw-r--r-- | tools/aapt/ResourceTable.h | 4 |
2 files changed, 5 insertions, 4 deletions
diff --git a/tools/aapt/ResourceTable.cpp b/tools/aapt/ResourceTable.cpp index 5c5b4fd..81b924a 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)); diff --git a/tools/aapt/ResourceTable.h b/tools/aapt/ResourceTable.h index bbb8140..734c541 100644 --- a/tools/aapt/ResourceTable.h +++ b/tools/aapt/ResourceTable.h @@ -162,13 +162,13 @@ public: uint32_t getResId(const String16& package, const String16& type, const String16& name, - bool onlyPublic = false) const; + bool onlyPublic = true) const; uint32_t getResId(const String16& ref, const String16* defType = NULL, const String16* defPackage = NULL, const char** outErrorMsg = NULL, - bool onlyPublic = false) const; + bool onlyPublic = true) const; static bool isValidResourceName(const String16& s); |