Snap for 12458821 from 82459276b2cfa350ae34fbeaf58263c37796ead9 to 25Q1-release

Change-Id: Iecbdcd70e493761910aa8a34f98f866575b2763f
diff --git a/aosp/ota_extractor.cc b/aosp/ota_extractor.cc
index 42270f4..29ba44c 100644
--- a/aosp/ota_extractor.cc
+++ b/aosp/ota_extractor.cc
@@ -206,6 +206,10 @@
 
   if (FLAGS_single_thread) {
     for (const auto& partition : manifest.partitions()) {
+      if (!partitions.empty() &&
+          partitions.count(partition.partition_name()) == 0) {
+        continue;
+      }
       if (!ExtractImageFromPartition(manifest,
                                      partition,
                                      data_begin,
@@ -221,6 +225,10 @@
   } else {
     std::vector<std::pair<std::future<bool>, std::string>> futures;
     for (const auto& partition : manifest.partitions()) {
+      if (!partitions.empty() &&
+          partitions.count(partition.partition_name()) == 0) {
+        continue;
+      }
       futures.push_back(std::make_pair(std::async(std::launch::async,
                                                   ExtractImageFromPartition,
                                                   manifest,