Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 76786b90 authored by Yurii Zubrytskyi's avatar Yurii Zubrytskyi
Browse files

[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
parent b0e40f36
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);
    }
  }