diff options
| author | Howard Chen <howardsoc@google.com> | 2020-04-17 11:22:13 +0800 |
|---|---|---|
| committer | PO HUNG CHEN <howardsoc@google.com> | 2020-04-23 02:00:10 +0000 |
| commit | 23279926785d1933954ca0cb65e9d99c5e793059 (patch) | |
| tree | 39af4bfefeeee1f9f781dd4c31e35b84ba740e44 | |
| parent | 97645820213c00d058d113b96a6855db1e36e51c (diff) | |
Avoid VAB merge when running a DSU
Bug: 147071959
Test: ota_e2etest.py
Merged-In: I9c8dcb4a2648d814672a966ce951516c1682d5f2
Change-Id: I9c8dcb4a2648d814672a966ce951516c1682d5f2
| -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(); |
