[aapt2] Update the new project tracking for duplicate types
When tracking the types that require creating a new package update the map every time we see it, not only when adding one Bug: 201388769 Test: make aapt2_tests && aapt2_tests Change-Id: I3ed5bac1d64c0e7a831f59d58952fe4c34035776
This commit is contained in:
@@ -436,12 +436,12 @@ ResourceTableView ResourceTable::GetPartitionedView(const ResourceTableViewOptio
|
||||
const size_t index = type_index_iter->second;
|
||||
if (new_packages.size() == index) {
|
||||
new_packages.emplace_back(ResourceTablePackageView{package.name, package.id});
|
||||
type_new_package_index[type.type] = index + 1;
|
||||
}
|
||||
|
||||
// Move the type into a new package
|
||||
auto& other_package = new_packages[index];
|
||||
type_inserter.Insert(other_package.types, std::move(type));
|
||||
type_new_package_index[type.type] = index + 1;
|
||||
type_it = package.types.erase(type_it);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user