summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--aosp/update_attempter_android.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/aosp/update_attempter_android.cc b/aosp/update_attempter_android.cc
index 2ffa0da3..4636c430 100644
--- a/aosp/update_attempter_android.cc
+++ b/aosp/update_attempter_android.cc
@@ -364,6 +364,12 @@ bool UpdateAttempterAndroid::ResetStatus(brillo::ErrorPtr* error) {
LOG(INFO) << "Attempting to reset state from "
<< UpdateStatusToString(status_) << " to UpdateStatus::IDLE";
+ if (apex_handler_android_ != nullptr) {
+ LOG(INFO) << "Cleaning up reserved space for compressed APEX (if any)";
+ std::vector<ApexInfo> apex_infos_blank;
+ apex_handler_android_->AllocateSpace(apex_infos_blank);
+ }
+
switch (status_) {
case UpdateStatus::IDLE: {
if (!boot_control_->GetDynamicPartitionControl()->ResetUpdate(prefs_)) {