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

Commit 77daf5fd authored by Daniel Zheng's avatar Daniel Zheng Committed by Automerger Merge Worker
Browse files

Merge "Adding in wipe tasks before other tasks run." am: 819a3529 am: 3c828ed5

parents 99f48238 3c828ed5
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -2583,10 +2583,13 @@ int FastBootTool::Main(int argc, char* argv[]) {
        if (fp->force_flash) {
            CancelSnapshotIfNeeded();
        }
        std::vector<std::unique_ptr<Task>> wipe_tasks;
        std::vector<std::string> partitions = {"userdata", "cache", "metadata"};
        for (const auto& partition : partitions) {
            tasks.emplace_back(std::make_unique<WipeTask>(fp.get(), partition));
            wipe_tasks.emplace_back(std::make_unique<WipeTask>(fp.get(), partition));
        }
        tasks.insert(tasks.begin(), std::make_move_iterator(wipe_tasks.begin()),
                     std::make_move_iterator(wipe_tasks.end()));
    }
    if (fp->wants_set_active) {
        fb->SetActive(next_active);