Propagate the update compression status into SnapshotMergeStats.
Test: apply update, then statsd_testdrive
Bug: 178732971
Change-Id: Idf4b1d5fe3283c0cf659c7660d658a758b62b740
diff --git a/aosp/cleanup_previous_update_action.cc b/aosp/cleanup_previous_update_action.cc
index 16cb9fe..6155be4 100644
--- a/aosp/cleanup_previous_update_action.cc
+++ b/aosp/cleanup_previous_update_action.cc
@@ -270,10 +270,11 @@
void CleanupPreviousUpdateAction::WaitForMergeOrSchedule() {
AcknowledgeTaskExecuted();
TEST_AND_RETURN(running_);
+ auto update_uses_compression = snapshot_->UpdateUsesCompression();
auto state = snapshot_->ProcessUpdateState(
std::bind(&CleanupPreviousUpdateAction::OnMergePercentageUpdate, this),
std::bind(&CleanupPreviousUpdateAction::BeforeCancel, this));
- merge_stats_->set_state(state);
+ merge_stats_->set_state(state, update_uses_compression);
switch (state) {
case UpdateState::None: {
@@ -403,7 +404,7 @@
LOG(WARNING) << "InitiateMerge failed.";
auto state = snapshot_->GetUpdateState();
- merge_stats_->set_state(state);
+ merge_stats_->set_state(state, snapshot_->UpdateUsesCompression());
if (state == UpdateState::Unverified) {
// We are stuck at unverified state. This can happen if the update has
// been applied, but it has not even been attempted yet (in libsnapshot,