AAPT2: Add diff command
Adds the diff command and various small fixes to issues discovered when diffing old AAPT built APKs with new AAPT2 built APKS. Bug:22775504 Change-Id: I682a7fe1cf4b3efa7cbd5d18b333cf2d1046fe1b
This commit is contained in:
@@ -189,6 +189,17 @@ std::vector<ResourceConfigValue*> ResourceEntry::findAllValues(const ConfigDescr
|
||||
return results;
|
||||
}
|
||||
|
||||
std::vector<ResourceConfigValue*> ResourceEntry::findValuesIf(
|
||||
const std::function<bool(ResourceConfigValue*)>& f) {
|
||||
std::vector<ResourceConfigValue*> results;
|
||||
for (auto& configValue : values) {
|
||||
if (f(configValue.get())) {
|
||||
results.push_back(configValue.get());
|
||||
}
|
||||
}
|
||||
return results;
|
||||
}
|
||||
|
||||
/**
|
||||
* The default handler for collisions. A return value of -1 means keep the
|
||||
* existing value, 0 means fail, and +1 means take the incoming value.
|
||||
|
||||
Reference in New Issue
Block a user