Merge "[aapt2] Update the new project tracking for duplicate types"

This commit is contained in:
Yurii Zubrytskyi
2021-10-14 21:14:32 +00:00
committed by Android (Google) Code Review

View File

@@ -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);
}
}