Add an overload function in boot control
It's used to support partial update. The overload function takes
additional info whether the partition is included in payload. And
it also outputs if the partition is a dynamic partition.
Bug: 157778739
Test: unit tests pass
Change-Id: I0741d44c223fb7c187fe208564371acd6d868c65
diff --git a/boot_control_android.cc b/boot_control_android.cc
index ec2ca0f..dee5fa8 100644
--- a/boot_control_android.cc
+++ b/boot_control_android.cc
@@ -82,12 +82,24 @@
return module_->getCurrentSlot();
}
+bool BootControlAndroid::GetPartitionDevice(const std::string& partition_name,
+ BootControlInterface::Slot slot,
+ bool not_in_payload,
+ std::string* device,
+ bool* is_dynamic) const {
+ return dynamic_control_->GetPartitionDevice(partition_name,
+ slot,
+ GetCurrentSlot(),
+ not_in_payload,
+ device,
+ is_dynamic);
+}
bool BootControlAndroid::GetPartitionDevice(const string& partition_name,
- Slot slot,
+ BootControlInterface::Slot slot,
string* device) const {
- return dynamic_control_->GetPartitionDevice(
- partition_name, slot, GetCurrentSlot(), device);
+ return GetPartitionDevice(
+ partition_name, slot, false /* not_in_payload */, device, nullptr);
}
bool BootControlAndroid::IsSlotBootable(Slot slot) const {