summaryrefslogtreecommitdiffstats
path: root/libs/androidfw
diff options
context:
space:
mode:
authorAdam Lesinski <adamlesinski@google.com>2014-10-01 17:19:30 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-10-01 17:19:30 +0000
commit8cb387b3b7004c84fdf5eaea1158591e43838f4c (patch)
treed4ab2dcac8192bc4141480f7f75fc8066f73ab96 /libs/androidfw
parenta3194bd6b2355bca9bb6e079c5c849d9c258a73b (diff)
parent7923da5f5d05f256179e0d926b3b55bbf1d29a8e (diff)
downloadframeworks_base-8cb387b3b7004c84fdf5eaea1158591e43838f4c.zip
frameworks_base-8cb387b3b7004c84fdf5eaea1158591e43838f4c.tar.gz
frameworks_base-8cb387b3b7004c84fdf5eaea1158591e43838f4c.tar.bz2
am 7923da5f: am 06f380e9: am 95731abe: am bb7b5197: am cd8e7381: Merge "Fix issue with using locally defined attrs in a shared lib" into lmp-dev
* commit '7923da5f5d05f256179e0d926b3b55bbf1d29a8e': Fix issue with using locally defined attrs in a shared lib
Diffstat (limited to 'libs/androidfw')
-rw-r--r--libs/androidfw/ResourceTypes.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/libs/androidfw/ResourceTypes.cpp b/libs/androidfw/ResourceTypes.cpp
index 672a8ee..058ba86 100644
--- a/libs/androidfw/ResourceTypes.cpp
+++ b/libs/androidfw/ResourceTypes.cpp
@@ -1185,7 +1185,11 @@ uint32_t ResXMLParser::getAttributeNameResID(size_t idx) const
{
int32_t id = getAttributeNameID(idx);
if (id >= 0 && (size_t)id < mTree.mNumResIds) {
- return dtohl(mTree.mResIds[id]);
+ uint32_t resId = dtohl(mTree.mResIds[id]);
+ if (mTree.mDynamicRefTable == NULL ||
+ mTree.mDynamicRefTable->lookupResourceId(&resId) == NO_ERROR) {
+ return resId;
+ }
}
return 0;
}