diff options
author | Yifan Hong <elsk@google.com> | 2019-09-26 17:51:33 -0700 |
---|---|---|
committer | Yifan Hong <elsk@google.com> | 2019-10-17 00:10:29 +0000 |
commit | f0f4a91d686b50aff2afdf2cabfec68fb6765d5a (patch) | |
tree | d931faab1edc041bc5d8e8dd5f93ff84136bdb0a /dynamic_partition_control_interface.h | |
parent | 7a78d630e11532d6f854ba7d794362804b33c950 (diff) |
DynamicPartitionControl: only create snapshot when snapshot_enabled
Do not create snapshot when applying downgrade
to non-Virtual-A/B packages and secondary OTAs.
Test: apply downgrade OTA on Virtual A/B devices
Bug: 138733621 (secondary OTA)
Fixes: 138258570 (downgrades)
Change-Id: I13318f57613d6bd60a5b7e81ebb3e35b3c225a0c
Diffstat (limited to 'dynamic_partition_control_interface.h')
-rw-r--r-- | dynamic_partition_control_interface.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/dynamic_partition_control_interface.h b/dynamic_partition_control_interface.h index 0ccfcd6b..9c4c2e82 100644 --- a/dynamic_partition_control_interface.h +++ b/dynamic_partition_control_interface.h @@ -92,10 +92,11 @@ class DynamicPartitionControlInterface { // Prepare all partitions for an update specified in |manifest|. // This is needed before calling MapPartitionOnDeviceMapper(), otherwise the // device would be mapped in an inconsistent way. - virtual bool PreparePartitionsForUpdate( - uint32_t source_slot, - uint32_t target_slot, - const DeltaArchiveManifest& manifest) = 0; + // If |update| is set, create snapshots and writes super partition metadata. + virtual bool PreparePartitionsForUpdate(uint32_t source_slot, + uint32_t target_slot, + const DeltaArchiveManifest& manifest, + bool update) = 0; // Return a possible location for devices listed by name. virtual bool GetDeviceDir(std::string* path) = 0; |