summaryrefslogtreecommitdiffstats
path: root/libs
diff options
context:
space:
mode:
authorAdam Lesinski <adamlesinski@google.com>2014-10-01 00:44:31 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-10-01 00:44:31 +0000
commitd388b1fdde73124eeda35f18e5bcc2ed1c8cefaa (patch)
treef6935bdab61aadc052e52d039c3a6a0ea11ca391 /libs
parent6a87fb2b29a98cba03366a796e06cb702fc85ef1 (diff)
parentcd8e73817d14798f9d2031ffd301a03a096b7907 (diff)
downloadframeworks_base-d388b1fdde73124eeda35f18e5bcc2ed1c8cefaa.zip
frameworks_base-d388b1fdde73124eeda35f18e5bcc2ed1c8cefaa.tar.gz
frameworks_base-d388b1fdde73124eeda35f18e5bcc2ed1c8cefaa.tar.bz2
am cd8e7381: Merge "Fix issue with using locally defined attrs in a shared lib" into lmp-dev
* commit 'cd8e73817d14798f9d2031ffd301a03a096b7907': Fix issue with using locally defined attrs in a shared lib
Diffstat (limited to 'libs')
-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 f72532f..38dfe03 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;
}