From 0403d8d2d50c3b8330e5aa246efa0a46eb6c6b86 Mon Sep 17 00:00:00 2001 From: Yifan Hong Date: Fri, 31 Jul 2020 14:20:36 -0700 Subject: [PATCH] libsnapshot: Properly set partial_update_ On GKI updates, has_dynamic_partition_metadata() may be false. Even if it is the case, partial_update_ should be set properly. Test: apply GKI update Bug: 162616968 Change-Id: Icf055d8eb3060e36b3e977541a24f62f9fe11a6f --- fs_mgr/libsnapshot/snapshot_metadata_updater.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs_mgr/libsnapshot/snapshot_metadata_updater.cpp b/fs_mgr/libsnapshot/snapshot_metadata_updater.cpp index 051584c34..f66bded2d 100644 --- a/fs_mgr/libsnapshot/snapshot_metadata_updater.cpp +++ b/fs_mgr/libsnapshot/snapshot_metadata_updater.cpp @@ -39,6 +39,8 @@ namespace snapshot { SnapshotMetadataUpdater::SnapshotMetadataUpdater(MetadataBuilder* builder, uint32_t target_slot, const DeltaArchiveManifest& manifest) : builder_(builder), target_suffix_(SlotSuffixForSlotNumber(target_slot)) { + partial_update_ = manifest.partial_update(); + if (!manifest.has_dynamic_partition_metadata()) { return; } @@ -63,7 +65,6 @@ SnapshotMetadataUpdater::SnapshotMetadataUpdater(MetadataBuilder* builder, uint3 } } - partial_update_ = manifest.partial_update(); } bool SnapshotMetadataUpdater::ShrinkPartitions() const {