diff options
| author | Yifan Hong <elsk@google.com> | 2020-03-12 23:53:03 +0000 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2020-03-12 23:53:03 +0000 |
| commit | 3f35a8f4e4c48a812b48011cb1c4ff96c7cb597e (patch) | |
| tree | 1eeeeed1efe77d69408b8c523f57a8c56956c52d /common/dynamic_partition_control_interface.h | |
| parent | 5b7b3471cf83a357a3146250cab949cf9b2bb724 (diff) | |
| parent | ec95d5923b91e9a4459b5a75c12bc0f1f7dee92d (diff) | |
Merge "ShouldSkipOperation -> OptimizeOperation" into rvc-dev
Diffstat (limited to 'common/dynamic_partition_control_interface.h')
| -rw-r--r-- | common/dynamic_partition_control_interface.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/common/dynamic_partition_control_interface.h b/common/dynamic_partition_control_interface.h index 952e8d4d..a878f2e9 100644 --- a/common/dynamic_partition_control_interface.h +++ b/common/dynamic_partition_control_interface.h @@ -56,12 +56,17 @@ class DynamicPartitionControlInterface { // Return the feature flags of Virtual A/B on this device. virtual FeatureFlag GetVirtualAbFeatureFlag() = 0; - // Checks if |operation| can be skipped on the given partition. + // Attempt to optimize |operation|. + // If successful, |optimized| contains an operation with extents that + // needs to be written. + // If failed, no optimization is available, and caller should perform + // |operation| directly. // |partition_name| should not have the slot suffix; implementation of // DynamicPartitionControlInterface checks partition at the target slot // previously set with PreparePartitionsForUpdate(). - virtual bool ShouldSkipOperation(const std::string& partition_name, - const InstallOperation& operation) = 0; + virtual bool OptimizeOperation(const std::string& partition_name, + const InstallOperation& operation, + InstallOperation* optimized) = 0; // Do necessary cleanups before destroying the object. virtual void Cleanup() = 0; |
