Changed FlashTask and RebootTask to take in FlashingPlan
Test: tested flash {partition} on raven and reboot {target} on raven
Change-Id: I26f4723474c3a142b086c1ac361578f8487ec3b9
Bug: 194686221
diff --git a/fastboot/task.h b/fastboot/task.h
index 582fa2f..d8b9e21 100644
--- a/fastboot/task.h
+++ b/fastboot/task.h
@@ -18,6 +18,7 @@
#include <sstream>
#include <string>
+#include "fastboot.h"
#include "fastboot_driver.h"
class Task {
@@ -29,11 +30,8 @@
class FlashTask : public Task {
public:
- FlashTask(const std::string& _slot);
- FlashTask(const std::string& _slot, bool _force_flash);
- FlashTask(const std::string& _slot, bool _force_flash, const std::string& _pname);
- FlashTask(const std::string& _slot, bool _force_flash, const std::string& _pname,
- const std::string& _fname);
+ FlashTask(const std::string& _slot, const std::string& _pname);
+ FlashTask(const std::string& _slot, const std::string& _pname, const std::string& _fname);
void Run() override;
~FlashTask() {}
@@ -42,17 +40,16 @@
const std::string pname_;
const std::string fname_;
const std::string slot_;
- bool force_flash_ = false;
};
class RebootTask : public Task {
public:
- RebootTask(fastboot::FastBootDriver* _fb);
- RebootTask(fastboot::FastBootDriver* _fb, const std::string _reboot_target);
+ RebootTask(FlashingPlan* _fp);
+ RebootTask(FlashingPlan* _fp, const std::string& _reboot_target);
void Run() override;
~RebootTask() {}
private:
const std::string reboot_target_ = "";
- fastboot::FastBootDriver* fb_;
+ FlashingPlan* fp_;
};
\ No newline at end of file