diff options
author | Android Build Role Account android-build-prod <android-build-team-robot@google.com> | 2021-03-11 11:05:58 +0000 |
---|---|---|
committer | Android Build Role Account android-build-prod <android-build-team-robot@google.com> | 2021-03-11 11:05:58 +0000 |
commit | 1a724c7b2bcf0f45f3268a7931c1903f386a79ba (patch) | |
tree | 693ff7c1d724992a2adee4d85de4790ecef1f97e /common/dynamic_partition_control_interface.h | |
parent | 92599eefd82225ef7980743d142072d89062f6c3 (diff) | |
parent | 3381102283df5bd2be955b05e796e1e87e75434d (diff) |
Snap for 7199817 from 3381102283df5bd2be955b05e796e1e87e75434d to s-keystone-qcom-release
Change-Id: I7fff4901566d183ad3bc84fe26825522b76d465e
Diffstat (limited to 'common/dynamic_partition_control_interface.h')
-rw-r--r-- | common/dynamic_partition_control_interface.h | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/common/dynamic_partition_control_interface.h b/common/dynamic_partition_control_interface.h index 4f46f740..8b29c3b0 100644 --- a/common/dynamic_partition_control_interface.h +++ b/common/dynamic_partition_control_interface.h @@ -69,6 +69,9 @@ class DynamicPartitionControlInterface { // Return the feature flags of Virtual A/B on this device. virtual FeatureFlag GetVirtualAbFeatureFlag() = 0; // Return the feature flags of Virtual A/B Compression on this device. + // This function will tell you if current device supports VABC. However, it + // DOES NOT tell you if VABC is used for current OTA update. For that, use + // UpdateUsesSnapshotCompression. virtual FeatureFlag GetVirtualAbCompressionFeatureFlag() = 0; // Attempt to optimize |operation|. @@ -134,11 +137,13 @@ class DynamicPartitionControlInterface { // allocated space for snapshot updates. virtual bool ResetUpdate(PrefsInterface* prefs) = 0; - // Reads the dynamic partitions metadata from the current slot, and puts the + // Reads the dynamic partitions metadata from the given slot, and puts the // name of the dynamic partitions with the current suffix to |partitions|. // Returns true on success. virtual bool ListDynamicPartitionsForSlot( - uint32_t current_slot, std::vector<std::string>* partitions) = 0; + uint32_t slot, + uint32_t current_slot, + std::vector<std::string>* partitions) = 0; // Finds a possible location that list all block devices by name; and puts // the result in |path|. Returns true on success. @@ -171,6 +176,16 @@ class DynamicPartitionControlInterface { virtual bool MapAllPartitions() = 0; // Unmap virtual block devices for all partitions. virtual bool UnmapAllPartitions() = 0; + + // Return if snapshot compression is enabled for this update. + // This function should only be called after preparing for an update + // (PreparePartitionsForUpdate), and before merging + // (see GetCleanupPreviousUpdateAction and CleanupPreviousUpdateAction) or + // resetting it (ResetUpdate). + // + // To know if the device supports snapshot compression by itself, use + // GetVirtualAbCompressionFeatureFlag + virtual bool UpdateUsesSnapshotCompression() = 0; }; } // namespace chromeos_update_engine |