AAPT should not process XML that failed to compile
AAPT would attempt to warn if an unprefixed 'id' attribute was used in an XML resource file even if that XML file failed to compile. The result was undefined behaviour, including crashing the process. Change-Id: I1a9464ec937760e8d38bbe1af8d1b5d6b2c105a2
This commit is contained in:
committed by
Xavier Ducrohet
parent
fd876194cf
commit
f2d2c87181
@@ -1236,12 +1236,13 @@ status_t buildResources(Bundle* bundle, const sp<AaptAssets>& assets)
|
||||
while ((err=it.next()) == NO_ERROR) {
|
||||
String8 src = it.getFile()->getPrintableSource();
|
||||
err = compileXmlFile(assets, it.getFile(), &table, xmlFlags);
|
||||
if (err != NO_ERROR) {
|
||||
if (err == NO_ERROR) {
|
||||
ResXMLTree block;
|
||||
block.setTo(it.getFile()->getData(), it.getFile()->getSize(), true);
|
||||
checkForIds(src, block);
|
||||
} else {
|
||||
hasErrors = true;
|
||||
}
|
||||
ResXMLTree block;
|
||||
block.setTo(it.getFile()->getData(), it.getFile()->getSize(), true);
|
||||
checkForIds(src, block);
|
||||
}
|
||||
|
||||
if (err < NO_ERROR) {
|
||||
|
||||
Reference in New Issue
Block a user