Skip filesystem verification if it's already done
Partners report that setShouldSwitchSlotOnReboot() is too slow,
sometimes over few minuets. This is primarily due to
FilesystemVerifierAction. The usual flow for using
setShouldSwitchSlotOnReboot() is:
1. Call applyPayload() with switch_slot=false
2. At a later time, call setShouldSwitchSlotOnReboot()
update_engine would have already performed file system verification in
step 1, doing verification in step 2 again adds little value. Therefore,
allow fs verification to be skipped in this scenario.
Test: th
Bug: 259327830
Change-Id: I3608c12d0eca9ee6b5a489524f9daedc431ccbec
diff --git a/aosp/update_attempter_android.h b/aosp/update_attempter_android.h
index f3feed0..f3ed604 100644
--- a/aosp/update_attempter_android.h
+++ b/aosp/update_attempter_android.h
@@ -34,6 +34,7 @@
#include "update_engine/common/clock_interface.h"
#include "update_engine/common/daemon_state_interface.h"
#include "update_engine/common/download_action.h"
+#include "update_engine/common/error_code.h"
#include "update_engine/common/hardware_interface.h"
#include "update_engine/common/metrics_reporter_interface.h"
#include "update_engine/common/network_selector_interface.h"
@@ -276,6 +277,7 @@
// The path to the zip file with X509 certificates.
std::string update_certificates_path_{constants::kUpdateCertificatesPath};
+ ErrorCode last_error_{ErrorCode::kSuccess};
DISALLOW_COPY_AND_ASSIGN(UpdateAttempterAndroid);
};