Add ErrorCode::kDeviceCorrupted.
This error code indicates the device is corrupted in a way
that it can no longer receive any future updates. Specifically, if a
device encounters a merge error, there is no way we can recover that
device.
Test: pass
Bug: 138808328
Change-Id: Idbd9d1bc5bc02bbba157f17f31b2c5ace839243c
diff --git a/metrics_utils.cc b/metrics_utils.cc
index 1f70874..9abc3ef 100644
--- a/metrics_utils.cc
+++ b/metrics_utils.cc
@@ -73,6 +73,7 @@
case ErrorCode::kFilesystemVerifierError:
case ErrorCode::kVerityCalculationError:
case ErrorCode::kNotEnoughSpace:
+ case ErrorCode::kDeviceCorrupted:
return metrics::AttemptResult::kOperationExecutionError;
case ErrorCode::kDownloadMetadataSignatureMismatch:
@@ -238,6 +239,7 @@
case ErrorCode::kFirstActiveOmahaPingSentPersistenceError:
case ErrorCode::kVerityCalculationError:
case ErrorCode::kNotEnoughSpace:
+ case ErrorCode::kDeviceCorrupted:
break;
// Special flags. These can't happen (we mask them out above) but