From 963664b6b7b1d94994a6449c8a49e7457be4d8e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A5rten=20Kongstad?= Date: Thu, 19 May 2011 16:02:35 +0200 Subject: [PATCH] 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 --- libs/utils/ResourceTypes.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/utils/ResourceTypes.cpp b/libs/utils/ResourceTypes.cpp index 57aaf24ec..fc5a3ab47 100644 --- a/libs/utils/ResourceTypes.cpp +++ b/libs/utils/ResourceTypes.cpp @@ -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);