diff options
| author | Howard Chen <howardsoc@google.com> | 2020-04-23 07:19:59 +0000 |
|---|---|---|
| committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2020-04-23 07:19:59 +0000 |
| commit | eabac7a6ed91a7ced423add96afaa33785a4d880 (patch) | |
| tree | 39af4bfefeeee1f9f781dd4c31e35b84ba740e44 | |
| parent | 845b9eb98b89e9206eae5c5b973521ea0e98358a (diff) | |
| parent | 23279926785d1933954ca0cb65e9d99c5e793059 (diff) | |
Avoid VAB merge when running a DSU am: 2327992678
Change-Id: I1f6b0d96d400751ccca44a545d26325508ea3b55
| -rw-r--r-- | cleanup_previous_update_action.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/cleanup_previous_update_action.cc b/cleanup_previous_update_action.cc index 26cc6be9..e43730d3 100644 --- a/cleanup_previous_update_action.cc +++ b/cleanup_previous_update_action.cc @@ -30,6 +30,7 @@ #include "update_engine/common/utils.h" #include "update_engine/payload_consumer/delta_performer.h" +using android::base::GetBoolProperty; using android::snapshot::SnapshotManager; using android::snapshot::SnapshotMergeStats; using android::snapshot::UpdateState; @@ -335,6 +336,12 @@ bool CleanupPreviousUpdateAction::BeforeCancel() { void CleanupPreviousUpdateAction::InitiateMergeAndWait() { TEST_AND_RETURN(running_); LOG(INFO) << "Attempting to initiate merge."; + // suspend the VAB merge when running a DSU + if (GetBoolProperty("ro.gsid.image_running", false)) { + LOG(WARNING) << "Suspend the VAB merge when running a DSU."; + processor_->ActionComplete(this, ErrorCode::kError); + return; + } if (snapshot_->InitiateMerge()) { WaitForMergeOrSchedule(); |
