From: MÃ¥rten Kongstad Date: Wed, 8 Feb 2012 09:22:47 +0000 (+0100) Subject: Runtime resource overlay: clean-up. X-Git-Url: https://git.saurik.com/android/aapt.git/commitdiff_plain/11c3a26ac48315148e6e64ae14c08415022b2768?hp=11c3a26ac48315148e6e64ae14c08415022b2768 Runtime resource overlay: clean-up. This is a combination of three minor clean-up tasks: - Generate correct idmap even if name lookup fails: Any resources following a resource with a spec but no actual values would receive an incorrect ID in the idmap due to an accumulating offset error. To combat this, a dummy value is inserted in the idmap whenever a resource with a spec but no values is encountered. - Optimize pruning of padding zeroes in idmaps: Earlier, trailing zeroes were iteratively popped from the end of each type block of an idmap. This commit instead tracks where to make the cut, and does so with a single function call. - aapt: warn about resources which lack values: The resource framework assumes every resource to have a value for at least one valid configuration. However, if multiple resource directories are used (several -S options to aapt), the list of configurations is limited by dpi (-c option to aapt) and a resource is only available in discarded dpi configurations, aapt will create a resource entry where each configuration lack an actual value. This commit lets aapt emit a warning whenever this has happened. Change-Id: Ic7451b7f4adfef5bfa6b0d7e64e057f317a2cdaa ---