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

Commit 819a3529 authored by Daniel Zheng's avatar Daniel Zheng Committed by Gerrit Code Review
Browse files

Merge "Adding in wipe tasks before other tasks run."

parents 9bf90f14 303fb49c
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);