Merge "ShouldSkipOperation -> OptimizeOperation" into rvc-dev
diff --git a/Android.bp b/Android.bp
index d8b89b5..21ba507 100644
--- a/Android.bp
+++ b/Android.bp
@@ -210,9 +210,6 @@
"libutils",
"android.hardware.boot@1.0",
"android.hardware.boot@1.1",
-
- //TODO(b/148818798): remove when parent bug fixed
- "libutilscallstack",
],
target: {
recovery: {
@@ -226,7 +223,6 @@
],
exclude_shared_libs: [
"libstatslog",
- "libutilscallstack",
],
},
},
diff --git a/cleanup_previous_update_action.cc b/cleanup_previous_update_action.cc
index f104970..6c5cd1c 100644
--- a/cleanup_previous_update_action.cc
+++ b/cleanup_previous_update_action.cc
@@ -172,7 +172,12 @@
switch (state) {
case UpdateState::None: {
LOG(INFO) << "Can't find any snapshot to merge.";
- processor_->ActionComplete(this, ErrorCode::kSuccess);
+ ErrorCode error_code = ErrorCode::kSuccess;
+ if (!snapshot_->CancelUpdate()) {
+ error_code = ErrorCode::kError;
+ LOG(INFO) << "Failed to call SnapshotManager::CancelUpdate().";
+ }
+ processor_->ActionComplete(this, error_code);
return;
}