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
This commit is contained in:
parent
1b52ac6efe
commit
2e6aee5316
1 changed files with 2 additions and 4 deletions
|
@ -350,8 +350,7 @@ Result<NetworkSerial, FastbootError> ParseNetworkSerial(const std::string& seria
|
|||
//
|
||||
// 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 @@ std::vector<std::unique_ptr<Task>> FlashAllTool::CollectTasksFromImageList() {
|
|||
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));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue