diff options
Diffstat (limited to 'libs')
| -rw-r--r-- | libs/androidfw/ResourceTypes.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libs/androidfw/ResourceTypes.cpp b/libs/androidfw/ResourceTypes.cpp index 8cef13765cc2..61a767cc0c4f 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; } |