Call SnapshotManager::FinishedSnapshotWrites
... when the update has finished. This allows SnapshotManager
to conclude the update and prepare for reboot.
Test: builds
Test: apply OTA on Virtual A/B device, then check
/metadata/ota/snapshot-boot exists, then reboot
Bug: 138816109
Change-Id: I2a4699865b09358ef018313bed64e34617a78e3c
diff --git a/dynamic_partition_control_android.cc b/dynamic_partition_control_android.cc
index f430574..8dcf343 100644
--- a/dynamic_partition_control_android.cc
+++ b/dynamic_partition_control_android.cc
@@ -490,4 +490,11 @@
return true;
}
+bool DynamicPartitionControlAndroid::FinishUpdate() {
+ if (!GetVirtualAbFeatureFlag().IsEnabled())
+ return true;
+ LOG(INFO) << "Snapshot writes are done.";
+ return snapshot_->FinishedSnapshotWrites();
+}
+
} // namespace chromeos_update_engine