Removing double delete from flashall

From aosp/2475604 the functionality of deleting retrofit partitions
wasn't added back correctly. aosp/837186 adds this logic in. We should
only have one delete that exists if the image is secondary and is
dynamic.

Unfortunately don't have a retrofit device to test on, but from an eye
test this logic seems to match the old functionality and should be
working

Test: m fastboot
Change-Id: I5481893ab1638541d21813efe1c4aab5219e1dcd
diff --git a/fastboot/fastboot.cpp b/fastboot/fastboot.cpp
index 21df729..8ad10de 100644
--- a/fastboot/fastboot.cpp
+++ b/fastboot/fastboot.cpp
@@ -350,8 +350,7 @@
 //
 // The returned Transport is a singleton, so multiple calls to this function will return the same
 // object, and the caller should not attempt to delete the returned Transport.
-static std::unique_ptr<Transport> open_device(const char* local_serial,
-                                              bool wait_for_device = true,
+static std::unique_ptr<Transport> open_device(const char* local_serial, bool wait_for_device = true,
                                               bool announce = true) {
     const Result<NetworkSerial, FastbootError> network_serial = ParseNetworkSerial(local_serial);
 
@@ -1885,9 +1884,8 @@
         if (is_retrofit_device(fp_->fb)) {
             std::string partition_name = image->part_name + "_"s + slot;
             if (image->IsSecondary() && should_flash_in_userspace(partition_name)) {
-                fp_->fb->DeletePartition(partition_name);
+                tasks.emplace_back(std::make_unique<DeleteTask>(fp_, partition_name));
             }
-            tasks.emplace_back(std::make_unique<DeleteTask>(fp_, partition_name));
         }
     }