Continue idmap generation even if name lookup fails.

In resources.arsc files, a resource is represented by a specification
block and one or more value blocks. In rare cases, a resource name
is also given a new resource ID, a specification block and no values
blocks. This commit ensures idmap generation does not fail if such an
entry is encountered.

Change-Id: I32302a0b07a7a320b7eeb31886931be3bb7b7e9a
This commit is contained in:
Mårten Kongstad 2011-05-19 16:02:35 +02:00 committed by Johan Redestig
parent 14402a1a5a
commit 963664b6b7

View File

@ -4200,7 +4200,8 @@ status_t ResTable::createIdmap(const ResTable& overlay, uint32_t originalCrc, ui
| (0x0000ffff & (entryIndex));
resource_name resName;
if (!this->getResourceName(resID, &resName)) {
return UNKNOWN_ERROR;
LOGW("idmap: resource 0x%08x has spec but lacks values, skipping\n", resID);
continue;
}
const String16 overlayType(resName.type, resName.typeLen);