Add stub implementation for APIs to switch slot
Test: build
Bug: 187321613
Change-Id: Icdd402df711c8d35962bad2ef70f3c43e069c83b
diff --git a/aosp/update_attempter_android.cc b/aosp/update_attempter_android.cc
index 28c193e..cceecd9 100644
--- a/aosp/update_attempter_android.cc
+++ b/aosp/update_attempter_android.cc
@@ -1167,6 +1167,30 @@
ScheduleCleanupPreviousUpdate();
}
+bool UpdateAttempterAndroid::setShouldSwitchSlotOnReboot(
+ const std::string& metadata_filename, brillo::ErrorPtr* error) {
+ if (processor_->IsRunning()) {
+ return LogAndSetError(
+ error, FROM_HERE, "Already processing an update, cancel it first.");
+ }
+ // TODO(187321613) Implement this
+ return LogAndSetError(
+ error, FROM_HERE, "setShouldSwitchSlotOnReboot is not implemented yet.");
+}
+
+bool UpdateAttempterAndroid::resetShouldSwitchSlotOnReboot(
+ brillo::ErrorPtr* error) {
+ if (processor_->IsRunning()) {
+ return LogAndSetError(
+ error, FROM_HERE, "Already processing an update, cancel it first.");
+ }
+ // TODO(187321613) Implement this
+ return LogAndSetError(
+ error,
+ FROM_HERE,
+ "resetShouldSwitchSlotOnReboot is not implemented yet.");
+}
+
void UpdateAttempterAndroid::ScheduleCleanupPreviousUpdate() {
// If a previous CleanupSuccessfulUpdate call has not finished, or an update
// is in progress, skip enqueueing the action.