Changing name of flash super layout
OptimizedFlashSuper makes more sense and is more consistent with
should-optimize-super
Test: m fastboot
Change-Id: I6ceb31144dce591e0a53faec68b932112d9cd360
diff --git a/fastboot/task.cpp b/fastboot/task.cpp
index c1b9a31..bf64f0e 100644
--- a/fastboot/task.cpp
+++ b/fastboot/task.cpp
@@ -96,17 +96,17 @@
return "reboot " + reboot_target_;
}
-FlashSuperLayoutTask::FlashSuperLayoutTask(const std::string& super_name,
- std::unique_ptr<SuperFlashHelper> helper,
- SparsePtr sparse_layout, uint64_t super_size,
- const FlashingPlan* fp)
+OptimizedFlashSuperTask::OptimizedFlashSuperTask(const std::string& super_name,
+ std::unique_ptr<SuperFlashHelper> helper,
+ SparsePtr sparse_layout, uint64_t super_size,
+ const FlashingPlan* fp)
: super_name_(super_name),
helper_(std::move(helper)),
sparse_layout_(std::move(sparse_layout)),
super_size_(super_size),
fp_(fp) {}
-void FlashSuperLayoutTask::Run() {
+void OptimizedFlashSuperTask::Run() {
// Use the reported super partition size as the upper limit, rather than
// sparse_file_len, which (1) can fail and (2) is kind of expensive, since
// it will map in all of the embedded fds.
@@ -120,11 +120,11 @@
// Send the data to the device.
flash_partition_files(super_name_, files);
}
-std::string FlashSuperLayoutTask::ToString() {
+std::string OptimizedFlashSuperTask::ToString() {
return "optimized-flash-super";
}
-std::unique_ptr<FlashSuperLayoutTask> FlashSuperLayoutTask::Initialize(
+std::unique_ptr<OptimizedFlashSuperTask> OptimizedFlashSuperTask::Initialize(
const FlashingPlan* fp, std::vector<ImageEntry>& os_images) {
if (!fp->should_optimize_flash_super) {
LOG(INFO) << "super optimization is disabled";
@@ -188,11 +188,11 @@
};
os_images.erase(std::remove_if(os_images.begin(), os_images.end(), remove_if_callback),
os_images.end());
- return std::make_unique<FlashSuperLayoutTask>(super_name, std::move(helper), std::move(s),
- partition_size, fp);
+ return std::make_unique<OptimizedFlashSuperTask>(super_name, std::move(helper), std::move(s),
+ partition_size, fp);
}
-std::unique_ptr<FlashSuperLayoutTask> FlashSuperLayoutTask::InitializeFromTasks(
+std::unique_ptr<OptimizedFlashSuperTask> OptimizedFlashSuperTask::InitializeFromTasks(
const FlashingPlan* fp, std::vector<std::unique_ptr<Task>>& tasks) {
if (!fp->should_optimize_flash_super) {
LOG(INFO) << "super optimization is disabled";
@@ -261,8 +261,8 @@
};
tasks.erase(std::remove_if(tasks.begin(), tasks.end(), remove_if_callback), tasks.end());
- return std::make_unique<FlashSuperLayoutTask>(super_name, std::move(helper), std::move(s),
- partition_size, fp);
+ return std::make_unique<OptimizedFlashSuperTask>(super_name, std::move(helper), std::move(s),
+ partition_size, fp);
}
UpdateSuperTask::UpdateSuperTask(const FlashingPlan* fp) : fp_(fp) {}